Skip to content

Commit

Permalink
Update grammars (microsoft#219070)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 authored Jun 28, 2024
1 parent f6f90e0 commit ed4e6ed
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 93 deletions.
2 changes: 1 addition & 1 deletion extensions/csharp/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "7a7482ffc72a6677a87eb1ed76005593a4f7f131"
"commitHash": "d63e2661d4e0c83b6c7810eb1d0eedc5da843b04"
}
},
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion extensions/csharp/syntaxes/csharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/dotnet/csharp-tmLanguage/commit/7a7482ffc72a6677a87eb1ed76005593a4f7f131",
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/d63e2661d4e0c83b6c7810eb1d0eedc5da843b04",
"name": "C#",
"scopeName": "source.cs",
"patterns": [
Expand Down Expand Up @@ -512,6 +512,9 @@
{
"include": "#type-name"
},
{
"include": "#type-arguments"
},
{
"include": "#attribute-arguments"
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/fsharp/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "ionide/ionide-fsgrammar",
"repositoryUrl": "https://github.com/ionide/ionide-fsgrammar",
"commitHash": "7d029a46f17637228b2ee85dd02e511c3e8039b3"
"commitHash": "0100f551f6c32598a58aba97344bf828673fec7a"
}
},
"license": "MIT",
Expand Down
13 changes: 8 additions & 5 deletions extensions/fsharp/syntaxes/fsharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/ionide/ionide-fsgrammar/commit/7d029a46f17637228b2ee85dd02e511c3e8039b3",
"version": "https://github.com/ionide/ionide-fsgrammar/commit/0100f551f6c32598a58aba97344bf828673fec7a",
"name": "fsharp",
"scopeName": "source.fsharp",
"patterns": [
Expand Down Expand Up @@ -617,7 +617,7 @@
},
{
"name": "constant.numeric.float.fsharp",
"match": "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
"match": "\\b-?[0-9][0-9_]*((\\.(?!\\.)([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
},
{
"name": "constant.numeric.integer.nativeint.fsharp",
Expand All @@ -635,7 +635,7 @@
},
"abstract_definition": {
"name": "abstract.definition.fsharp",
"begin": "\\b(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?",
"begin": "\\b(static)?\\s+(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?",
"end": "\\s*(with)\\b|=|$",
"beginCaptures": {
"1": {
Expand All @@ -645,6 +645,9 @@
"name": "keyword.fsharp"
},
"3": {
"name": "keyword.fsharp"
},
"4": {
"name": "support.function.attribute.fsharp"
},
"5": {
Expand Down Expand Up @@ -933,7 +936,7 @@
"patterns": [
{
"name": "binding.fsharp",
"begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"begin": "\\b(let mutable|static let mutable|static let|let inline|let|and|member val|member inline|static member inline|static member|default|member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\s*((with\\b)|(=|\\n+=|(?<=\\=)))",
"beginCaptures": {
"1": {
Expand Down Expand Up @@ -1008,7 +1011,7 @@
},
{
"name": "binding.fsharp",
"begin": "\\b(static val mutable|val mutable|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
"begin": "\\b(static val mutable|val mutable|val inline|val)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]+|(?<=,)\\s)*)?",
"end": "\\n$",
"beginCaptures": {
"1": {
Expand Down
4 changes: 2 additions & 2 deletions extensions/go/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"git": {
"name": "go-syntax",
"repositoryUrl": "https://github.com/worlpaker/go-syntax",
"commitHash": "092c45ec9a51fe40188408d1371f123eaa4796fa"
"commitHash": "21f28840e04d4fa04682d19d6fe64de437f40b64"
}
},
"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.",
"version": "0.6.8"
"version": "0.7.5"
}
],
"version": 1
Expand Down
113 changes: 40 additions & 73 deletions extensions/go/syntaxes/go.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/092c45ec9a51fe40188408d1371f123eaa4796fa",
"version": "https://github.com/worlpaker/go-syntax/commit/21f28840e04d4fa04682d19d6fe64de437f40b64",
"name": "Go",
"scopeName": "source.go",
"patterns": [
Expand Down Expand Up @@ -321,7 +321,7 @@
"name": "punctuation.definition.begin.bracket.square.go"
}
},
"end": "(?:(\\])((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?\\b(?:func|struct|map)\\b)(?:[\\*\\[\\]]+)?(?:[\\w\\.]+))?)",
"end": "(?:(\\])((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?!(?:[\\[\\]\\*]+)?\\b(?:func|struct|map)\\b)(?:[\\*\\[\\]]+)?(?:[\\w\\.]+)(?:\\[(?:(?:[\\w\\.\\*\\[\\]\\{\\}]+)(?:(?:\\,\\s*(?:[\\w\\.\\*\\[\\]\\{\\}]+))*))?\\])?)?)",
"endCaptures": {
"1": {
"name": "punctuation.definition.end.bracket.square.go"
Expand Down Expand Up @@ -1862,7 +1862,7 @@
},
{
"comment": "property variables and types",
"match": "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))([\\s\\S]+))",
"match": "(?:((?:(?:\\w+\\,\\s*)+)?(?:\\w+\\s+))([^\\`]+))",
"captures": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2007,6 +2007,29 @@
}
]
},
{
"comment": "one type only with multi line raw string",
"begin": "(?:((?:(?:\\s*(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?<!\\,\\s*)(?:[\\w\\.\\*]+)\\s*)(?=\\`))",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
}
]
}
},
"end": "(?=\\`)",
"patterns": [
{
"include": "#raw_string_literals"
}
]
},
{
"include": "#parameter-variable-types"
}
Expand Down Expand Up @@ -2192,7 +2215,7 @@
]
}
},
"end": "(?:(?<=\\])((?:\\s+)(?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b|\\bfunc\\b))[\\w\\.\\-\\*\\[\\]]+))?)",
"end": "(?:(?<=\\])((?:\\s+)(?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+)?(?:(?!(?:[\\[\\]\\*]+)?(?:\\bstruct\\b|\\binterface\\b|\\bfunc\\b))[\\w\\.\\-\\*\\[\\]]+(?:\\,\\s+[\\w\\.\\[\\]\\*]+)*))?)",
"endCaptures": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2271,6 +2294,9 @@
{
"include": "#struct_variables_types"
},
{
"include": "#interface_variables_types"
},
{
"include": "#type-declarations-without-brackets"
},
Expand Down Expand Up @@ -2439,7 +2465,7 @@
},
"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": {
"1": {
"patterns": [
Expand Down Expand Up @@ -2770,7 +2796,7 @@
},
"slice_index_variables": {
"comment": "slice index and capacity variables, to not scope them as property variables",
"match": "(?<=\\w\\[)((?:(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+\\:)|(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+))(?:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?(?:\\:\\b[\\w\\.\\*\\+/\\-\\*\\%\\<\\>\\|\\&]+)?)(?=\\])",
"match": "(?<=\\w\\[)((?:(?:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+\\:)|(?:\\:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+))(?:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+)?(?:\\:\\b[\\w\\.\\*\\+/\\-\\%\\<\\>\\|\\&]+)?)(?=\\])",
"captures": {
"1": {
"patterns": [
Expand All @@ -2786,8 +2812,8 @@
}
},
"property_variables": {
"comment": "Property variables in struct | parameter field in struct initialization",
"match": "(?:(?:((?:\\b[\\w\\.]+)(?:\\:(?!\\=))))(?:(?:\\s*([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))((?:\\s*(?:\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\|\\||\\&\\&|\\+|/|\\-|\\*|\\%|\\||\\&)\\s*(?:[\\w\\.\\*\\&\\[\\]]+)(?:\\.\\w+)(?![\\w\\.\\*\\&\\[\\]]*(?:\\{|\\()))*))?)",
"comment": "Property variables in struct",
"match": "((?:\\b[\\w\\.]+)(?:\\:(?!\\=)))",
"captures": {
"1": {
"patterns": [
Expand All @@ -2799,68 +2825,6 @@
"name": "variable.other.property.go"
}
]
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.go"
},
{
"include": "$self"
}
]
},
"3": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.field.go"
},
{
"include": "$self"
}
]
},
"4": {
"patterns": [
{
"match": "([\\w\\.\\*\\&\\[\\]]+)(\\.\\w+)",
"captures": {
"1": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.go"
}
]
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\w+",
"name": "variable.other.property.field.go"
}
]
}
}
},
{
"include": "$self"
}
]
}
}
},
Expand Down Expand Up @@ -2931,13 +2895,16 @@
},
"2": {
"patterns": [
{
"include": "#type-declarations"
},
{
"match": "\\binvalid\\b\\s+\\btype\\b",
"name": "invalid.field.go"
},
{
"include": "#type-declarations-without-brackets"
},
{
"include": "#parameter-variable-types"
},
{
"match": "\\w+",
"name": "entity.name.type.go"
Expand Down
8 changes: 4 additions & 4 deletions extensions/latex/syntaxes/LaTeX.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/jlelong/vscode-latex-basics/commit/3d141a124a16558958e95c54267f7ca37986de6f",
"version": "https://github.com/jlelong/vscode-latex-basics/commit/9cd6bc151f4b9df5d9aeb1e39e30071018d3cb2a",
"name": "LaTeX",
"scopeName": "text.tex.latex",
"patterns": [
Expand Down Expand Up @@ -2646,7 +2646,7 @@
]
},
{
"begin": "((\\\\)(?:\\w*[rR]ef\\*?))(\\{)",
"begin": "((\\\\)(?:\\w*[rR]ef\\*?))(?:\\[[^\\]]*\\])?(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.ref.latex"
Expand Down Expand Up @@ -3048,7 +3048,7 @@
"name": "punctuation.definition.variable.latex"
}
},
"match": "(\\\\)[cgl](?:[_\\p{Alphabetic}@]+)+_(?:bitset|clist|dim|fp|int|muskip|str|tl|bool|box|coffin|flag|fparray|intarray|ior|iow|prop|regex|seq)",
"match": "(\\\\)[cgl](?:[_\\p{Alphabetic}@]+)+_[a-z]+",
"name": "variable.other.latex3.latex"
},
{
Expand Down Expand Up @@ -3148,7 +3148,7 @@
"match": "\\s*((\\\\)(?:begin|end))(\\{)([a-zA-Z]*\\*?)(\\})(?:(\\[)([^\\]]*)(\\])){,2}(?:(\\{)([^{}]*)(\\}))?"
},
"definition-label": {
"begin": "((\\\\)label)((?:\\[[^\\[]*?\\])*)(\\{)",
"begin": "((\\\\)z?label)((?:\\[[^\\[]*?\\])*)(\\{)",
"beginCaptures": {
"1": {
"name": "keyword.control.label.latex"
Expand Down
2 changes: 1 addition & 1 deletion extensions/python/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "MagicStack/MagicPython",
"repositoryUrl": "https://github.com/MagicStack/MagicPython",
"commitHash": "c9b3409deb69acec31bbf7913830e93a046b30cc"
"commitHash": "7d0f2b22a5ad8fccbd7341bc7b7a715169283044"
}
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion extensions/swift/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "jtbandes/swift-tmlanguage",
"repositoryUrl": "https://github.com/jtbandes/swift-tmlanguage",
"commitHash": "ab893c684dd7eeb7c249139e29e931334316fda7"
"commitHash": "860eface4241cf9f2174d5fa690bd34389ac8d26"
}
},
"license": "MIT"
Expand Down
8 changes: 4 additions & 4 deletions extensions/swift/syntaxes/swift.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/jtbandes/swift-tmlanguage/commit/ab893c684dd7eeb7c249139e29e931334316fda7",
"version": "https://github.com/jtbandes/swift-tmlanguage/commit/860eface4241cf9f2174d5fa690bd34389ac8d26",
"name": "Swift",
"scopeName": "source.swift",
"comment": "See swift.tmbundle/grammar-test.swift for test cases.",
Expand Down Expand Up @@ -52,7 +52,7 @@
},
"patterns": [
{
"match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?",
"match": "\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))?",
"captures": {
"1": {
"name": "keyword.other.platform.os.swift"
Expand Down Expand Up @@ -580,7 +580,7 @@
}
},
{
"match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))",
"match": "\\b(os)\\s*(\\()\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\\w+)\\s*(\\))",
"captures": {
"1": {
"name": "keyword.other.condition.swift"
Expand Down Expand Up @@ -2586,7 +2586,7 @@
},
"patterns": [
{
"match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))",
"match": "\\s*\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\b(?:\\s+([0-9]+(?:\\.[0-9]+)*\\b))",
"captures": {
"1": {
"name": "keyword.other.platform.os.swift"
Expand Down

0 comments on commit ed4e6ed

Please sign in to comment.