| 1 |
[ |
| 2 |
(line_comment) |
| 3 |
(block_comment) |
| 4 |
] @comment |
| 5 |
|
| 6 |
(bool) @constant.builtin.boolean |
| 7 |
(integer) @constant.numeric.integer |
| 8 |
(float) @constant.numeric.float |
| 9 |
(character) @constant.character |
| 10 |
|
| 11 |
|
| 12 |
(string) @string |
| 13 |
(source_file docstring: (string) @string.special) |
| 14 |
(entity docstring: (string) @string.special) |
| 15 |
(method docstring: (string) @string.special) |
| 16 |
(behavior docstring: (string) @string.special) |
| 17 |
(constructor docstring: (string) @string.special) |
| 18 |
(method body: (block . (string) @string.special)) |
| 19 |
(behavior body: (block . (string) @string.special)) |
| 20 |
(constructor body: (block . (string) @string.special)) |
| 21 |
(field docstring: (string) @string.special) |
| 22 |
|
| 23 |
|
| 24 |
[ |
| 25 |
"(" |
| 26 |
")" |
| 27 |
"{" |
| 28 |
"}" |
| 29 |
"[" |
| 30 |
"]" |
| 31 |
] @punctuation.bracket |
| 32 |
[ |
| 33 |
";" |
| 34 |
"." |
| 35 |
"," |
| 36 |
] @punctuation.delimiter |
| 37 |
|
| 38 |
(this) @variable.builtin |
| 39 |
|
| 40 |
(field name: (identifier) @variable.other.member) |
| 41 |
|
| 42 |
"use" @keyword.control.import |
| 43 |
[ |
| 44 |
"for" |
| 45 |
"in" |
| 46 |
"while" |
| 47 |
"do" |
| 48 |
"repeat" |
| 49 |
"until" |
| 50 |
] @keyword.control.repeat |
| 51 |
[ |
| 52 |
"if" |
| 53 |
"ifdef" |
| 54 |
"iftype" |
| 55 |
"then" |
| 56 |
"elseif" |
| 57 |
"else" |
| 58 |
"match" |
| 59 |
] @keyword.control.conditional |
| 60 |
[ |
| 61 |
"break" |
| 62 |
"continue" |
| 63 |
"return" |
| 64 |
"error" |
| 65 |
"compile_error" |
| 66 |
"compile_intrinsic" |
| 67 |
] @keyword.control.return |
| 68 |
[ |
| 69 |
"recover" |
| 70 |
"consume" |
| 71 |
"end" |
| 72 |
"try" |
| 73 |
"with" |
| 74 |
] @keyword.control |
| 75 |
|
| 76 |
[ |
| 77 |
"as" |
| 78 |
"is" |
| 79 |
"isnt" |
| 80 |
"not" |
| 81 |
"and" |
| 82 |
"or" |
| 83 |
"xor" |
| 84 |
"digestof" |
| 85 |
"addressof" |
| 86 |
(location) |
| 87 |
] @keyword.operator |
| 88 |
|
| 89 |
(entity_type) @keyword.storage.type |
| 90 |
|
| 91 |
[ |
| 92 |
"var" |
| 93 |
"let" |
| 94 |
"embed" |
| 95 |
] @keyword.storage |
| 96 |
|
| 97 |
[ |
| 98 |
"fun" |
| 99 |
"be" |
| 100 |
"new" |
| 101 |
] @keyword.function |
| 102 |
|
| 103 |
[ |
| 104 |
(cap) |
| 105 |
(gencap) |
| 106 |
"where" |
| 107 |
] @keyword |
| 108 |
|
| 109 |
[ |
| 110 |
(partial) |
| 111 |
"=>" |
| 112 |
"~" |
| 113 |
".>" |
| 114 |
"+" |
| 115 |
"-" |
| 116 |
"*" |
| 117 |
"/" |
| 118 |
"%" |
| 119 |
"%%" |
| 120 |
"+~" |
| 121 |
"-~" |
| 122 |
"/~" |
| 123 |
"*~" |
| 124 |
"%~" |
| 125 |
"%%~" |
| 126 |
|
| 127 |
">>" |
| 128 |
"<<" |
| 129 |
">>~" |
| 130 |
"<<~" |
| 131 |
|
| 132 |
"==" |
| 133 |
"!=" |
| 134 |
">" |
| 135 |
"<" |
| 136 |
">=" |
| 137 |
"<=" |
| 138 |
] @operator |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
(identifier) @variable |
| 143 |
( |
| 144 |
(identifier) @constructor |
| 145 |
(#match? @constructor "^[A-Z]") |
| 146 |
) |
| 147 |
|
| 148 |
|
| 149 |
(entity name: (identifier) @type) |
| 150 |
(nominal_type name: (identifier) @type) |
| 151 |
(typeparams (typeparam name: (identifier) @type)) |
| 152 |
|
| 153 |
|
| 154 |
(constructor name: (identifier) @constructor) |
| 155 |
(method name: (identifier) @function.method) |
| 156 |
(behavior name: (identifier) @function.method) |
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
(call callee: (field_access field: (identifier) @function.method)) |
| 161 |
(call callee: (_) @function.method) |
| 162 |
(ffi_call name: (_) @function) |
| 163 |
(partial_application function: (identifier) @function.method) |
| 164 |
(chain function: (identifier) @function.method) |
| 165 |
|
| 166 |
|
| 167 |
(field name: (identifier) @variable.other.member) |
| 168 |
(param (identifier) @variable.parameter) |
| 169 |
(lambdaparam (identifier) @variable.parameter) |
| 170 |
|
| 171 |
|
| 172 |
(field_access base: (this) field: (identifier) @variable.other.member) |
| 173 |
|
| 174 |
|
| 175 |
(annotations (identifier) @attribute) |
| 176 |
|