| 1 |
|
| 2 |
(comment) @comment |
| 3 |
|
| 4 |
|
| 5 |
[ |
| 6 |
(int_lit) |
| 7 |
(uint_lit) |
| 8 |
] @constant.numeric.integer |
| 9 |
|
| 10 |
(none_lit) @constant.builtin |
| 11 |
(bool_lit) @constant.builtin.boolean |
| 12 |
|
| 13 |
[ |
| 14 |
(ascii_string_lit) |
| 15 |
(utf8_string_lit) |
| 16 |
] @string |
| 17 |
|
| 18 |
[ |
| 19 |
(buffer_lit) |
| 20 |
(standard_principal_lit) |
| 21 |
(contract_principal_lit) |
| 22 |
] @string.special |
| 23 |
|
| 24 |
|
| 25 |
[ |
| 26 |
(native_type) |
| 27 |
(trait_type) |
| 28 |
] @type |
| 29 |
|
| 30 |
|
| 31 |
[ |
| 32 |
"(" |
| 33 |
")" |
| 34 |
"{" |
| 35 |
"}" |
| 36 |
] @punctuation.bracket |
| 37 |
|
| 38 |
(trait_type "<" @punctuation.bracket) |
| 39 |
(trait_type ">" @punctuation.bracket) |
| 40 |
|
| 41 |
[ |
| 42 |
"," |
| 43 |
] @punctuation.delimiter |
| 44 |
|
| 45 |
(tuple_lit ":" @punctuation.delimiter) |
| 46 |
(tuple_type ":" @punctuation.delimiter) |
| 47 |
(trait_implementation "." @punctuation.delimiter) |
| 48 |
(trait_usage "." @punctuation.delimiter) |
| 49 |
|
| 50 |
|
| 51 |
(list_lit_token) @keyword |
| 52 |
(some_lit ("some") @keyword) |
| 53 |
(response_lit [ |
| 54 |
"ok" |
| 55 |
"err" |
| 56 |
] @keyword) |
| 57 |
|
| 58 |
(int_lit "-" @constant.numeric.integer) |
| 59 |
|
| 60 |
|
| 61 |
(function_signature (identifier) @function) |
| 62 |
(function_signature_for_trait (identifier) @function) |
| 63 |
(contract_function_call operator: (identifier) @function) |
| 64 |
|
| 65 |
(basic_native_form operator: (native_identifier) @function.builtin) |
| 66 |
(basic_native_form operator: (native_identifier) @keyword.operator |
| 67 |
(#match? @keyword.operator "^([+\\-*/<>]|<=|>=|mod|pow|and|or|xor|not)$")) |
| 68 |
(basic_native_form operator: (native_identifier) @keyword.control.conditional |
| 69 |
(#match? @keyword.control.conditional "^(if|match)$")) |
| 70 |
(basic_native_form operator: (native_identifier) @keyword.control |
| 71 |
(#match? @keyword.control "^begin$")) |
| 72 |
(basic_native_form operator: (native_identifier) @keyword.control.exception |
| 73 |
(#match? @keyword.control.exception "^(try!|unwrap!|unwrap-err!|unwrap-panic|unwrap-err-panic|asserts!)$")) |
| 74 |
[ |
| 75 |
"let" |
| 76 |
] @function.builtin |
| 77 |
|
| 78 |
[ |
| 79 |
"impl-trait" |
| 80 |
"use-trait" |
| 81 |
] @keyword.control.import |
| 82 |
|
| 83 |
[ |
| 84 |
"define-read-only" |
| 85 |
"define-private" |
| 86 |
"define-public" |
| 87 |
] @keyword.function |
| 88 |
|
| 89 |
[ |
| 90 |
"define-trait" |
| 91 |
"define-constant" |
| 92 |
"define-data-var" |
| 93 |
"define-map" |
| 94 |
"define-fungible-token" |
| 95 |
"define-non-fungible-token" |
| 96 |
] @keyword.storage.type |
| 97 |
|
| 98 |
|
| 99 |
(function_parameter) @variable.parameter |
| 100 |
(trait_usage trait_alias: (identifier) @type.parameter) |
| 101 |
|
| 102 |
(tuple_lit key: (identifier) @variable.other.member) |
| 103 |
(tuple_type key: (identifier) @variable.other.member) |
| 104 |
(tuple_type_for_trait key: (identifier) @variable.other.member) |
| 105 |
|
| 106 |
(global) @variable.builtin |