@@ -1,105 +1,153 @@
11
2−(user_type_identifier) @type
2+(identifier) @variable
3+[
4+ (type_identifier)
5+ (units)
6+]@type
37
4−(var_identifier) @variable
8+(array_literal
9+ (identifier) @type)
510
6−(state_identifier) @variable.other.member
11+(function_identifier) @function
12+[
13+ (image_macro)
14+ (children_macro)
15+ (radial_grad_macro)
16+ (linear_grad_macro)
17+] @function.macro
718
8−(var_identifier
9− (post_identifier) @variable)
19+(call_expression
20+ function: (identifier) @function)
21+(call_expression
22+ function: (field_expression
23+ field: (identifier) @function))
1024
11−(function_identifier) @function
25+(vis) @keyword.control.import
1226
13−(reference_identifier) @keyword.storage.modifier.ref
14−(visibility_modifier) @keyword.storage.modifier
27+(transition_statement state: (identifier) @variable.other.member)
28+(state_expression state: (identifier) @variable.other.member)
29+(struct_block_definition field: (identifier) @variable.other.member)
30+(assign_property (identifier) @attribute)
1531
1632(comment) @comment
1733
18−(string) @string
19−(int_number) @constant.numeric
20−(unit_type) @type.builtin
34+(string_literal) @string
35+(int_literal) @constant.numeric.integer
36+(float_literal) @constant.numeric.float
37+
38+[
39+ "in"
40+ "in-out"
41+ "for"
42+] @keyword.control.repeat
43+
44+[
45+ "import"
46+ "export"
47+ "from"
48+] @keyword.control.import
49+
50+[
51+ "if"
52+ "else"
53+ "when"
54+] @keyword.control.conditional
55+
56+[
57+ "struct"
58+ "property"
59+] @keyword.storage.type
60+
61+[
62+ "global"
63+] @keyword.storage.modifier
64+
2165
2266[
23−"struct"
24−"property"
25−"callback"
26−"import"
27−"from"
28−"root"
29−"parent"
30−"this"
31−"for"
32−"in"
33−"if"
34−"else if"
35−"else"
36−"animate"
37−"states"
38−"when"
39−"in"
40−"out"
41−"transitions"
42−"global"
67+ "root"
68+ "parent"
69+ "duration"
70+ "easing"
71+] @variable.builtin
72+
73+
74+[
75+ "callback"
76+ "animate"
77+ "states"
78+ "out"
79+ "transitions"
80+ "component"
81+ "inherits"
4382] @keyword
4483
4584[
46− "black"
47− "transparent"
48− "blue"
49− "ease"
50− "ease_in"
51− "ease-in"
52− "ease_in_out"
53− "ease-in-out"
54− "ease_out"
55− "ease-out"
56− "end"
57− "green"
58− "red"
59− "red"
60− "start"
61− "yellow"
62− "true"
63− "false"
85+ "black"
86+ "transparent"
87+ "blue"
88+ "ease"
89+ "ease_in"
90+ "ease-in"
91+ "ease_in_out"
92+ "ease-in-out"
93+ "ease_out"
94+ "ease-out"
95+ "end"
96+ "green"
97+ "red"
98+ "start"
99+ "yellow"
100+ "white"
101+ "gray"
64102 ] @constant.builtin
65103
104+[
105+ "true"
106+ "false"
107+] @constant.builtin.boolean
108+
66109"@" @keyword
67110
68111; ; Punctuation
69112[
70113 ","
71114 "."
115+ ";"
116+ ":"
72117] @punctuation.delimiter
73118
74119; ; Brackets
75120[
76−"("
77−")"
78−"["
79−"]"
80−"{"
81−"}"
121+ "("
122+ ")"
123+ "["
124+ "]"
125+ "{"
126+ "}"
82127] @punctuation.bracket
83128
129+(define_property ["<" ">"] @punctuation.bracket)
130+
84131[
85−"angle"
86−"bool"
87−"brush"
88−; "color" // This causes problems
89−"duration"
90−"easing"
91−"float"
92−"image"
93−"int"
94−"length"
95−"percent"
96−"physical-length"
97−"physical_length"
98−"string"
132+ "angle"
133+ "bool"
134+ "brush"
135+ "color"
136+ "duration"
137+ "easing"
138+ "float"
139+ "image"
140+ "int"
141+ "length"
142+ "percent"
143+ "physical-length"
144+ "physical_length"
145+ "string"
99146] @type.builtin
100147
101148[
102149 ":="
150+ "<=>"
103151 "!"
104152 "-"
105153 "+"
@@ -118,8 +166,6 @@
118166 "*="
119167 "/="
120168 "?"
121−
122− "=>"
123− ] @operator
169+ "=>" ] @operator
124170
125171(ternary_expression [":" "?"] @keyword.control.conditional)