@@ -7,13 +7,22 @@
7 (block_comment)
7 (block_comment)
11+ ((identifier) @constant.builtin)
10−(((identifier) @constant.builtin) (match? @constant.builtin "^(nothing|missing|Inf|NaN)$"))
12+ (#match? @constant.builtin "^(nothing|missing|undef)$"))
11−(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "true"))
13+
12−(((identifier) @constant.builtin.boolean) (#eq? @constant.builtin.boolean "false"))
14+[
17+] @constant.builtin.boolean
14(integer_literal) @constant.numeric.integer
19(integer_literal) @constant.numeric.integer
15(float_literal) @constant.numeric.float
20(float_literal) @constant.numeric.float
23+ ((identifier) @constant.numeric.float)
24+ (#match? @constant.numeric.float "^((Inf|NaN)(16|32|64)?)$"))
17(character_literal) @constant.character
26(character_literal) @constant.character
18(escape_sequence) @constant.character.escape
27(escape_sequence) @constant.character.escape
@@ -66,7 +75,7 @@
66(type_parameter_list
75(type_parameter_list
67 (identifier) @type)
76 (identifier) @type)
69−(constrained_parameter
78+(constrained_type_parameter
70 (identifier) @type)
79 (identifier) @type)
72(subtype_clause
81(subtype_clause
@@ -81,13 +90,32 @@
81(type_argument_list
90(type_argument_list
82 (identifier) @type)
91 (identifier) @type)
84; -------------------
96; -------------------
85; Function definition
97; Function definition
86; -------------------
98; -------------------
89 (function_definition
101 (function_definition
103+ (identifier) @function
90− name: (identifier) @function)
105+ (identifier) @namespace
106+ (identifier) @function)
108+ ; prevent constructors (PascalCase) to be highlighted as functions
109+ (#match? @function "^[^A-Z]"))
112+ (short_function_definition
114+ (identifier) @function
116+ (identifier) @namespace
117+ (identifier) @function)
91 ; prevent constructors (PascalCase) to be highlighted as functions
119 ; prevent constructors (PascalCase) to be highlighted as functions
92 (#match? @function "^[^A-Z]"))
120 (#match? @function "^[^A-Z]"))
@@ -101,7 +129,7 @@
101(optional_parameter
129(optional_parameter
102 . (identifier) @variable.parameter)
130 . (identifier) @variable.parameter)
104−(spread_parameter
132+(slurp_parameter
105 (identifier) @variable.parameter)
133 (identifier) @variable.parameter)
107(function_expression
135(function_expression
@@ -185,6 +213,7 @@
187 "abstract"
215 "abstract"
@@ -198,6 +227,7 @@
201] @keyword
231] @keyword
203; TODO: fix this
233; TODO: fix this