@@ -7,13 +7,22 @@
77 (block_comment)
88] @comment
99
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
1318
1419(integer_literal) @constant.numeric.integer
1520(float_literal) @constant.numeric.float
1621
22+(
23+ ((identifier) @constant.numeric.float)
24+ (#match? @constant.numeric.float "^((Inf|NaN)(16|32|64)?)$"))
25+
1726(character_literal) @constant.character
1827(escape_sequence) @constant.character.escape
1928
@@ -66,7 +75,7 @@
6675(type_parameter_list
6776 (identifier) @type)
6877
69−(constrained_parameter
78+(constrained_type_parameter
7079 (identifier) @type)
7180
7281(subtype_clause
@@ -81,13 +90,32 @@
8190(type_argument_list
8291 (identifier) @type)
8392
93+(where_clause
94+ (identifier) @type)
95+
8496; -------------------
8597; Function definition
8698; -------------------
8799
88100(
89101 (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+ ])
91119 ; prevent constructors (PascalCase) to be highlighted as functions
92120 (#match? @function "^[^A-Z]"))
93121
@@ -101,7 +129,7 @@
101129(optional_parameter
102130 . (identifier) @variable.parameter)
103131
104−(spread_parameter
132+(slurp_parameter
105133 (identifier) @variable.parameter)
106134
107135(function_expression
@@ -185,6 +213,7 @@
185213
186214[
187215 "abstract"
216+ "baremodule"
188217 "begin"
189218 "const"
190219 "do"
@@ -198,6 +227,7 @@
198227 "return"
199228 "struct"
200229 "type"
230+ "where"
201231] @keyword
202232
203233; TODO: fix this