Debian Codegraph @

runtime/queries/haxe/highlights.scm

raw symbols SCIP
1 (identifier) @variable
2 (comment) @comment
3
4 ; Preprocessor Statement
5 ; --------
6 (preprocessor_statement) @tag
7 ; (metadata name: (identifier) @type) @tag
8
9 ; MetaData
10 ; --------
11 (metadata) @tag
12 (metadata name: (identifier) @type) @tag
13
14 ; Generic/Type Params
15 ; --------------
16 (type_params
17 "<" @punctuation.bracket
18 ">" @punctuation.bracket
19 )
20
21 ; Declarations
22 ; ------------
23
24 (class_declaration name: (identifier) @type.definition)
25 (interface_declaration name: (identifier) @type.definition)
26 (typedef_declaration name: (identifier) @type.definition)
27
28 (function_declaration name: (identifier) @function)
29 (function_arg name: (identifier) @variable.parameter)
30
31 ; Expressions
32 ; -----------
33 ; (call_expression name: (identifier) @variable.parameter)
34
35 ; Member access. Before the call rule below so a method call `o.m()` reclaims
36 ; @function, while a plain `o.field` stays a member.
37 (member_expression member: (identifier) @variable.other.member)
38
39 ; TODO: Figure out how to determined when "nested member call" is last ident.
40 ; apparently this is a known issue https://github.com/tree-sitter/tree-sitter/issues/880
41 (call_expression object: [
42 (_) @function
43 (_ (identifier) @function .)
44 ; (_(_ (identifier) @function .))
45 ; (_(_(_ (identifier) @function .)))
46 ; (_(_(_(_ (identifier) @function .))))
47 ; (_(_(_(_(_ (identifier) @function .)))))
48 ])
49
50 ; Literals
51 ; --------
52 ; [(keyword) (null)] @keyword
53 ; (type) @type
54 (type_name) @type
55 (package_name) @namespace
56 (type (identifier) !built_in) @type
57 (type built_in: (identifier)) @type.builtin
58 (integer) @constant.numeric.integer
59 (float) @constant.numeric.float
60 (string) @string
61 (bool) @constant.builtin.boolean
62 (operator) @operator
63 (escape_sequence) @constant.character.escape
64 (null) @constant.builtin
65 (access_identifiers "null" @keyword)
66
67 ; Keywords
68 ; --------
69 [
70 "abstract"
71 "as"
72 "break"
73 "case"
74 "cast"
75 "catch"
76 "class"
77 "continue"
78 "default"
79 "do"
80 "dynamic"
81 "else"
82 "enum"
83 "extends"
84 "extern"
85 "final"
86 "for"
87 "function"
88 "if"
89 "implements"
90 "import"
91 "in"
92 "inline"
93 "interface"
94 "macro"
95 "operator"
96 "overload"
97 "override"
98 "package"
99 "private"
100 "public"
101 "return"
102 "static"
103 "switch"
104 "this"
105 "throw"
106 "try"
107 "typedef"
108 "untyped"
109 "using"
110 "var"
111 "while"
112 ] @keyword
113
114 (function_declaration name: "new" @constructor)
115 (call_expression
116 "new" @keyword
117 constructor: (type_name) @constructor
118 )
119
120 ; Tokens
121 ; ------
122
123 (":") @punctuation.special
124 (pair [":" "=>"] @punctuation.special)
125
126 [
127 "("
128 ")"
129 "["
130 "]"
131 "{"
132 "}"
133 ] @punctuation.bracket
134 ;
135 [
136 ; ";"
137 ; "?."
138 ; "."
139 ","
140 ] @punctuation.delimiter
141
142
143 ; Interpolation
144 ; -------------
145 (interpolation "$" @punctuation.special)
146 (interpolation
147 "${" @punctuation.special
148 "}" @punctuation.special
149 ) @embedded
150