PHP: Added `readonly` keyword (#3349)

Co-authored-by: RunDevelopment <mitchi5000.ms@googlemail.com>
This commit is contained in:
Frank de Jonge 2022-03-22 10:35:27 +01:00 committed by GitHub
parent 1e941e8df4
commit 4c3f196976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,7 @@
//
// keywords cannot be preceded by "->"
// the complex lookbehind means `(?<!(?:->|::)\s*)`
pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
lookbehind: true
}
],

File diff suppressed because one or more lines are too long

View File

@ -55,6 +55,7 @@ print
private
protected
public
readonly
require
require_once
return
@ -135,6 +136,7 @@ yield from
["keyword", "private"],
["keyword", "protected"],
["keyword", "public"],
["keyword", "readonly"],
["keyword", "require"],
["keyword", "require_once"],
["keyword", "return"],