on master help sign in
Julia queries: update grammar, fix breaking changes
commit77f11bf272b1e7286f1ad77cba29ede7393665c3 authorChristoph Horn <christoph-horn@hotmail.de> dateMon 22 Aug 2022, 14:22 (4 years ago) parent2b16fd4
3 files changed+22−14
languages.toml+1−1 runtime/queries/julia/highlights.scm+14−9 runtime/queries/julia/injections.scm+7−4
languages.toml+1−1
@@ -571,7 +571,7 @@ indent = { tab-width = 4, unit = " " }
571571
572572[[grammar]]
573573name = "julia"
574−source = { git = "https://github.com/tree-sitter/tree-sitter-julia", rev = "12ea597262125fc22fd2e91aa953ac69b19c26ca" }
574+source = { git = "https://github.com/tree-sitter/tree-sitter-julia", rev = "fc60b7cce87da7a1b7f8cb0f9371c3dc8b684500" }
575575
576576[[language]]
577577name = "java"
runtime/queries/julia/highlights.scm+14−9
@@ -1,10 +1,7 @@
11
2−[
3− (triple_string)
4− (string)
5−] @string
2+(string_literal) @string
63
7−(string
4+(prefixed_string_literal
85 prefix: (identifier) @constant.builtin)
96
107(macro_identifier) @function.macro
@@ -80,7 +77,9 @@
8077(struct_definition
8178 name: (identifier) @type)
8279
83−(number) @constant.numeric.integer
80+(integer_literal) @constant.numeric.integer
81+(float_literal) @constant.numeric.float
82+
8483(range_expression
8584 (identifier) @constant.numeric.integer
8685 (eq? @constant.numeric.integer "end"))
@@ -89,7 +88,10 @@
8988 (identifier) @constant.numeric.integer
9089 (eq? @constant.numeric.integer "end")))
9190(coefficient_expression
92− (number)
91+ [
92+ (integer_literal)
93+ (float_literal)
94+ ]
9395 (identifier) @constant.builtin)
9496
9597;; TODO: operators.
@@ -117,7 +119,10 @@
117119
118120(function_definition ["function" "end"] @keyword.function)
119121
120−(comment) @comment
122+[
123+ (line_comment)
124+ (block_comment)
125+] @comment
121126
122127[
123128 "const"
@@ -171,7 +176,7 @@
171176(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "false"))
172177
173178
174−["::" ":" "." "," "..." "!"] @punctuation.delimiter
179+["::" ":" "." "," "..."] @punctuation.delimiter
175180["[" "]" "(" ")" "{" "}"] @punctuation.bracket
176181
177182["="] @operator
runtime/queries/julia/injections.scm+7−4
@@ -1,5 +1,8 @@
1−((triple_string) @injection.content
2− (#set! injection.language "markdown"))
1+; ((string_literal) @injection.content
2+; (#set! injection.language "markdown"))
33
4−((comment) @injection.content
5− (#set! injection.language "comment"))
4+; ((line_comment) @injection.content
5+; (#set! injection.language "comment"))
6+
7+; ((block_comment) @injection.content
8+; (#set! injection.language "comment"))