Debian Codegraph @

runtime/queries/_jsx/highlights.scm

raw symbols SCIP
1 ; Punctuation
2 ; -----------
3
4 ; Handle attribute delimiter (<Component color="red"/>)
5 (jsx_attribute "=" @punctuation.delimiter)
6
7 ; <Component>
8 (jsx_opening_element ["<" ">"] @punctuation.bracket)
9
10 ; </Component>
11 (jsx_closing_element ["</" ">"] @punctuation.bracket)
12
13 ; <Component />
14 (jsx_self_closing_element ["<" "/>"] @punctuation.bracket)
15
16 ; Attributes
17 ; ----------
18
19 (jsx_attribute (property_identifier) @attribute)
20
21 ; Opening elements
22 ; ----------------
23
24 (jsx_opening_element (identifier) @tag)
25
26 (jsx_opening_element ((identifier) @constructor
27 (#match? @constructor "^[A-Z]")))
28
29 ; Closing elements
30 ; ----------------
31
32 (jsx_closing_element (identifier) @tag)
33
34 (jsx_closing_element ((identifier) @constructor
35 (#match? @constructor "^[A-Z]")))
36
37 ; Self-closing elements
38 ; ---------------------
39
40 (jsx_self_closing_element (identifier) @tag)
41
42 (jsx_self_closing_element ((identifier) @constructor
43 (#match? @constructor "^[A-Z]")))