on master help sign in
Julia queries: update grammar, fix breaking changes
77f11bfChristoph Horn
languages.toml+1−1
@@ -571,7 +571,7 @@ indent = { tab-width = 4, unit = " " }
571
571
572[[grammar]]
572[[grammar]]
573name = "julia"
573name = "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" }
575
575
576[[language]]
576[[language]]
577name = "java"
577name = "java"
runtime/queries/julia/highlights.scm+14−9
@@ -1,10 +1,7 @@
1
1
2−[
3− (triple_string)
4− (string)
5−] @string
2+(string_literal) @string
6
3
7−(string
4+(prefixed_string_literal
8 prefix: (identifier) @constant.builtin)
5 prefix: (identifier) @constant.builtin)
9
6
10(macro_identifier) @function.macro
7(macro_identifier) @function.macro
@@ -80,7 +77,9 @@
80(struct_definition
77(struct_definition
81 name: (identifier) @type)
78 name: (identifier) @type)
82
79
83−(number) @constant.numeric.integer
80+(integer_literal) @constant.numeric.integer
81+(float_literal) @constant.numeric.float
82+
84(range_expression
83(range_expression
85 (identifier) @constant.numeric.integer
84 (identifier) @constant.numeric.integer
86 (eq? @constant.numeric.integer "end"))
85 (eq? @constant.numeric.integer "end"))
@@ -89,7 +88,10 @@
89 (identifier) @constant.numeric.integer
88 (identifier) @constant.numeric.integer
90 (eq? @constant.numeric.integer "end")))
89 (eq? @constant.numeric.integer "end")))
91(coefficient_expression
90(coefficient_expression
92− (number)
91+ [
92+ (integer_literal)
93+ (float_literal)
94+ ]
93 (identifier) @constant.builtin)
95 (identifier) @constant.builtin)
94
96
95;; TODO: operators.
97;; TODO: operators.
@@ -117,7 +119,10 @@
117
119
118(function_definition ["function" "end"] @keyword.function)
120(function_definition ["function" "end"] @keyword.function)
119
121
122+[
123+ (line_comment)
124+ (block_comment)
120−(comment) @comment
125+] @comment
121
126
122[
127[
123 "const"
128 "const"
@@ -171,7 +176,7 @@
171(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "false"))
176(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "false"))
172
177
173
178
174−["::" ":" "." "," "..." "!"] @punctuation.delimiter
179+["::" ":" "." "," "..."] @punctuation.delimiter
175["[" "]" "(" ")" "{" "}"] @punctuation.bracket
180["[" "]" "(" ")" "{" "}"] @punctuation.bracket
176
181
177["="] @operator
182["="] @operator
runtime/queries/julia/injections.scm+7−4
@@ -1,5 +1,8 @@
1−((triple_string) @injection.content
1+; ((string_literal) @injection.content
2− (#set! injection.language "markdown"))
2+; (#set! injection.language "markdown"))
3
3
4−((comment) @injection.content
4+; ((line_comment) @injection.content
5+; (#set! injection.language "comment"))
6+
7+; ((block_comment) @injection.content
5− (#set! injection.language "comment"))
8+; (#set! injection.language "comment"))