PHP: Added `readonly` keyword (#3349)
Co-authored-by: RunDevelopment <mitchi5000.ms@googlemail.com>
This commit is contained in:
parent
1e941e8df4
commit
4c3f196976
|
@ -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
|
@ -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"],
|
||||
|
|
Loading…
Reference in New Issue