From d8faa467a077952c0c67969dffcfca9d4a34dfba Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Mon, 26 Jul 2021 11:01:40 +0200 Subject: [PATCH] distinct token for string macro suffixes --- grammars/julia.cson | 8 ++++---- grammars/julia.json | 8 ++++---- grammars/julia_vscode.json | 8 ++++---- spec/julia-spec.coffee | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/grammars/julia.cson b/grammars/julia.cson index 2c557c9..f53d167 100644 --- a/grammars/julia.cson +++ b/grammars/julia.cson @@ -800,7 +800,7 @@ repository: "1": name: "punctuation.definition.string.end.julia" "2": - name: "punctuation.definition.string.end.julia" + name: "support.function.macro.julia" name: "string.quoted.other.julia" patterns: [ { @@ -820,7 +820,7 @@ repository: "1": name: "punctuation.definition.string.end.julia" "2": - name: "punctuation.definition.string.end.julia" + name: "support.function.macro.julia" name: "string.quoted.other.julia" patterns: [ { @@ -840,7 +840,7 @@ repository: "1": name: "punctuation.definition.string.end.julia" "2": - name: "punctuation.definition.string.end.julia" + name: "support.function.macro.julia" name: "string.interpolated.backtick.julia" patterns: [ { @@ -860,7 +860,7 @@ repository: "1": name: "punctuation.definition.string.end.julia" "2": - name: "punctuation.definition.string.end.julia" + name: "support.function.macro.julia" name: "string.interpolated.backtick.julia" patterns: [ { diff --git a/grammars/julia.json b/grammars/julia.json index 3fcbd99..ce6ce09 100644 --- a/grammars/julia.json +++ b/grammars/julia.json @@ -942,7 +942,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.quoted.other.julia", @@ -968,7 +968,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.quoted.other.julia", @@ -994,7 +994,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.interpolated.backtick.julia", @@ -1020,7 +1020,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.interpolated.backtick.julia", diff --git a/grammars/julia_vscode.json b/grammars/julia_vscode.json index 1a563be..f55ef74 100644 --- a/grammars/julia_vscode.json +++ b/grammars/julia_vscode.json @@ -942,7 +942,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.quoted.other.julia", @@ -968,7 +968,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.quoted.other.julia", @@ -994,7 +994,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.interpolated.backtick.julia", @@ -1020,7 +1020,7 @@ "name": "punctuation.definition.string.end.julia" }, "2": { - "name": "punctuation.definition.string.end.julia" + "name": "support.function.macro.julia" } }, "name": "string.interpolated.backtick.julia", diff --git a/spec/julia-spec.coffee b/spec/julia-spec.coffee index 5081604..f804336 100644 --- a/spec/julia-spec.coffee +++ b/spec/julia-spec.coffee @@ -523,7 +523,7 @@ describe "Julia grammar", -> expect(tokens[1]).toEqual value: '"', scopes: ["source.julia", "string.quoted.other.julia", "punctuation.definition.string.begin.julia"] expect(tokens[2]).toEqual value: "asdf", scopes: ["source.julia", "string.quoted.other.julia"] expect(tokens[3]).toEqual value: '"', scopes: ["source.julia", "string.quoted.other.julia", "punctuation.definition.string.end.julia"] - expect(tokens[4]).toEqual value: '_a9Ñ', scopes: ["source.julia", "string.quoted.other.julia", "punctuation.definition.string.end.julia"] + expect(tokens[4]).toEqual value: '_a9Ñ', scopes: ["source.julia", "string.quoted.other.julia", "support.function.macro.julia"] it "tokenizes Cxx.jl multiline string macros", -> tokens = grammar.tokenizeLines('''