mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Updated grammars
This commit is contained in:
@@ -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/atom/language-java/commit/295af4375e4a5da4a4352fa08a8bb3e17145ec47",
|
||||
"version": "https://github.com/atom/language-java/commit/95ebcd0b15c369666ecc4d1593495466132dd5bf",
|
||||
"name": "Java",
|
||||
"scopeName": "source.java",
|
||||
"patterns": [
|
||||
@@ -373,7 +373,7 @@
|
||||
"include": "#static-initializer"
|
||||
},
|
||||
{
|
||||
"include": "#methods"
|
||||
"include": "#class-fields-and-methods"
|
||||
},
|
||||
{
|
||||
"include": "#annotations"
|
||||
@@ -389,6 +389,22 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"class-fields-and-methods": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(?=\\=)",
|
||||
"end": "(?=;)",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#code"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#methods"
|
||||
}
|
||||
]
|
||||
},
|
||||
"code": {
|
||||
"patterns": [
|
||||
{
|
||||
@@ -442,6 +458,9 @@
|
||||
{
|
||||
"include": "#variables"
|
||||
},
|
||||
{
|
||||
"include": "#variables-local"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
@@ -479,9 +498,6 @@
|
||||
"match": "/\\*\\*/",
|
||||
"name": "comment.block.empty.java"
|
||||
},
|
||||
{
|
||||
"include": "text.html.javadoc"
|
||||
},
|
||||
{
|
||||
"include": "#comments-inline"
|
||||
}
|
||||
@@ -911,7 +927,7 @@
|
||||
"include": "#parens"
|
||||
},
|
||||
{
|
||||
"include": "#comments-inline"
|
||||
"include": "#comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -928,6 +944,9 @@
|
||||
},
|
||||
{
|
||||
"include": "#parens"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1496,12 +1515,12 @@
|
||||
]
|
||||
},
|
||||
"variables": {
|
||||
"begin": "(?x)\n(?=\n (\n \\b(void|boolean|byte|char|short|int|float|long|double)\\b\n |\n (?>(\\w+\\.)*[A-Z]+\\w*) # e.g. `javax.ws.rs.Response`, or `String`\n )\n (\n <[\\w<>,\\.?\\s\\[\\]]*> # e.g. `HashMap<Integer, String>`, or `List<java.lang.String>`\n )?\n (\n (\\[\\])* # int[][]\n )?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|;)\n)",
|
||||
"end": "(?=\\=|;)",
|
||||
"begin": "(?x)\n(?=\n (\n \\b(void|boolean|byte|char|short|int|float|long|double)\\b\n |\n (?>(\\w+\\.)*[A-Z]+\\w*) # e.g. `javax.ws.rs.Response`, or `String`\n )\n (\n <[\\w<>,\\.?\\s\\[\\]]*> # e.g. `HashMap<Integer, String>`, or `List<java.lang.String>`\n )?\n (\n (\\[\\])* # int[][]\n )?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|:|;)\n)",
|
||||
"end": "(?=\\=|:|;)",
|
||||
"name": "meta.definition.variable.java",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|=|,))",
|
||||
"match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|:|=|,))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.other.definition.java"
|
||||
@@ -1515,6 +1534,28 @@
|
||||
"include": "#code"
|
||||
}
|
||||
]
|
||||
},
|
||||
"variables-local": {
|
||||
"begin": "(?=\\b(var)\\b\\s+[A-Za-z_$][\\w$]*\\s*(=|:|;))",
|
||||
"end": "(?=\\=|:|;)",
|
||||
"name": "meta.definition.variable.local.java",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\bvar\\b",
|
||||
"name": "storage.type.local.java"
|
||||
},
|
||||
{
|
||||
"match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(=|:|;))",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.other.definition.java"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"include": "#code"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user