mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Update Go grammar (#249525)
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/worlpaker/go-syntax/commit/415b7167f2e5396284b65692ef8fd08a3475362a",
|
||||
"version": "https://github.com/worlpaker/go-syntax/commit/0ce19cdf1cb5dab6aa99ccc933be9bd21e855ed1",
|
||||
"name": "Go",
|
||||
"scopeName": "source.go",
|
||||
"patterns": [
|
||||
@@ -219,7 +219,7 @@
|
||||
"name": "punctuation.definition.end.bracket.curly.go"
|
||||
},
|
||||
{
|
||||
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
|
||||
"begin": "([\\w\\.\\*]+)?(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -227,7 +227,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -315,7 +315,7 @@
|
||||
},
|
||||
"map_types": {
|
||||
"comment": "map types",
|
||||
"begin": "(?:(\\bmap\\b)(\\[))",
|
||||
"begin": "(\\bmap\\b)(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.map.go"
|
||||
@@ -515,7 +515,7 @@
|
||||
"comment": "Note that the order here is very important!",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "((?:\\*|\\&)+)(?:(?!\\d)(?=(?:[\\w\\[\\]])|(?:\\<\\-)))",
|
||||
"match": "(?<!\\w)(?:\\*|\\&)+(?:(?!\\d)(?=(?:[\\w\\[\\]])|(?:\\<\\-)))",
|
||||
"name": "keyword.operator.address.go"
|
||||
},
|
||||
{
|
||||
@@ -1096,7 +1096,7 @@
|
||||
"include": "#delimiters"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "variable.other.import.go"
|
||||
}
|
||||
]
|
||||
@@ -1180,7 +1180,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1218,7 +1218,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1245,7 +1245,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
|
||||
"begin": "([\\w\\.\\*]+)?(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -1253,7 +1253,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1369,7 +1369,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1377,7 +1377,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
|
||||
"begin": "([\\w\\.\\*]+)?(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -1385,7 +1385,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1435,7 +1435,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1517,7 +1517,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1528,7 +1528,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1536,7 +1536,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
|
||||
"begin": "([\\w\\.\\*]+)?(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -1544,7 +1544,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1586,7 +1586,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "other types",
|
||||
"match": "(?:\\b([\\w\\.]+))",
|
||||
"match": "\\b([\\w\\.]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -1594,7 +1594,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1608,7 +1608,7 @@
|
||||
},
|
||||
"functions": {
|
||||
"comment": "Functions",
|
||||
"begin": "(?:(\\bfunc\\b)(?=\\())",
|
||||
"begin": "(\\bfunc\\b)(?=\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.function.go"
|
||||
@@ -1632,7 +1632,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1695,7 +1695,7 @@
|
||||
"name": "punctuation.definition.end.bracket.curly.go"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1818,7 +1818,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1867,7 +1867,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1884,7 +1884,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "variable.other.property.go"
|
||||
}
|
||||
]
|
||||
@@ -1895,7 +1895,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1917,7 +1917,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "variable.other.property.go"
|
||||
}
|
||||
]
|
||||
@@ -1928,7 +1928,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1949,7 +1949,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -1966,7 +1966,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "variable.other.property.go"
|
||||
}
|
||||
]
|
||||
@@ -1980,7 +1980,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -2144,7 +2144,7 @@
|
||||
"include": "#type-declarations-without-brackets"
|
||||
},
|
||||
{
|
||||
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
|
||||
"begin": "([\\w\\.\\*]+)?(\\[)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
@@ -2152,7 +2152,7 @@
|
||||
"include": "#type-declarations"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
]
|
||||
@@ -2377,7 +2377,7 @@
|
||||
"include": "#parameter-variable-types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
}
|
||||
],
|
||||
@@ -2406,7 +2406,7 @@
|
||||
"name": "punctuation.definition.end.bracket.square.go"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "variable.other.go"
|
||||
}
|
||||
]
|
||||
@@ -2440,7 +2440,7 @@
|
||||
},
|
||||
{
|
||||
"comment": "new keyword",
|
||||
"begin": "(?:(\\bnew\\b)(\\())",
|
||||
"begin": "(\\bnew\\b)(\\()",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.support.builtin.go"
|
||||
@@ -2469,7 +2469,7 @@
|
||||
"include": "#generic_types"
|
||||
},
|
||||
{
|
||||
"match": "(?:\\w+)",
|
||||
"match": "\\w+",
|
||||
"name": "entity.name.type.go"
|
||||
},
|
||||
{
|
||||
@@ -2583,7 +2583,7 @@
|
||||
"name": "punctuation.definition.begin.bracket.curly.go"
|
||||
}
|
||||
},
|
||||
"end": "(?:\\})",
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.end.bracket.curly.go"
|
||||
|
||||
Reference in New Issue
Block a user