Update grammars (#206330)

This commit is contained in:
Alex Ross 2024-02-27 12:14:40 +01:00 committed by GitHub
parent 82bba2e78b
commit e9a8b6add5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 188 additions and 58 deletions

View File

@ -6,7 +6,7 @@
"git": { "git": {
"name": "dart-lang/dart-syntax-highlight", "name": "dart-lang/dart-syntax-highlight",
"repositoryUrl": "https://github.com/dart-lang/dart-syntax-highlight", "repositoryUrl": "https://github.com/dart-lang/dart-syntax-highlight",
"commitHash": "0a6648177bdbb91a4e1a38c16e57ede0ccba4f18" "commitHash": "272e2f89f85073c04b7e15b582257f76d2489970"
} }
}, },
"licenseDetail": [ "licenseDetail": [

View File

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/0a6648177bdbb91a4e1a38c16e57ede0ccba4f18", "version": "https://github.com/dart-lang/dart-syntax-highlight/commit/272e2f89f85073c04b7e15b582257f76d2489970",
"name": "Dart", "name": "Dart",
"scopeName": "source.dart", "scopeName": "source.dart",
"patterns": [ "patterns": [
@ -308,7 +308,7 @@
}, },
{ {
"name": "keyword.control.dart", "name": "keyword.control.dart",
"match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while|when)\\b(?!\\$)" "match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|switch|while|when)\\b(?!\\$)"
}, },
{ {
"name": "keyword.control.dart", "name": "keyword.control.dart",
@ -322,9 +322,13 @@
"name": "keyword.control.new.dart", "name": "keyword.control.new.dart",
"match": "(?<!\\$)\\b(new)\\b(?!\\$)" "match": "(?<!\\$)\\b(new)\\b(?!\\$)"
}, },
{
"name": "keyword.control.return.dart",
"match": "(?<!\\$)\\b(return)\\b(?!\\$)"
},
{ {
"name": "keyword.declaration.dart", "name": "keyword.declaration.dart",
"match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension type|extension|external|factory|implements|get(?!\\()|mixin|native|operator|set(?!\\()|typedef|with|covariant)\\b(?!\\$)" "match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension type|extension|external|factory|implements|get(?![(<])|mixin|native|operator|set(?![(<])|typedef|with|covariant)\\b(?!\\$)"
}, },
{ {
"name": "storage.modifier.dart", "name": "storage.modifier.dart",

View File

@ -6,12 +6,12 @@
"git": { "git": {
"name": "go-syntax", "name": "go-syntax",
"repositoryUrl": "https://github.com/worlpaker/go-syntax", "repositoryUrl": "https://github.com/worlpaker/go-syntax",
"commitHash": "de0edabe11035e7035155c68eddc5817d5ec4af9" "commitHash": "f53c71e58787fb719399b7c38a08bceaa0c0e2d9"
} }
}, },
"license": "MIT", "license": "MIT",
"description": "The file syntaxes/go.tmLanguage.json is from https://github.com/worlpaker/go-syntax, which in turn was derived from https://github.com/jeff-hykin/better-go-syntax.", "description": "The file syntaxes/go.tmLanguage.json is from https://github.com/worlpaker/go-syntax, which in turn was derived from https://github.com/jeff-hykin/better-go-syntax.",
"version": "0.5.6" "version": "0.6.1"
} }
], ],
"version": 1 "version": 1

View File

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/worlpaker/go-syntax/commit/de0edabe11035e7035155c68eddc5817d5ec4af9", "version": "https://github.com/worlpaker/go-syntax/commit/f53c71e58787fb719399b7c38a08bceaa0c0e2d9",
"name": "Go", "name": "Go",
"scopeName": "source.go", "scopeName": "source.go",
"patterns": [ "patterns": [
@ -499,7 +499,7 @@
"comment": "Note that the order here is very important!", "comment": "Note that the order here is very important!",
"patterns": [ "patterns": [
{ {
"match": "((?:\\*|&)+)(?:(?!\\d)(?=(?:[\\w\\[\\]])|(?:\\<\\-)))", "match": "((?:\\*|\\&)+)(?:(?!\\d)(?=(?:[\\w\\[\\]])|(?:\\<\\-)))",
"name": "keyword.operator.address.go" "name": "keyword.operator.address.go"
}, },
{ {
@ -1185,12 +1185,7 @@
"name": "entity.name.function.go" "name": "entity.name.function.go"
} }
] ]
}, }
"patterns": [
{
"include": "#type-declarations"
}
]
}, },
"end": "(?:(?<=\\))\\s*((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b))[\\w\\.\\-\\*\\[\\]]+)?\\s*(?=\\{))", "end": "(?:(?<=\\))\\s*((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b))[\\w\\.\\-\\*\\[\\]]+)?\\s*(?=\\{))",
"endCaptures": { "endCaptures": {
@ -1261,7 +1256,7 @@
}, },
{ {
"comment": "single function as a type returned type(s) declaration", "comment": "single function as a type returned type(s) declaration",
"match": "(?:(?<=\\))\\s+((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?[\\w\\*\\.\\[\\]\\<\\>\\-]+(?:\\s*)(?:\\/(?:\\/|\\*).*)?)$)", "match": "(?:(?<=\\))(?:\\s*)((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?[\\w\\*\\.\\[\\]\\<\\>\\-]+(?:\\s*)(?:\\/(?:\\/|\\*).*)?)$)",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1272,7 +1267,7 @@
"include": "#parameter-variable-types" "include": "#parameter-variable-types"
}, },
{ {
"match": "(?:\\w+)", "match": "\\w+",
"name": "entity.name.type.go" "name": "entity.name.type.go"
} }
] ]
@ -1513,7 +1508,7 @@
}, },
"functions_inline": { "functions_inline": {
"comment": "functions in-line with multi return types", "comment": "functions in-line with multi return types",
"match": "(?:(\\bfunc\\b)((?:\\((?:[^/]*)\\))(?:\\s+)(?:\\((?:[^/]*)\\)))(?:\\s+)(?=\\{))", "match": "(?:(\\bfunc\\b)((?:\\((?:[^/]*?)\\))(?:\\s+)(?:\\((?:[^/]*?)\\)))(?:\\s+)(?=\\{))",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.function.go" "name": "keyword.function.go"
@ -1571,7 +1566,7 @@
}, },
"support_functions": { "support_functions": {
"comment": "Support Functions", "comment": "Support Functions",
"match": "(?:(?:((?<=\\.)\\w+)|(\\w+))(\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}\"\\']+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?(?=\\())", "match": "(?:(?:((?<=\\.)\\b\\w+)|(\\b\\w+))(\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}\"\\']+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?(?=\\())",
"captures": { "captures": {
"1": { "1": {
"name": "entity.name.function.support.go" "name": "entity.name.function.support.go"
@ -1867,11 +1862,18 @@
"patterns": [ "patterns": [
{ {
"comment": "Struct variable for struct in struct types", "comment": "Struct variable for struct in struct types",
"begin": "(?:\\s*)?([\\s\\,\\w]+)(?:\\s+)(?:(?:[\\[\\]\\*])+)?(\\bstruct\\b)\\s*(\\{)", "begin": "(?:(\\w+(?:\\,\\s*\\w+)*)(?:\\s+)(?:(?:[\\[\\]\\*])+)?(\\bstruct\\b)(?:\\s*)(\\{))",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"match": "(?:\\w+)", "patterns": [
"name": "variable.other.property.go" {
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.go"
}
]
}, },
"2": { "2": {
"name": "keyword.struct.go" "name": "keyword.struct.go"
@ -1911,6 +1913,42 @@
} }
}, },
"patterns": [ "patterns": [
{
"include": "#support_functions"
},
{
"include": "#type-declarations-without-brackets"
},
{
"begin": "(?:([\\w\\.\\*]+)?(\\[))",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "(?:\\w+)",
"name": "entity.name.type.go"
}
]
},
"2": {
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "\\]",
"endCaptures": {
"0": {
"name": "punctuation.definition.end.bracket.square.go"
}
},
"patterns": [
{
"include": "#generic_param_types"
}
]
},
{ {
"begin": "\\(", "begin": "\\(",
"beginCaptures": { "beginCaptures": {
@ -1927,18 +1965,12 @@
"patterns": [ "patterns": [
{ {
"include": "#function_param_types" "include": "#function_param_types"
},
{
"include": "$self"
} }
] ]
}, },
{ {
"include": "#support_functions" "comment": "other types",
}, "match": "([\\w\\.]+)",
{
"comment": "single declaration | with or declarations",
"match": "((?:\\s+\\|)?(?:[\\w\\.\\[\\]\\*]+)(?:\\s+\\|)?)",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1946,10 +1978,7 @@
"include": "#type-declarations" "include": "#type-declarations"
}, },
{ {
"include": "#generic_types" "match": "\\w+",
},
{
"match": "(?:\\w+)",
"name": "entity.name.type.go" "name": "entity.name.type.go"
} }
] ]
@ -2145,7 +2174,7 @@
}, },
"after_control_variables": { "after_control_variables": {
"comment": "After control variables, to not highlight as a struct/interface (before formatting with gofmt)", "comment": "After control variables, to not highlight as a struct/interface (before formatting with gofmt)",
"match": "(?:(?<=\\brange\\b|\\bswitch\\b|\\;|\\bif\\b|\\bfor\\b|\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\w(?:\\+|/|\\-|\\*|\\%)|\\w(?:\\+|/|\\-|\\*|\\%)\\=|\\|\\||\\&\\&)(?:\\s*)([[:alnum:]\\-\\_\\!\\.\\[\\]\\<\\>\\=\\*/\\+\\%\\:]+)(?:\\s*)(?=\\{))", "match": "(?:(?<=\\brange\\b|\\bswitch\\b|\\;|\\bif\\b|\\bfor\\b|\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\w(?:\\+|/|\\-|\\*|\\%)|\\w(?:\\+|/|\\-|\\*|\\%)\\=|\\|\\||\\&\\&)(?:\\s*)((?![\\[\\]]+)[[:alnum:]\\-\\_\\!\\.\\[\\]\\<\\>\\=\\*/\\+\\%\\:]+)(?:\\s*)(?=\\{))",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -2234,7 +2263,7 @@
}, },
{ {
"comment": "make keyword", "comment": "make keyword",
"match": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?(?:\\[(?:[^\\]]+)?\\])?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?)?((?:\\,\\s*(?:[\\w\\.\\(\\)]+)?)+)?(\\))))", "match": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?(?:\\[(?:[^\\]]+)?\\])?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?)?((?:\\,\\s*(?:[\\w\\.\\(\\)/\\+\\-\\<\\>\\&\\|\\%\\*]+)?)+)?(\\))))",
"captures": { "captures": {
"1": { "1": {
"name": "entity.name.function.support.builtin.go" "name": "entity.name.function.support.builtin.go"
@ -2291,6 +2320,7 @@
} }
}, },
"switch_types": { "switch_types": {
"comment": "switch type assertions, only highlights types after case keyword",
"begin": "(?<=\\bswitch\\b)(?:\\s*)(?:(\\w+\\s*\\:\\=)?\\s*([\\w\\.\\*\\(\\)\\[\\]]+))(\\.\\(\\btype\\b\\)\\s*)(\\{)", "begin": "(?<=\\bswitch\\b)(?:\\s*)(?:(\\w+\\s*\\:\\=)?\\s*([\\w\\.\\*\\(\\)\\[\\]]+))(\\.\\(\\btype\\b\\)\\s*)(\\{)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
@ -2299,7 +2329,7 @@
"include": "#operators" "include": "#operators"
}, },
{ {
"match": "(?:\\w+)", "match": "\\w+",
"name": "variable.other.assignment.go" "name": "variable.other.assignment.go"
} }
] ]
@ -2313,7 +2343,7 @@
"include": "#type-declarations" "include": "#type-declarations"
}, },
{ {
"match": "(?:\\w+)", "match": "\\w+",
"name": "variable.other.go" "name": "variable.other.go"
} }
] ]
@ -2344,9 +2374,7 @@
}, },
"patterns": [ "patterns": [
{ {
"include": "#type-declarations" "comment": "types after case keyword with single line",
},
{
"match": "(?:^\\s*(\\bcase\\b))(?:\\s+)([\\w\\.\\,\\*\\=\\<\\>\\!\\s]+)(:)(\\s*/(?:/|\\*)\\s*.*)?$", "match": "(?:^\\s*(\\bcase\\b))(?:\\s+)([\\w\\.\\,\\*\\=\\<\\>\\!\\s]+)(:)(\\s*/(?:/|\\*)\\s*.*)?$",
"captures": { "captures": {
"1": { "1": {
@ -2375,6 +2403,30 @@
} }
} }
}, },
{
"comment": "types after case keyword with multi lines",
"begin": "\\bcase\\b",
"beginCaptures": {
"0": {
"name": "keyword.control.go"
}
},
"end": "\\:",
"endCaptures": {
"0": {
"name": "punctuation.other.colon.go"
}
},
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
}
]
},
{ {
"include": "$self" "include": "$self"
} }
@ -2573,7 +2625,7 @@
} }
}, },
"switch_select_case_variables": { "switch_select_case_variables": {
"comment": "variables after case control keyword in switch/select expression", "comment": "variables after case control keyword in switch/select expression, to not scope them as property variables",
"match": "(?:(?:^\\s*(\\bcase\\b))(?:\\s+)([\\s\\S]+(?:\\:)\\s*(?:/(?:/|\\*).*)?)$)", "match": "(?:(?:^\\s*(\\bcase\\b))(?:\\s+)([\\s\\S]+(?:\\:)\\s*(?:/(?:/|\\*).*)?)$)",
"captures": { "captures": {
"1": { "1": {
@ -2587,6 +2639,9 @@
{ {
"include": "#support_functions" "include": "#support_functions"
}, },
{
"include": "#variable_assignment"
},
{ {
"match": "\\w+", "match": "\\w+",
"name": "variable.other.go" "name": "variable.other.go"
@ -2710,7 +2765,7 @@
}, },
"double_parentheses_types": { "double_parentheses_types": {
"comment": "double parentheses types", "comment": "double parentheses types",
"match": "(?:(\\((?:[\\w\\.\\[\\]\\*\\&]+)\\))(?=\\())", "match": "(?:(?<!\\w)(\\((?:[\\w\\.\\[\\]\\*\\&]+)\\))(?=\\())",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -2742,16 +2797,9 @@
} }
}, },
"other_variables": { "other_variables": {
"match": "(?:\\w+)", "comment": "all other variables",
"name": "variable.other.go", "match": "\\w+",
"patterns": [ "name": "variable.other.go"
{
"include": "#storage_types"
},
{
"include": "$self"
}
]
} }
} }
} }

View File

@ -6,11 +6,11 @@
"git": { "git": {
"name": "jlelong/vscode-latex-basics", "name": "jlelong/vscode-latex-basics",
"repositoryUrl": "https://github.com/jlelong/vscode-latex-basics", "repositoryUrl": "https://github.com/jlelong/vscode-latex-basics",
"commitHash": "69915f318570484ef40ed8798c73c63c58704183" "commitHash": "45c7b12ee68563afd50407e5eac02d30d33dbe7a"
} }
}, },
"license": "MIT", "license": "MIT",
"version": "1.5.4", "version": "1.6.0",
"description": "The files in syntaxes/ were originally part of https://github.com/James-Yu/LaTeX-Workshop. They have been extracted in the hope that they can useful outside of the LaTeX-Workshop extension.", "description": "The files in syntaxes/ were originally part of https://github.com/James-Yu/LaTeX-Workshop. They have been extracted in the hope that they can useful outside of the LaTeX-Workshop extension.",
"licenseDetail": [ "licenseDetail": [
"Copyright (c) vscode-latex-basics authors", "Copyright (c) vscode-latex-basics authors",

View File

@ -6,7 +6,7 @@
"git": { "git": {
"name": "dotnet/razor", "name": "dotnet/razor",
"repositoryUrl": "https://github.com/dotnet/razor", "repositoryUrl": "https://github.com/dotnet/razor",
"commitHash": "b44d0a906d054d2d343adc3f58cbea11d97d7488" "commitHash": "f01e110af179981942987384d2b5d4e489eab014"
} }
}, },
"license": "MIT", "license": "MIT",

View File

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/dotnet/razor/commit/b44d0a906d054d2d343adc3f58cbea11d97d7488", "version": "https://github.com/dotnet/razor/commit/f01e110af179981942987384d2b5d4e489eab014",
"name": "ASP.NET Razor", "name": "ASP.NET Razor",
"scopeName": "text.html.cshtml", "scopeName": "text.html.cshtml",
"patterns": [ "patterns": [
@ -527,6 +527,15 @@
}, },
{ {
"include": "#using-directive" "include": "#using-directive"
},
{
"include": "#rendermode-directive"
},
{
"include": "#preservewhitespace-directive"
},
{
"include": "#typeparam-directive"
} }
] ]
}, },
@ -851,6 +860,75 @@
} }
} }
}, },
"rendermode-directive": {
"name": "meta.directive",
"match": "(@)(rendermode)\\s+([^$]+)?",
"captures": {
"1": {
"patterns": [
{
"include": "#transition"
}
]
},
"2": {
"name": "keyword.control.razor.directive.rendermode"
},
"3": {
"patterns": [
{
"include": "source.cs#type"
}
]
}
}
},
"preservewhitespace-directive": {
"name": "meta.directive",
"match": "(@)(preservewhitespace)\\s+([^$]+)?",
"captures": {
"1": {
"patterns": [
{
"include": "#transition"
}
]
},
"2": {
"name": "keyword.control.razor.directive.preservewhitespace"
},
"3": {
"patterns": [
{
"include": "source.cs#boolean-literal"
}
]
}
}
},
"typeparam-directive": {
"name": "meta.directive",
"match": "(@)(typeparam)\\s+([^$]+)?",
"captures": {
"1": {
"patterns": [
{
"include": "#transition"
}
]
},
"2": {
"name": "keyword.control.razor.directive.typeparam"
},
"3": {
"patterns": [
{
"include": "source.cs#type"
}
]
}
}
},
"attribute-directive": { "attribute-directive": {
"name": "meta.directive", "name": "meta.directive",
"begin": "(@)(attribute)\\b\\s+", "begin": "(@)(attribute)\\b\\s+",

View File

@ -6,12 +6,12 @@
"git": { "git": {
"name": "atom/language-sass", "name": "atom/language-sass",
"repositoryUrl": "https://github.com/atom/language-sass", "repositoryUrl": "https://github.com/atom/language-sass",
"commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47" "commitHash": "303bbf0c250fe380b9e57375598cfd916110758b"
} }
}, },
"license": "MIT", "license": "MIT",
"description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.", "description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
"version": "0.62.1" "version": "0.61.4"
} }
], ],
"version": 1 "version": 1