8000 code-server/lib/vscode/extensions/php/syntaxes/php.tmLanguage.json at 3d9f9221fa178b165cb1cda3faa00ce71cf8e8f9 · ITCSsDeveloper/code-server · GitHub 8000
Skip to content

Latest commit

 

History

History
3688 lines (3688 loc) · 127 KB

File metadata and controls

3688 lines (3688 loc) · 127 KB
{
"information_for_contributors": [
"This file has been converted from https://github.com/atom/language-php/blob/master/grammars/php.cson",
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-php/commit/5fae657cf989701e9594912772daff33249839b3",
"scopeName": "source.php",
"patterns": [
{
"include": "#attribute"
},
{
"include": "#comments"
},
{
"begin": "(?i)^\\s*(interface)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(extends)?\\s*",
"beginCaptures": {
"1": {
"name": "storage.type.interface.php"
},
"2": {
"name": "entity.name.type.interface.php"
},
"3": {
"name": "storage.modifier.extends.php"
}
},
"end": "(?i)((?:[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\s*,\\s*)*)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?\\s*(?:(?={)|$)",
"endCaptures": {
"1": {
"patterns": [
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "entity.other.inherited-class.php"
},
{
"match": ",",
"name": "punctuation.separator.classes.php"
}
]
},
"2": {
"name": "entity.other.inherited-class.php"
}
},
"name": "meta.interface.php",
"patterns": [
{
"include": "#namespace"
}
]
},
{
"begin": "(?i)^\\s*(trait)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)",
"beginCaptures": {
"1": {
"name": "storage.type.trait.php"
},
"2": {
"name": "entity.name.type.trait.php"
}
},
"end": "(?={)",
"name": "meta.trait.php",
"patterns": [
{
"include": "#comments"
}
]
},
{
"match": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+([a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)(?=\\s*;)",
"name": "meta.namespace.php",
"captures": {
"1": {
"name": "keyword.other.namespace.php"
},
"2": {
"name": "entity.name.type.namespace.php",
"patterns": [
{
"match": "\\\\",
"name": "punctuation.separator.inheritance.php"
}
]
}
}
},
{
"begin": "(?i)(?:^|(?<=<\\?php))\\s*(namespace)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.other.namespace.php"
}
},
"end": "(?<=})|(?=\\?>)",
"name": "meta.namespace.php",
"patterns": [
{
"include": "#comments"
},
{
"match": "(?i)[a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+",
"name": "entity.name.type.namespace.php",
"captures": {
"0": {
"patterns": [
{
"match": "\\\\",
"name": "punctuation.separator.inheritance.php"
}
]
}
}
},
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.namespace.begin.bracket.curly.php"
}
},
"end": "}|(?=\\?>)",
"endCaptures": {
"0": {
"name": "punctuation.definition.namespace.end.bracket.curly.php"
}
},
"patterns": [
{
"include": "$self"
}
]
},
{
"match": "[^\\s]+",
"name": "invalid.illegal.identifier.php"
}
]
},
{
"match": "\\s+(?=use\\b)"
},
{
"begin": "(?i)\\buse\\b",
"beginCaptures": {
"0": {
"name": "keyword.other.use.php"
}
},
"end": "(?<=})|(?=;)|(?=\\?>)",
"name": "meta.use.php",
"patterns": [
{
"match": "\\b(const|function)\\b",
"name": "storage.type.${1:/downcase}.php"
},
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.use.begin.bracket.curly.php"
}
},
"end": "}",
"endCaptures": {
"0": {
"name": "punctuation.definition.use.end.bracket.curly.php"
}
},
"patterns": [
{
"include": "#scope-resolution"
},
{
"match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)",
"captures": {
"1": {
"name": "keyword.other.use-as.php"
},
"2": {
"name": "storage.modifier.php"
},
"3": {
"name": "entity.other.alias.php"
}
}
},
{
"match": "(?xi)\n\\b(as)\n\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)",
"captures": {
"1": {
"name": "keyword.other.use-as.php"
},
"2": {
"patterns": [
{
"match": "^(?:final|abstract|public|private|protected|static)$",
"name": "storage.modifier.php"
},
{
"match": ".+",
"name": "entity.other.alias.php"
}
]
}
}
},
{
"match": "(?i)\\b(insteadof)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)",
"captures": {
"1": {
"name": "keyword.other.use-insteadof.php"
},
"2": {
"name": "support.class.php"
}
}
},
{
"match": ";",
"name": "punctuation.terminator.expression.php"
},
{
"include": "#use-inner"
}
]
},
{
"include": "#use-inner"
}
]
},
{
"begin": "(?ix)\n(?:\n \\b(?:(abstract|final)\\s+)?(class)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*\\b(class)\\b # anonymous class\n)",
"beginCaptures": {
"1": {
"name": "storage.modifier.${1:/downcase}.php"
},
"2": {
"name": "storage.type.class.php"
},
"3": {
"name": "entity.name.type.class.php"
},
"4": {
"name": "keyword.other.new.php"
},
"5": {
"patterns": [
{
"include": "#attribute"
}
]
},
"6": {
"name": "storage.type.class.php"
}
},
"end": "}|(?=\\?>)",
"endCaptures": {
"0": {
"name": "punctuation.definition.class.end.bracket.curly.php"
}
},
"name": "meta.class.php",
"patterns": [
{
"include": "#comments"
},
{
"begin": "(?i)(extends)\\s+",
"beginCaptures": {
"1": {
"name": "storage.modifier.extends.php"
}
},
"contentName": "meta.other.inherited-class.php",
"end": "(?i)(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"patterns": [
{
"begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)",
"end": "(?i)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "entity.other.inherited-class.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
},
{
"include": "#class-builtin"
},
{
"include": "#namespace"
},
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "entity.other.inherited-class.php"
}
]
},
{
"begin": "(?i)(implements)\\s+",
"beginCaptures": {
"1": {
"name": "storage.modifier.implements.php"
}
},
"end": "(?i)(?=[;{])",
"patterns": [
{
"include": "#comments"
},
{
"begin": "(?i)(?=[a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)",
"contentName": "meta.other.inherited-class.php",
"end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\\\s]))\\s*)",
"patterns": [
{
"begin": "(?i)(?=\\\\?[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*\\\\)",
"end": "(?i)([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)?(?=[^a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "entity.other.inherited-class.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
},
{
"include": "#class-builtin"
},
{
"include": "#namespace"
},
{
"match": "(?i)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*",
"name": "entity.other.inherited-class.php"
}
]
}
]
},
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.class.begin.bracket.curly.php"
}
},
"end": "(?=}|\\?>)",
"contentName": "meta.class.body.php",
"patterns": [
{
"include": "$self"
}
]
}
]
},
{
"include": "#match_statement"
},
{
"include": "#switch_statement"
},
{
"match": "\\s*\\b(yield\\s+from)\\b",
"captures": {
"1": {
"name": "keyword.control.yield-from.php"
}
}
},
{
"match": "(?x)\n\\s* # FIXME: Removing this causes specs to fail. Investigate.\n\\b(\n break|case|continue|declare|default|die|do|\n else(if)?|end(declare|for(each)?|if|switch|while)|exit|\n for(each)?|if|return|switch|use|while|yield\n)\\b",
"captures": {
"1": {
"name": "keyword.control.${1:/downcase}.php"
}
}
},
{
"begin": "(?i)\\b((?:require|include)(?:_once)?)\\s+",
"beginCaptures": {
"1": {
"name": "keyword.control.import.include.php"
}
},
"end": "(?=\\s|;|$|\\?>)",
"name": "meta.include.php",
"patterns": [
{
"include": "$self"
}
]
},
{
"begin": "\\b(catch)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "keyword.control.exception.catch.php"
},
"2": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
}
},
"name": "meta.catch.php",
"patterns": [
{
"match": "(?xi)\n([a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)*) # union or single exception class\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)? # Variable",
"captures": {
"1": {
"patterns": [
{
"match": "\\|",
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "(?i)(?=[\\\\a-z_\\x{7f}-\\x{7fffffff}])",
"end": "(?xi)\n( [a-z_\\x{7f}-\\x{7fffffff}] [a-z0-9_\\x{7f}-\\x{7fffffff}]* )\n(?![a-z0-9_\\x{7f}-\\x{7fffffff}\\\\])",
"endCaptures": {
"1": {
"name": "support.class.exception.php"
}
},
"patterns": [
{
"include": "#namespace"
}
]
}
]
},
"2": {
"name": "variable.other.php"
},
"3": {
"name": "punctuation.definition.variable.php"
}
}
}
]
},
{
"match": "\\b(catch|try|throw|exception|finally)\\b",
"name": "keyword.control.exception.php"
},
{
"begin": "(?i)\\b(function)\\s*(?=&?\\s*\\()",
"beginCaptures": {
"1": {
"name": "storage.type.function.php"
}
},
"end": "(?=\\s*{)",
"name": "meta.function.closure.php",
"patterns": [
{
"include": "#comments"
},
{
"begin": "(&)?\\s*(\\()",
"beginCaptures": {
"1": {
"name": "storage.modifier.reference.php"
},
"2": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"contentName": "meta.function.parameters.php",
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
}
},
"patterns": [
{
"include": "#function-parameters"
}
]
},
{
"begin": "(?i)(use)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "keyword.other.function.use.php"
},
"2": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
}
},
"name": "meta.function.closure.use.php",
"patterns": [
{
"match": ",",
"name": "punctuation.separator.delimiter.php"
},
{
"captures": {
"1": {
"name": "variable.other.php"
},
"2": {
"name": "storage.modifier.reference.php"
},
"3": {
"name": "punctuation.definition.variable.php"
}
},
"match": "(?i)((?:(&)\\s*)?(\\$+)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*(?=,|\\))"
}
]
},
{
"match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:{|/[/*]|\\#|$))",
"captures": {
"1": {
"name": "keyword.operator.return-value.php"
},
"2": {
"patterns": [
{
"include": "#php-types"
}
]
}
}
}
]
},
{
"begin": "(?i)\\b(fn)\\s*(?=&?\\s*\\()",
"beginCaptures": {
"1": {
"name": "storage.type.function.php"
}
},
"end": "=>",
"endCaptures": {
"0": {
"name": "punctuation.definition.arrow.php"
}
},
"name": "meta.function.closure.php",
"patterns": [
{
"begin": "(?:(&)\\s*)?(\\()",
"beginCaptures": {
"1": {
"name": "storage.modifier.reference.php"
},
"2": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"contentName": "meta.function.parameters.php",
"end": "\\)",
"endCaptures": {
"0": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
}
},
"patterns": [
{
"include": "#function-parameters"
}
]
},
{
"match": "(?xi)\n(:)\\s*\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)\n(?=\\s*(?:=>|/[/*]|\\#|$))",
"captures": {
"1": {
"name": "keyword.operator.return-value.php"
},
"2": {
"patterns": [
{
"include": "#php-types"
}
]
}
}
}
]
},
{
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected)\\s+)*)\n(function)\\s+(__construct)\n\\s*(\\()",
"beginCaptures": {
"1": {
"patterns": [
{
"match": "final|abstract|public|private|protected",
"name": "storage.modifier.php"
}
]
},
"2": {
"name": "storage.type.function.php"
},
"3": {
"name": "support.function.constructor.php"
},
"4": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
10BC8 "contentName": "meta.function.parameters.php",
"end": "(?xi)\n(\\)) \\s* ( : \\s*\n (?:\\?\\s*)? (?!\\s) [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\\\s\\|]+ (?<!\\s)\n)?\n(?=\\s*(?:{|/[/*]|\\#|$|;))",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
},
"2": {
"name": "invalid.illegal.return-type.php"
}
},
"name": "meta.function.php",
"patterns": [
{
"include": "#comments"
},
{
"match": ",",
"name": "punctuation.separator.delimiter.php"
},
{
"begin": "(?xi)\n(public|private|protected) \\s+\n(?: (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n) \\s+ )?\n((?:(&)\\s*)?(\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name with possible reference",
"beginCaptures": {
"1": {
"name": "storage.modifier.php"
},
"2": {
"patterns": [
{
"include": "#php-types"
}
]
},
"3": {
"name": "variable.other.php"
},
"4": {
"name": "storage.modifier.reference.php"
},
"5": {
"name": "punctuation.definition.variable.php"
}
},
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"name": "meta.function.parameter.promoted-property.php",
"patterns": [
{
"begin": "=",
"beginCaptures": {
"0": {
"name": "keyword.operator.assignment.php"
}
},
"end": "(?=\\s*(?:,|\\)|/[/*]|\\#))",
"patterns": [
{
"include": "#parameter-default-types"
}
]
}
]
},
{
"include": "#function-parameters"
}
]
},
{
"begin": "(?x)\n((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n(function)\\s+\n(?i:\n (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|toString|\n clone|set_state|sleep|wakeup|autoload|invoke|callStatic|serialize|unserialize))\n |(?:(&)?\\s*([a-zA-Z_\\x{7f}-\\x{7fffffff}][a-zA-Z0-9_\\x{7f}-\\x{7fffffff}]*))\n)\n\\s*(\\()",
"beginCaptures": {
"1": {
"patterns": [
{
"match": "final|abstract|public|private|protected|static",
"name": "storage.modifier.php"
}
]
},
"2": {
"name": "storage.type.function.php"
},
"3": {
"name": "support.function.magic.php"
},
"4": {
"name": "storage.modifier.reference.php"
},
"5": {
"name": "entity.name.function.php"
},
"6": {
"name": "punctuation.definition.parameters.begin.bracket.round.php"
}
},
"contentName": "meta.function.parameters.php",
"end": "(?xi)\n(\\)) (?: \\s* (:) \\s* (\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n) )?\n(?=\\s*(?:{|/[/*]|\\#|$|;))",
"endCaptures": {
"1": {
"name": "punctuation.definition.parameters.end.bracket.round.php"
},
"2": {
"name": "keyword.operator.return-value.php"
},
"3": {
"patterns": [
{
"match": "\\b(static)\\b",
"name": "storage.type.php"
},
{
"include": "#php-types"
}
]
}
},
"name": "meta.function.php",
"patterns": [
{
"include": "#function-parameters"
}
]
},
{
"match": "(?xi)\n((?:(?:public|private|protected|static)(?:\\s+|(?=\\?)))++) # At least one modifier\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name",
"captures": {
"1": {
"patterns": [
{
"match": "public|private|protected|static",
"name": "storage.modifier.php"
}
]
},
"2": {
"patterns": [
{
"include": "#php-types"
}
]
},
"3": {
"name": "variable.other.php"
},
"4": {
"name": "punctuation.definition.variable.php"
}
}
},
{
"include": "#invoke-call"
},
{
"include": "#scope-resolution"
},
{
"include": "#variables"
},
{
"include": "#strings"
},
{
"captures": {
"1": {
"name": "support.function.construct.php"
},
"2": {
"name": "punctuation.definition.array.begin.bracket.round.php"
},
"3": {
"name": "punctuation.definition.array.end.bracket.round.php"
}
},
"match": "(array)(\\()(\\))",
"name": "meta.array.empty.php"
},
{
"begin": "(array)\\s*(\\()",
"beginCaptures": {
"1": {
"name": "support.function.construct.php"
},
"2": {
"name": "punctuation.definition.array.begin.bracket.round.php"
}
},
"end": "\\)|(?=\\?>)",
"endCaptures": {
"0": {
"name": "punctuation.definition.array.end.bracket.round.php"
}
},
"name": "meta.array.php",
"patterns": [
{
"include": "$self"
}
]
},
{
"match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))",
"captures": {
"1": {
"name": "punctuation.definition.storage-type.begin.bracket.round.php"
},
"2": {
"name": "storage.type.php"
},
"3": {
"name": "punctuation.definition.storage-type.end.bracket.round.php"
}
}
},
{
"match": "(?i)\\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|var|function|interface|trait|parent|self|object|mixed)\\b",
"name": "storage.type.php"
},
{
"match": "(?i)\\b(global|abstract|const|extends|implements|final|private|protected|public|static)\\b",
"name": "storage.modifier.php"
},
{
"include": "#object"
},
{
"match": ";",
"name": "punctuation.terminator.expression.php"
},
{
"match": ":",
"name": "punctuation.terminator.statement.php"
},
{
"include": "#heredoc"
},
{
"include": "#numbers"
},
{
"match": "(?i)\\bclone\\b",
"name": "keyword.other.clone.php"
},
{
"match": "\\.\\.\\.",
"name": "keyword.operator.spread.php"
},
{
"match": "\\.=?",
"name": "keyword.operator.string.php"
},
{
"match": "=>",
"name": "keyword.operator.key.php"
},
{
"captures": {
"1": {
"name": "keyword.operator.assignment.php"
},
"2": {
"name": "storage.modifier.reference.php"
},
"3": {
"name": "storage.modifier.reference.php"
}
},
"match": "(?i)(\\=)(&)|(&)(?=[$a-z_])"
},
{
"match": "@",
"name": "keyword.operator.error-control.php"
},
{
"match": "===|==|!==|!=|<>",
"name": "keyword.operator.comparison.php"
},
{
"match": "=|\\+=|\\-=|\\*\\*?=|/=|%=|&=|\\|=|\\^=|<<=|>>=|\\?\\?=",
"name": "keyword.operator.assignment.php"
},
{
"match": "<=>|<=|>=|<|>",
"name": "keyword.operator.comparison.php"
},
{
"match": "\\-\\-|\\+\\+",
"name": "keyword.operator.increment-decrement.php"
},
{
"match": "\\-|\\+|\\*\\*?|/|%",
"name": "keyword.operator.arithmetic.php"
},
{
"match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b",
"name": "keyword.operator.logical.php"
},
{
"include": "#function-call"
},
{
"match": "<<|>>|~|\\^|&|\\|",
"name": "keyword.operator.bitwise.php"
},
{
"begin": "(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])",
"beginCaptures": {
"1": {
"name": "keyword.operator.type.php"
}
},
"end": "(?i)(?=[^\\\\$a-z0-9_\\x{7f}-\\x{7fffffff}])",
"patterns": [
{
"include": "#class-name"
},
{
"include": "#variable-name"
}
]
},
{
"include": "#instantiation"
},
{
"captures": {
"1": {
"name": "keyword.control.goto.php"
},
"2": {
"name": "support.other.php"
}
},
"match": "(?i)(goto)\\s+([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)"
},
{
"captures": {
"1": {
"name": "entity.name.goto-label.php"
}
},
"match": "(?i)^\\s*([a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*)\\s*:(?!:)"
},
{
"include": "#string-backtick"
},
{
"include": "#ternary_shorthand"
},
{
"include": "#null_coalescing"
},
{
"include": "#ternary_expression"
},
{
"begin": "{",
"beginCaptures": {
"0": {
"name": "punctuation.definition.begin.bracket.curly.php"
}
},
"end": "}|(?=\\?>)",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.curly.php"
}
},
"patterns": [
{
"include": "$self"
}
]