| 1 |
|
| 2 |
[ |
| 3 |
"(" |
| 4 |
")" |
| 5 |
"[" |
| 6 |
"]" |
| 7 |
"{" |
| 8 |
"}" |
| 9 |
] @punctuation.bracket |
| 10 |
|
| 11 |
[ |
| 12 |
"," |
| 13 |
"." |
| 14 |
":" |
| 15 |
] @punctuation.delimiter |
| 16 |
|
| 17 |
[ |
| 18 |
"!=" |
| 19 |
"%" |
| 20 |
"%=" |
| 21 |
"&" |
| 22 |
"&=" |
| 23 |
"*" |
| 24 |
"**" |
| 25 |
"**=" |
| 26 |
"*=" |
| 27 |
"+" |
| 28 |
"+=" |
| 29 |
"-" |
| 30 |
"-=" |
| 31 |
"/" |
| 32 |
"/=" |
| 33 |
"<" |
| 34 |
"<<" |
| 35 |
"<<=" |
| 36 |
"<=" |
| 37 |
"<=" |
| 38 |
"==" |
| 39 |
">" |
| 40 |
">=" |
| 41 |
">=" |
| 42 |
">>" |
| 43 |
">>=" |
| 44 |
">>>" |
| 45 |
">>>=" |
| 46 |
"^" |
| 47 |
"^=" |
| 48 |
"|" |
| 49 |
"|=" |
| 50 |
] @operator |
| 51 |
|
| 52 |
|
| 53 |
(identifier) @variable |
| 54 |
|
| 55 |
((identifier) @function |
| 56 |
(#is-not? local)) |
| 57 |
|
| 58 |
|
| 59 |
[ |
| 60 |
"as" |
| 61 |
"for" |
| 62 |
"impl" |
| 63 |
"let" |
| 64 |
"mut" |
| 65 |
"ref" |
| 66 |
"uni" |
| 67 |
"move" |
| 68 |
"recover" |
| 69 |
] @keyword |
| 70 |
|
| 71 |
"fn" @keyword.function |
| 72 |
|
| 73 |
"import" @keyword.control.import |
| 74 |
|
| 75 |
[ |
| 76 |
"and" |
| 77 |
"or" |
| 78 |
] @keyword.operator |
| 79 |
|
| 80 |
[ |
| 81 |
"type" |
| 82 |
"trait" |
| 83 |
] @keyword.storage.type |
| 84 |
|
| 85 |
[ |
| 86 |
"extern" |
| 87 |
(modifier) |
| 88 |
(visibility) |
| 89 |
] @keyword.storage.modifier |
| 90 |
|
| 91 |
[ |
| 92 |
"loop" |
| 93 |
"while" |
| 94 |
(break) |
| 95 |
(next) |
| 96 |
] @keyword.control.repeat |
| 97 |
|
| 98 |
"return" @keyword.control.return |
| 99 |
|
| 100 |
[ |
| 101 |
"throw" |
| 102 |
"try" |
| 103 |
] @keyword.control.exception |
| 104 |
|
| 105 |
[ |
| 106 |
"case" |
| 107 |
"else" |
| 108 |
"if" |
| 109 |
"match" |
| 110 |
] @keyword.control.conditional |
| 111 |
|
| 112 |
|
| 113 |
(line_comment) @comment.line |
| 114 |
|
| 115 |
|
| 116 |
(self) @variable.builtin |
| 117 |
|
| 118 |
(nil) @constant.builtin |
| 119 |
|
| 120 |
[ |
| 121 |
(true) |
| 122 |
(false) |
| 123 |
] @constant.builtin.boolean |
| 124 |
|
| 125 |
(integer) @constant.numeric.integer |
| 126 |
|
| 127 |
(float) @constant.numeric.float |
| 128 |
|
| 129 |
(string) @string |
| 130 |
|
| 131 |
(escape_sequence) @constant.character.escape |
| 132 |
|
| 133 |
(interpolation |
| 134 |
"${" @punctuation.special |
| 135 |
"}" @punctuation.special) |
| 136 |
|
| 137 |
(constant) @constant |
| 138 |
|
| 139 |
|
| 140 |
(integer_pattern) @constant.numeric.integer |
| 141 |
|
| 142 |
(string_pattern) @string |
| 143 |
|
| 144 |
(constant_pattern) @constant |
| 145 |
|
| 146 |
|
| 147 |
(generic_type |
| 148 |
name: _ @type) |
| 149 |
|
| 150 |
(type) @type |
| 151 |
|
| 152 |
|
| 153 |
(extern_import |
| 154 |
path: _ @string) |
| 155 |
|
| 156 |
|
| 157 |
(class |
| 158 |
name: _ @type) |
| 159 |
|
| 160 |
(define_field |
| 161 |
name: _ @variable.other.member) |
| 162 |
|
| 163 |
|
| 164 |
(trait |
| 165 |
name: _ @type) |
| 166 |
|
| 167 |
|
| 168 |
(implement_trait |
| 169 |
class: _ @type) |
| 170 |
|
| 171 |
(reopen_class |
| 172 |
name: _ @type) |
| 173 |
|
| 174 |
(bound |
| 175 |
name: _ @type) |
| 176 |
|
| 177 |
|
| 178 |
(method |
| 179 |
name: _ @function) |
| 180 |
|
| 181 |
(external_function |
| 182 |
name: _ @function) |
| 183 |
|
| 184 |
(argument |
| 185 |
name: _ @variable.parameter) |
| 186 |
|
| 187 |
(named_argument |
| 188 |
name: _ @variable.parameter) |
| 189 |
|
| 190 |
(call |
| 191 |
name: _ @function) |
| 192 |
|
| 193 |
(field) @variable.other.member |