| 1 |
|
| 2 |
(identifier) @variable |
| 3 |
(discard) @comment.unused |
| 4 |
(hole) @comment.unused |
| 5 |
|
| 6 |
|
| 7 |
(module_comment) @comment.line.documentation |
| 8 |
(statement_comment) @comment.line.documentation |
| 9 |
(comment) @comment.line |
| 10 |
|
| 11 |
|
| 12 |
(constant |
| 13 |
name: (identifier) @constant) |
| 14 |
|
| 15 |
|
| 16 |
(module) @namespace |
| 17 |
(import alias: (identifier) @namespace) |
| 18 |
(remote_type_identifier |
| 19 |
module: (identifier) @namespace) |
| 20 |
(remote_constructor_name |
| 21 |
module: (identifier) @namespace) |
| 22 |
((field_access |
| 23 |
record: (identifier) @namespace |
| 24 |
field: (label) @function) |
| 25 |
(#is-not? local)) |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
(unqualified_import (identifier) @function) |
| 32 |
(unqualified_import "type" (type_identifier) @type) |
| 33 |
(unqualified_import (type_identifier) @constructor) |
| 34 |
(function |
| 35 |
name: (identifier) @function) |
| 36 |
(external_function |
| 37 |
name: (identifier) @function) |
| 38 |
(function_parameter |
| 39 |
name: (identifier) @variable.parameter) |
| 40 |
((function_call |
| 41 |
function: (identifier) @function) |
| 42 |
(#is-not? local)) |
| 43 |
|
| 44 |
((binary_expression |
| 45 |
operator: "|>" |
| 46 |
right: (identifier) @function) |
| 47 |
(#is-not? local)) |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
(label) @variable.other.member |
| 58 |
(tuple_access |
| 59 |
index: (integer) @variable.other.member) |
| 60 |
|
| 61 |
|
| 62 |
(attribute |
| 63 |
"@" @attribute |
| 64 |
name: (identifier) @attribute) |
| 65 |
|
| 66 |
(attribute_value (identifier) @constant) |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
(type_hole) @comment.unused |
| 73 |
|
| 74 |
|
| 75 |
(remote_type_identifier) @type |
| 76 |
(type_identifier) @type |
| 77 |
|
| 78 |
|
| 79 |
[ |
| 80 |
|
| 81 |
(type_parameter) |
| 82 |
|
| 83 |
(type_var) |
| 84 |
] @type |
| 85 |
|
| 86 |
|
| 87 |
(constructor_name) @constructor |
| 88 |
|
| 89 |
|
| 90 |
((constructor_name) @constant.builtin |
| 91 |
(#any-of? @constant.builtin "False" "True")) |
| 92 |
((constructor_name) @constant.builtin |
| 93 |
(#any-of? @constant.builtin "Nil")) |
| 94 |
((constructor_name) @type.enum.variant.builtin |
| 95 |
(#any-of? @type.enum.variant.builtin "Ok" "Error" "Some" "None")) |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
(string) @string |
| 102 |
(escape_sequence) @constant.character.escape |
| 103 |
((escape_sequence) @warning |
| 104 |
(#eq? @warning "\\e")) |
| 105 |
(bit_array_segment_option) @function.builtin |
| 106 |
(integer) @constant.numeric.integer |
| 107 |
(float) @constant.numeric.float |
| 108 |
|
| 109 |
|
| 110 |
((identifier) @error |
| 111 |
(#any-of? @error "auto" "delegate" "derive" "else" "implement" "macro" "test")) |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
[ |
| 118 |
(visibility_modifier) |
| 119 |
(opacity_modifier) |
| 120 |
"as" |
| 121 |
"assert" |
| 122 |
"case" |
| 123 |
"const" |
| 124 |
|
| 125 |
"external" |
| 126 |
"fn" |
| 127 |
"if" |
| 128 |
"import" |
| 129 |
"let" |
| 130 |
"panic" |
| 131 |
"todo" |
| 132 |
"type" |
| 133 |
"use" |
| 134 |
"echo" |
| 135 |
] @keyword |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
(binary_expression |
| 142 |
operator: _ @operator) |
| 143 |
(boolean_negation "!" @operator) |
| 144 |
(integer_negation "-" @operator) |
| 145 |
|
| 146 |
[ |
| 147 |
"->" |
| 148 |
"-" |
| 149 |
"=" |
| 150 |
".." |
| 151 |
"<-" |
| 152 |
|
| 153 |
"|" |
| 154 |
] @operator |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
[ |
| 161 |
"(" |
| 162 |
")" |
| 163 |
"[" |
| 164 |
"]" |
| 165 |
"{" |
| 166 |
"}" |
| 167 |
"<<" |
| 168 |
">>" |
| 169 |
] @punctuation.bracket |
| 170 |
|
| 171 |
(tuple_type "#" @punctuation.bracket) |
| 172 |
(tuple "#" @punctuation.bracket) |
| 173 |
(tuple_pattern "#" @punctuation.bracket) |
| 174 |
|
| 175 |
[ |
| 176 |
"," |
| 177 |
":" |
| 178 |
] @punctuation.delimiter |
| 179 |
|
| 180 |
|
| 181 |
(import (module "/" @punctuation.delimiter)) |
| 182 |
|
| 183 |
[ |
| 184 |
"." |
| 185 |
] @punctuation |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
(function_call (field_access (label) @function)) |
| 190 |
|
| 191 |
|
| 192 |
(binary_expression |
| 193 |
left: (_) "|>" |
| 194 |
right: (field_access |
| 195 |
record: (identifier) "." |
| 196 |
field: (label) @function)) |