@@ -10,20 +10,23 @@
11 (type_identifier)
11 (type_identifier)
12 (unit_type)
12 (unit_type)
15+(list ["list{" "}"] @type)
16+(list_pattern ["list{" "}"] @type)
17 (variant_identifier)
19 (variant_identifier)
18 (polyvar_identifier)
20 (polyvar_identifier)
19−] @constant
21+] @constructor
23+(record_type_field (property_identifier) @type)
24+(object_type (field (property_identifier) @type))
25+(record_field (property_identifier) @variable.other.member)
26+(object (field (property_identifier) @variable.other.member))
21−(property_identifier) @variable.other.member
27+(member_expression (property_identifier) @variable.other.member)
22(module_identifier) @namespace
28(module_identifier) @namespace
25−(jsx_attribute (property_identifier) @variable.parameter)
27; Parameters
30; Parameters
28;----------------
31;----------------
@@ -42,8 +45,8 @@
42 "${" @punctuation.bracket
45 "${" @punctuation.bracket
43 "}" @punctuation.bracket) @embedded
46 "}" @punctuation.bracket) @embedded
45−(character) @constant.character
48+(character) @string.special
46−(escape_sequence) @constant.character.escape
49+(escape_sequence) @string.special
48; Other literals
51; Other literals
49;---------------
52;---------------
@@ -60,11 +63,13 @@
60; Functions
63; Functions
61;----------
64;----------
66+; parameter(s) in parens
64− (formal_parameters (value_identifier))
68+ (parameter (value_identifier))
65 (labeled_parameter (value_identifier))
69 (labeled_parameter (value_identifier))
66] @variable.parameter
70] @variable.parameter
72+; single parameter with no parens
68(function parameter: (value_identifier) @variable.parameter)
73(function parameter: (value_identifier) @variable.parameter)
@@ -74,7 +79,7 @@
76 (decorator_identifier)
81 (decorator_identifier)
77−] @label
82+] @keyword.directive
79(extension_identifier) @keyword
84(extension_identifier) @keyword
80("%") @keyword
85("%") @keyword
@@ -82,13 +87,13 @@
85−(subscript_expression index: (string) @variable.other.member)
90+; (subscript_expression index: (string) @attribute)
86(polyvar_type_pattern "#" @constant)
91(polyvar_type_pattern "#" @constant)
89 ("include")
94 ("include")
91−] @keyword
96+] @keyword.control.import
@@ -96,25 +101,43 @@
96 "external"
101 "external"
100 "private"
104 "private"
104−] @keyword
113+] @keyword.storage.type
115+"mutable" @keyword.storage.modifier
110−] @keyword
122+] @keyword.control.conditional
113 "exception"
125 "exception"
116− "raise"
128+] @keyword.control.exception
131+ function: (value_identifier) @keyword.control.exception
132+ (#eq? @keyword.control.exception "raise"))
117−] @keyword
140+] @keyword.control.conditional
@@ -129,17 +152,15 @@
@@ -151,6 +172,10 @@
151 (uncurry)
172 (uncurry)
152] @operator
173] @operator
175+; Explicitly enclose these operators with binary_expression
176+; to avoid confusion with JSX tag delimiters
177+(binary_expression ["<" ">" "/"] @operator)
@@ -172,7 +197,24 @@
176−] @punctuation
202+] @punctuation.special
178(ternary_expression ["?" ":"] @operator)
204(ternary_expression ["?" ":"] @operator)
208+(jsx_identifier) @tag
210+ open_tag: (jsx_opening_element ["<" ">"] @punctuation.special))
212+ close_tag: (jsx_closing_element ["<" "/" ">"] @punctuation.special))
213+(jsx_self_closing_element ["/" ">" "<"] @punctuation.special)
214+(jsx_fragment [">" "<" "/"] @punctuation.special)
215+(jsx_attribute (property_identifier) @attribute)
220+(ERROR) @keyword.control.exception