mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 23:35:54 +01:00
Update grammars (#305181)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"git": {
|
||||
"name": "language-php",
|
||||
"repositoryUrl": "https://github.com/KapitanOczywisty/language-php",
|
||||
"commitHash": "a0f3d9a3b0d017181455ed515e48a36607a90e3b"
|
||||
"commitHash": "cd607a522b79c457fe78bf7a1b04511d1c49f693"
|
||||
}
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"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/KapitanOczywisty/language-php/commit/a0f3d9a3b0d017181455ed515e48a36607a90e3b",
|
||||
"version": "https://github.com/KapitanOczywisty/language-php/commit/cd607a522b79c457fe78bf7a1b04511d1c49f693",
|
||||
"scopeName": "source.php",
|
||||
"patterns": [
|
||||
{
|
||||
@@ -118,7 +118,7 @@
|
||||
"include": "#scope-resolution"
|
||||
},
|
||||
{
|
||||
"match": "(?xi)\n\\b(as)\n\\s+(final|abstract|public|private|protected|static)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)",
|
||||
"match": "(?xi)\n\\b(as)\n\\s+(\n (final|abstract)\n |(public|private|protected)\n |(static)\n)\n\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.other.use-as.php"
|
||||
@@ -127,6 +127,15 @@
|
||||
"name": "storage.modifier.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.inheritance.${3:/downcase}.php"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.modifier.visibility.${4:/downcase}.php"
|
||||
},
|
||||
"5": {
|
||||
"name": "storage.modifier.static.php"
|
||||
},
|
||||
"6": {
|
||||
"name": "entity.other.alias.php"
|
||||
}
|
||||
}
|
||||
@@ -140,8 +149,19 @@
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "^(?:final|abstract|public|private|protected|static)$",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?xi)\n\\b(?:\n (final|abstract)\n |(public|private|protected)\n |(static)\n)\\b",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.inheritance.${1:/downcase}.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.visibility.${2:/downcase}.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.static.php"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": ".+",
|
||||
@@ -299,12 +319,15 @@
|
||||
"contentName": "meta.enum.body.php",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?i)\\b(case)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)",
|
||||
"match": "(?i)\\b((case))\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.type.enum.case.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "constant.enum.php"
|
||||
}
|
||||
}
|
||||
@@ -320,17 +343,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?ix)\n(?:\n \\b((?:(?:final|abstract|readonly)\\s+)*)(class)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*(?:(readonly)\\s+)?\\b(class)\\b # anonymous class\n)",
|
||||
"begin": "(?ix)\n(?:\n \\b((?:(?:final|abstract|readonly)\\s+)*)(class)\\s+([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\n |\\b(new)\\b\\s*(\\#\\[.*\\])?\\s*(?:((readonly))\\s+)?\\b(class)\\b # anonymous class\n)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "final|abstract",
|
||||
"name": "storage.modifier.${0:/downcase}.php"
|
||||
},
|
||||
{
|
||||
"match": "readonly",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?i)(final|abstract)|(readonly)",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.inheritance.${1:/downcase}.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.readonly.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -354,6 +381,9 @@
|
||||
"name": "storage.modifier.php"
|
||||
},
|
||||
"7": {
|
||||
"name": "storage.modifier.readonly.php"
|
||||
},
|
||||
"8": {
|
||||
"name": "storage.type.class.php"
|
||||
}
|
||||
},
|
||||
@@ -663,8 +693,16 @@
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "final|abstract|public|private|protected",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?i)(final|abstract)|(public|private|protected)",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.inheritance.${1:/downcase}.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.visibility.${2:/downcase}.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -703,8 +741,19 @@
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?:public|private|protected)(?:\\(set\\))?|readonly",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?xi)\n\\b((public|private|protected)\\(set\\))\n|\\b(public|private|protected)\\b\n|\\b(readonly)\\b",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.visibility.set.${2:/downcase}.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.visibility.${3:/downcase}.php"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.modifier.readonly.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -755,8 +804,19 @@
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "final|abstract|public|private|protected|static",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?xi)\n(final|abstract)\n|(public|private|protected)\n|(static)",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.inheritance.${1:/downcase}.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.visibility.${2:/downcase}.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.static.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -814,8 +874,19 @@
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?:public|private|protected)(?:\\(set\\))?|static|readonly",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?xi)\n\\b((public|private|protected)\\(set\\))\n|\\b(public|private|protected)\\b\n|\\b(readonly|static)\\b",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.visibility.set.${2:/downcase}.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.visibility.${3:/downcase}.php"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.modifier.${4:/downcase}.php"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -885,7 +956,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "(?i)(\\()\\s*(array|real|double|float|int(?:eger)?|bool(?:ean)?|string|object|binary|unset)\\s*(\\))",
|
||||
"match": "(?ix)\n(\\()\n\\s*\n(\n (bool|int|float|string|array|object)\n |(binary|boolean|integer|double|real|unset)\n)\n\\s*\n(\\))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.storage-type.begin.bracket.round.php"
|
||||
@@ -894,6 +965,9 @@
|
||||
"name": "storage.type.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.type.cast.${3:/downcase}.php"
|
||||
},
|
||||
"5": {
|
||||
"name": "punctuation.definition.storage-type.end.bracket.round.php"
|
||||
}
|
||||
}
|
||||
@@ -907,8 +981,22 @@
|
||||
"name": "storage.type.const.php"
|
||||
},
|
||||
{
|
||||
"match": "(?i)\\b(global|abstract|final|private|protected|public|static)\\b",
|
||||
"name": "storage.modifier.php"
|
||||
"match": "(?xi)\n\\b(?:\n (global)\n |(abstract|final)\n |(private|protected|public)\n |(static)\n)\\b",
|
||||
"name": "storage.modifier.php",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "storage.modifier.global.php"
|
||||
},
|
||||
"2": {
|
||||
"name": "storage.modifier.inheritance.${2:/downcase}.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.visibility.${3:/downcase}.php"
|
||||
},
|
||||
"4": {
|
||||
"name": "storage.modifier.static.php"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#object"
|
||||
@@ -2823,14 +2911,17 @@
|
||||
"1": {
|
||||
"name": "keyword.other.phpdoc.php"
|
||||
},
|
||||
"3": {
|
||||
"2": {
|
||||
"name": "storage.modifier.php"
|
||||
},
|
||||
"3": {
|
||||
"name": "storage.modifier.visibility.${3:/downcase}.php"
|
||||
},
|
||||
"4": {
|
||||
"name": "invalid.illegal.wrong-access-type.phpdoc.php"
|
||||
}
|
||||
},
|
||||
"match": "^\\s*\\*\\s*(@access)\\s+((public|private|protected)|(.+))\\s*$"
|
||||
"match": "^\\s*\\*\\s*(@access)\\s+(?i:((public|private|protected))|(.+))\\s*$"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
@@ -3251,6 +3342,9 @@
|
||||
"match": "\\\\[\\\\'`\"]",
|
||||
"name": "constant.character.escape.php"
|
||||
},
|
||||
{
|
||||
"match": "N(?=')"
|
||||
},
|
||||
{
|
||||
"match": "`(?=((\\\\`)|[^`'])*('|$))",
|
||||
"name": "string.quoted.other.backtick.unclosed.sql"
|
||||
|
||||
Reference in New Issue
Block a user