Update grammars (#245340)

This commit is contained in:
Alex Ross
2025-04-02 15:41:58 +02:00
committed by GitHub
parent 4064f17252
commit 9a2c94d213
11 changed files with 547 additions and 392 deletions

View File

@@ -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/fbdaec061157e98dda185c0ce771ce6a2c793045",
"version": "https://github.com/worlpaker/go-syntax/commit/415b7167f2e5396284b65692ef8fd08a3475362a",
"name": "Go",
"scopeName": "source.go",
"patterns": [
@@ -618,6 +618,10 @@
{
"match": "\\bany\\b",
"name": "entity.name.type.any.go"
},
{
"match": "\\bcomparable\\b",
"name": "entity.name.type.comparable.go"
}
]
},
@@ -1757,7 +1761,7 @@
"include": "#after_control_variables"
},
{
"match": "(\\b[\\w\\.]+)(\\[(?:[^\\]]+)?\\])?(?=\\{)(?<!\\bstruct\\b|\\binterface\\b)",
"match": "(\\b[\\w\\.]+)(\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}]+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?(?=\\{)(?<!\\bstruct\\b|\\binterface\\b)",
"captures": {
"1": {
"patterns": [
@@ -1773,30 +1777,27 @@
"2": {
"patterns": [
{
"begin": "\\[",
"beginCaptures": {
"0": {
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.square.go"
}
},
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
},
{
"include": "$self"
}
]
"include": "#type-declarations-without-brackets"
},
{
"match": "\\[",
"name": "punctuation.definition.begin.bracket.square.go"
},
{
"match": "\\]",
"name": "punctuation.definition.end.bracket.square.go"
},
{
"match": "\\{",
"name": "punctuation.definition.begin.bracket.curly.go"
},
{
"match": "\\}",
"name": "punctuation.definition.end.bracket.curly.go"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
}
]
}
@@ -3037,7 +3038,7 @@
},
"double_parentheses_types": {
"comment": "double parentheses types",
"match": "(?:(?<!\\w)(\\((?:[\\w\\.\\[\\]\\*\\&]+)\\))(?=\\())",
"match": "(?:(?<!\\w)(\\((?:[\\[\\]\\*]+)?(?:[\\w\\.]+)(?:\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}]+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?\\))(?=\\())",
"captures": {
"1": {
"patterns": [
@@ -3060,6 +3061,14 @@
"match": "\\]",
"name": "punctuation.definition.end.bracket.square.go"
},
{
"match": "\\{",
"name": "punctuation.definition.begin.bracket.curly.go"
},
{
"match": "\\}",
"name": "punctuation.definition.end.bracket.curly.go"
},
{
"match": "\\w+",
"name": "entity.name.type.go"