From 3c86ede5f554f6e196c832394e126b291a1de606 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 13 Dec 2023 12:08:01 +0000 Subject: [PATCH] Update grammars (#200730) --- extensions/csharp/cgmanifest.json | 2 +- .../csharp/syntaxes/csharp.tmLanguage.json | 8 +- extensions/dart/cgmanifest.json | 2 +- extensions/dart/syntaxes/dart.tmLanguage.json | 16 +- extensions/fsharp/cgmanifest.json | 2 +- .../fsharp/syntaxes/fsharp.tmLanguage.json | 8 +- extensions/java/cgmanifest.json | 4 +- extensions/java/syntaxes/java.tmLanguage.json | 8 +- extensions/julia/cgmanifest.json | 2 +- .../julia/syntaxes/julia.tmLanguage.json | 151 +++-- extensions/latex/cgmanifest.json | 2 +- .../latex/syntaxes/LaTeX.tmLanguage.json | 126 ++-- extensions/latex/syntaxes/TeX.tmLanguage.json | 4 +- extensions/lua/cgmanifest.json | 2 +- extensions/lua/syntaxes/lua.tmLanguage.json | 23 +- extensions/markdown-basics/cgmanifest.json | 2 +- .../syntaxes/markdown.tmLanguage.json | 9 +- extensions/python/cgmanifest.json | 2 +- extensions/sql/cgmanifest.json | 4 +- extensions/sql/syntaxes/sql.tmLanguage.json | 4 +- .../test/colorize-results/test-166781_rs.json | 568 +++++++++--------- .../test/colorize-results/test_jl.json | 510 +--------------- 22 files changed, 543 insertions(+), 916 deletions(-) diff --git a/extensions/csharp/cgmanifest.json b/extensions/csharp/cgmanifest.json index ad27f27b271..0dceaebc966 100644 --- a/extensions/csharp/cgmanifest.json +++ b/extensions/csharp/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "dotnet/csharp-tmLanguage", "repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage", - "commitHash": "6666eb1d5e6fb565a4110d6db645cc534fb3c6d2" + "commitHash": "7bf5709ac1a713e340a618d1b41f44a043e393c6" } }, "license": "MIT", diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index 9b6cf2e9664..4e6a722d413 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -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/6666eb1d5e6fb565a4110d6db645cc534fb3c6d2", + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/7bf5709ac1a713e340a618d1b41f44a043e393c6", "name": "C#", "scopeName": "source.cs", "patterns": [ @@ -232,7 +232,7 @@ "include": "#try-statement" }, { - "include": "#checked-unchecked-statement" + "include": "#expression-operator-expression" }, { "include": "#context-control-statement" @@ -3824,7 +3824,7 @@ }, "char-character-escape": { "name": "constant.character.escape.cs", - "match": "\\\\(['\"\\\\0abfnrtv]|x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4})" + "match": "\\\\(x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4}|.)" }, "string-literal": { "name": "string.quoted.double.cs", @@ -3851,7 +3851,7 @@ }, "string-character-escape": { "name": "constant.character.escape.cs", - "match": "\\\\(['\"\\\\0abfnrtv]|x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4})" + "match": "\\\\(x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|.)" }, "verbatim-string-literal": { "name": "string.quoted.double.cs", diff --git a/extensions/dart/cgmanifest.json b/extensions/dart/cgmanifest.json index 0cfd30381b7..0086a5158e5 100644 --- a/extensions/dart/cgmanifest.json +++ b/extensions/dart/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "dart-lang/dart-syntax-highlight", "repositoryUrl": "https://github.com/dart-lang/dart-syntax-highlight", - "commitHash": "bd0079ba7ca85cdd6400a8a467e532b539d0f285" + "commitHash": "0a6648177bdbb91a4e1a38c16e57ede0ccba4f18" } }, "licenseDetail": [ diff --git a/extensions/dart/syntaxes/dart.tmLanguage.json b/extensions/dart/syntaxes/dart.tmLanguage.json index af7d3f6f913..ae4db9698e9 100644 --- a/extensions/dart/syntaxes/dart.tmLanguage.json +++ b/extensions/dart/syntaxes/dart.tmLanguage.json @@ -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/dart-lang/dart-syntax-highlight/commit/bd0079ba7ca85cdd6400a8a467e532b539d0f285", + "version": "https://github.com/dart-lang/dart-syntax-highlight/commit/0a6648177bdbb91a4e1a38c16e57ede0ccba4f18", "name": "Dart", "scopeName": "source.dart", "patterns": [ @@ -90,15 +90,7 @@ "end": "```" }, { - "match": "(`.*?`)", - "captures": { - "0": { - "name": "variable.other.source.dart" - } - } - }, - { - "match": "(`.*?`)", + "match": "(`[^`]+?`)", "captures": { "0": { "name": "variable.other.source.dart" @@ -395,6 +387,7 @@ "string-interp": { "patterns": [ { + "name": "string.interpolated.expression.dart", "match": "\\$([a-zA-Z0-9_]+)", "captures": { "1": { @@ -408,8 +401,7 @@ "end": "\\}", "patterns": [ { - "include": "#constants-and-special-vars", - "name": "variable.parameter.dart" + "include": "#constants-and-special-vars" }, { "include": "#strings" diff --git a/extensions/fsharp/cgmanifest.json b/extensions/fsharp/cgmanifest.json index 9e5553c2695..03dad6e72c9 100644 --- a/extensions/fsharp/cgmanifest.json +++ b/extensions/fsharp/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "ionide/ionide-fsgrammar", "repositoryUrl": "https://github.com/ionide/ionide-fsgrammar", - "commitHash": "078bbf85225b82de3ae4c2db7ee74d9239b249ce" + "commitHash": "472c6b2030c962217cbbb26e4ddcce1b8ffe0867" } }, "license": "MIT", diff --git a/extensions/fsharp/syntaxes/fsharp.tmLanguage.json b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json index d515173125d..20151138ccf 100644 --- a/extensions/fsharp/syntaxes/fsharp.tmLanguage.json +++ b/extensions/fsharp/syntaxes/fsharp.tmLanguage.json @@ -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/078bbf85225b82de3ae4c2db7ee74d9239b249ce", + "version": "https://github.com/ionide/ionide-fsgrammar/commit/472c6b2030c962217cbbb26e4ddcce1b8ffe0867", "name": "fsharp", "scopeName": "source.fsharp", "patterns": [ @@ -600,7 +600,7 @@ }, { "name": "comment.line.double-slash.fsharp", - "match": "(??@^|/])//(?![!%&+-.<=>?@^|]).*$" + "match": "(??@^|/])//(.*$)" } ] }, @@ -630,7 +630,7 @@ }, "abstract_definition": { "name": "abstract.definition.fsharp", - "begin": "\\b(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(:)", + "begin": "\\b(abstract)\\s+(member)?(\\s+\\[\\<.*\\>\\])?\\s*([_[:alpha:]0-9,\\._`\\s]+)(<)?", "end": "\\s*(with)\\b|=|$", "beginCaptures": { "1": { @@ -676,7 +676,7 @@ } }, { - "match": "(?!with|get|set\\b)\\b([\\w0-9'`^._]+)", + "match": "(?!with|get|set\\b)\\s*([\\w0-9'`^._]+)", "comments": "Here we need the \\w modifier in order to check that the words isn't blacklisted", "captures": { "1": { diff --git a/extensions/java/cgmanifest.json b/extensions/java/cgmanifest.json index 72e0c5c882b..ecfeb0eb668 100644 --- a/extensions/java/cgmanifest.json +++ b/extensions/java/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "redhat-developer/vscode-java", "repositoryUrl": "https://github.com/redhat-developer/vscode-java", - "commitHash": "5d224a552cf5f0f8ebccf69e43e2575ed2c13839" + "commitHash": "f09b712f5d6d6339e765f58c8dfab3f78a378183" } }, "license": "MIT", @@ -44,7 +44,7 @@ "suitability for any purpose." ], "description": "This grammar was derived from https://github.com/atom/language-java/blob/master/grammars/java.cson.", - "version": "1.22.0" + "version": "1.26.0" } ], "version": 1 diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index 7f969ccb787..54201a57c20 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.tmLanguage.json @@ -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/redhat-developer/vscode-java/commit/5d224a552cf5f0f8ebccf69e43e2575ed2c13839", + "version": "https://github.com/redhat-developer/vscode-java/commit/f09b712f5d6d6339e765f58c8dfab3f78a378183", "name": "Java", "scopeName": "source.java", "patterns": [ @@ -1598,11 +1598,7 @@ "name": "string.quoted.triple.java", "patterns": [ { - "match": "\\\\\"\"\"", - "name": "constant.character.escape.java" - }, - { - "match": "\\\\.", + "match": "(\\\\\"\"\")(?!\")|(\\\\.)", "name": "constant.character.escape.java" } ] diff --git a/extensions/julia/cgmanifest.json b/extensions/julia/cgmanifest.json index e9abeec7da0..f1efc7764f0 100644 --- a/extensions/julia/cgmanifest.json +++ b/extensions/julia/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "JuliaEditorSupport/atom-language-julia", "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", - "commitHash": "85cf3ef2ddcb7bc9b2b17b2a5f1fc664e1f1e718" + "commitHash": "8747e069119b24bff2703374d7961e3446a74034" } }, "license": "MIT", diff --git a/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json index 64c075d404e..c1b883e534d 100644 --- a/extensions/julia/syntaxes/julia.tmLanguage.json +++ b/extensions/julia/syntaxes/julia.tmLanguage.json @@ -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/JuliaEditorSupport/atom-language-julia/commit/85cf3ef2ddcb7bc9b2b17b2a5f1fc664e1f1e718", + "version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/8747e069119b24bff2703374d7961e3446a74034", "name": "Julia", "scopeName": "source.julia", "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", @@ -30,6 +30,9 @@ { "include": "#function_call" }, + { + "include": "#for_block" + }, { "include": "#keyword" }, @@ -76,11 +79,7 @@ "name": "constant.numeric.julia" }, { - "match": "\\bfor\\b", - "name": "keyword.control.julia" - }, - { - "include": "$self" + "include": "#self_no_for_block" } ] } @@ -106,7 +105,7 @@ }, "patterns": [ { - "include": "$self" + "include": "#self_no_for_block" } ] } @@ -115,8 +114,26 @@ "bracket": { "patterns": [ { - "match": "(?:\\(|\\)|\\[|\\]|\\{|\\}|,|;)(?!('|(?:\\.'))*\\.?')", - "name": "meta.bracket.julia" + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "meta.bracket.julia" + } + }, + "end": "(\\})((?:\\.)?'*)", + "endCaptures": { + "1": { + "name": "meta.bracket.julia" + }, + "2": { + "name": "keyword.operator.transpose.julia" + } + }, + "patterns": [ + { + "include": "#self_no_for_block" + } + ] } ] }, @@ -215,11 +232,7 @@ }, "patterns": [ { - "match": "\\bfor\\b", - "name": "keyword.control.julia" - }, - { - "include": "$self" + "include": "#self_no_for_block" } ] } @@ -259,14 +272,10 @@ } ] }, - "keyword": { + "for_block": { + "comment": "for blocks need to be special-cased to support tokenizing 'outer' properly", "patterns": [ { - "match": "\\b(?