File tree Expand file tree Collapse file tree 3 files changed +39
-8
lines changed Expand file tree Collapse file tree 3 files changed +39
-8
lines changed Original file line number Diff line number Diff line change @@ -604,7 +604,7 @@ indent = { tab-width = 4, unit = " " }
604
604
605
605
[[grammar ]]
606
606
name = " julia"
607
- source = { git = " https://github.com/tree-sitter/tree-sitter-julia" , rev = " fc60b7cce87da7a1b7f8cb0f9371c3dc8b684500 " }
607
+ source = { git = " https://github.com/tree-sitter/tree-sitter-julia" , rev = " 8fb38abff74652c4faddbf04d2d5bbbc6b4bae25 " }
608
608
609
609
[[language ]]
610
610
name = " java"
Original file line number Diff line number Diff line change 7
7
(block_comment)
8
8
] @comment
9
9
10
- (((identifier) @constant.builtin) (match? @constant.builtin " ^(nothing|missing|Inf|NaN)$" ))
11
- (((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean " true" ))
12
- (((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean " false" ))
10
+ (
11
+ ((identifier) @constant.builtin)
12
+ (#match? @constant.builtin " ^(nothing|missing|undef)$" ))
13
+
14
+ [
15
+ (true)
16
+ (false)
17
+ ] @constant.builtin.boolean
13
18
14
19
(integer_literal) @constant.numeric.integer
15
20
(float_literal) @constant.numeric.float
16
21
22
+ (
23
+ ((identifier) @constant.numeric.float)
24
+ (#match? @constant.numeric.float " ^((Inf|NaN)(16|32|64)?)$" ))
25
+
17
26
(character_literal) @constant.character
18
27
(escape_sequence) @constant.character.escape
19
28
66
75
(type_parameter_list
67
76
(identifier) @type)
68
77
69
- (constrained_parameter
78
+ (constrained_type_parameter
70
79
(identifier) @type)
71
80
72
81
(subtype_clause
81
90
(type_argument_list
82
91
(identifier) @type)
83
92
93
+ (where_clause
94
+ (identifier) @type)
95
+
84
96
; -------------------
85
97
; Function definition
86
98
; -------------------
87
99
88
100
(
89
101
(function_definition
90
- name: (identifier) @function)
102
+ name: [
103
+ (identifier) @function
104
+ (scoped_identifier
105
+ (identifier) @namespace
106
+ (identifier) @function)
107
+ ])
108
+ ; prevent constructors (PascalCase) to be highlighted as functions
109
+ (#match? @function " ^[^A-Z]" ))
110
+
111
+ (
112
+ (short_function_definition
113
+ name: [
114
+ (identifier) @function
115
+ (scoped_identifier
116
+ (identifier) @namespace
117
+ (identifier) @function)
118
+ ])
91
119
; prevent constructors (PascalCase) to be highlighted as functions
92
120
(#match? @function " ^[^A-Z]" ))
93
121
101
129
(optional_parameter
102
130
. (identifier) @variable.parameter)
103
131
104
- (spread_parameter
132
+ (slurp_parameter
105
133
(identifier) @variable.parameter)
106
134
107
135
(function_expression
185
213
186
214
[
187
215
" abstract"
216
+ " baremodule"
188
217
" begin"
189
218
" const"
190
219
" do"
198
227
" return"
199
228
" struct"
200
229
" type"
230
+ " where"
201
231
] @keyword
202
232
203
233
; TODO: fix this
Original file line number Diff line number Diff line change 21
21
(optional_parameter .
22
22
(identifier) @local.definition)
23
23
24
- (spread_parameter
24
+ (slurp_parameter
25
25
(identifier) @local.definition)
26
26
27
27
(function_expression
33
33
34
34
[
35
35
(function_definition)
36
+ (short_function_definition)
36
37
(macro_definition)
37
38
] @local.scope
38
39
You can’t perform that action at this time.
0 commit comments