| 1 |
|
| 2 |
(comment) @comment |
| 3 |
|
| 4 |
|
| 5 |
(number) @constant.numeric |
| 6 |
(string) @string |
| 7 |
(latex) @string.special |
| 8 |
(boolean) @constant.builtin.boolean |
| 9 |
|
| 10 |
|
| 11 |
((identifier) @keyword |
| 12 |
(#match? @keyword "^(encourage|ensure|constraint|layer|Layer|in|In|canvas|global|colors)$")) |
| 13 |
((identifier) @function |
| 14 |
(#match? @function "^norm$")) |
| 15 |
((identifier) @variable |
| 16 |
(#not-match? @variable "^(encourage|ensure|constraint|layer|Layer|in|In|norm|canvas|global|colors)$")) |
| 17 |
(escaped_identifier) @variable.special |
| 18 |
|
| 19 |
|
| 20 |
(type_decl "type" @keyword) |
| 21 |
(subtype_decl "type" @keyword) |
| 22 |
(subtype_decl "<:" @operator) |
| 23 |
(constructor_decl "constructor" @keyword) |
| 24 |
(function_decl "function" @keyword) |
| 25 |
(predicate_decl "predicate" @keyword) |
| 26 |
(notation_stmt "notation" @keyword) |
| 27 |
(value_decl "value" @keyword) |
| 28 |
|
| 29 |
(type_decl names: (identifier_list (identifier) @type)) |
| 30 |
(type_decl names: (identifier_list (escaped_identifier) @type)) |
| 31 |
(subtype_decl subtype: (identifier) @type) |
| 32 |
(subtype_decl subtype: (escaped_identifier) @type) |
| 33 |
(subtype_decl supertype: (identifier) @type) |
| 34 |
(subtype_decl supertype: (escaped_identifier) @type) |
| 35 |
(constructor_decl name: (identifier) @function) |
| 36 |
(constructor_decl name: (escaped_identifier) @function) |
| 37 |
(constructor_decl parameters: (parameter_list (parameter type: (identifier) @type))) |
| 38 |
(constructor_decl parameters: (parameter_list (parameter type: (escaped_identifier) @type))) |
| 39 |
(constructor_decl result_type: (identifier) @type) |
| 40 |
(constructor_decl result_type: (escaped_identifier) @type) |
| 41 |
(function_decl name: (identifier) @function) |
| 42 |
(function_decl name: (escaped_identifier) @function) |
| 43 |
(function_decl parameters: (parameter_list (parameter type: (identifier) @type))) |
| 44 |
(function_decl parameters: (parameter_list (parameter type: (escaped_identifier) @type))) |
| 45 |
(function_decl result_type: (identifier) @type) |
| 46 |
(function_decl result_type: (escaped_identifier) @type) |
| 47 |
(predicate_decl name: (identifier) @function) |
| 48 |
(predicate_decl name: (escaped_identifier) @function) |
| 49 |
(predicate_decl parameters: (parameter_list (parameter type: (identifier) @type))) |
| 50 |
(predicate_decl parameters: (parameter_list (parameter type: (escaped_identifier) @type))) |
| 51 |
(value_decl name: (identifier) @variable) |
| 52 |
(value_decl name: (escaped_identifier) @variable) |
| 53 |
(value_decl type: (identifier) @type) |
| 54 |
(value_decl type: (escaped_identifier) @type) |
| 55 |
|
| 56 |
(predicate_modifier) @keyword.modifier |
| 57 |
(arrow) @operator |
| 58 |
(tilde) @operator |
| 59 |
|
| 60 |
|
| 61 |
(substance_type_decl (identifier_list) @variable) |
| 62 |
(substance_type_decl type: (identifier) @type) |
| 63 |
(substance_type_decl type: (escaped_identifier) @type) |
| 64 |
(assignment_stmt ":=" @operator) |
| 65 |
(predicate_stmt (argument_list) @punctuation.bracket) |
| 66 |
(label_stmt "Label" @keyword) |
| 67 |
(autolabel_stmt "AutoLabel" @keyword) |
| 68 |
(nolabel_stmt "NoLabel" @keyword) |
| 69 |
(let_stmt "Let" @keyword) |
| 70 |
(indexed_statement "for" @keyword) |
| 71 |
(indexing_clause "in" @keyword) |
| 72 |
(index_where_clause "where" @keyword) |
| 73 |
|
| 74 |
(typed_assignment_stmt type: (identifier) @type) |
| 75 |
(typed_assignment_stmt type: (escaped_identifier) @type) |
| 76 |
(typed_assignment_stmt name: (identifier) @variable) |
| 77 |
(typed_assignment_stmt name: (escaped_identifier) @variable) |
| 78 |
|
| 79 |
(predicate_stmt name: (identifier) @function) |
| 80 |
(predicate_stmt name: (escaped_identifier) @function) |
| 81 |
|
| 82 |
|
| 83 |
(forall_block "forall" @keyword) |
| 84 |
(where_clause "where" @keyword) |
| 85 |
(has_condition "has" @keyword) |
| 86 |
(with_clause "with" @keyword) |
| 87 |
(collect_block "collect" @keyword) |
| 88 |
(collect_block "into" @keyword) |
| 89 |
(foreach_clause "foreach" @keyword) |
| 90 |
(foreach_clause "foreach" @keyword) |
| 91 |
(with_clause "with" @keyword) |
| 92 |
((named_block (identifier) @attribute) |
| 93 |
(#match? @attribute "^(canvas|global|colors)$")) |
| 94 |
((named_block (identifier) @namespace) |
| 95 |
(#not-match? @namespace "^(canvas|global|colors)$")) |
| 96 |
|
| 97 |
(typed_binding type: (identifier) @type) |
| 98 |
(typed_binding type: (escaped_identifier) @type) |
| 99 |
(typed_binding names: (identifier_list (identifier) @variable)) |
| 100 |
(typed_binding names: (identifier_list (escaped_identifier) @variable)) |
| 101 |
(binding_modifier) @keyword.modifier |
| 102 |
(single_binding type: (identifier) @type) |
| 103 |
(single_binding type: (escaped_identifier) @type) |
| 104 |
(single_binding name: (identifier) @variable) |
| 105 |
(single_binding name: (escaped_identifier) @variable) |
| 106 |
|
| 107 |
(style_typed_assignment type: (identifier) @type) |
| 108 |
(style_typed_assignment type: (escaped_identifier) @type) |
| 109 |
(shape_literal name: (identifier) @type) |
| 110 |
(shape_literal name: (escaped_identifier) @type) |
| 111 |
(style_typed_assignment target: (property (identifier) @attribute)) |
| 112 |
(style_typed_assignment target: (property (escaped_identifier) @attribute)) |
| 113 |
(style_assignment target: (property (identifier) @attribute)) |
| 114 |
(style_assignment target: (property (escaped_identifier) @attribute)) |
| 115 |
(style_assignment target: (property (path (identifier) @attribute))) |
| 116 |
(style_assignment target: (property (path (escaped_identifier) @attribute))) |
| 117 |
(override_stmt target: (property (identifier) @attribute)) |
| 118 |
(override_stmt target: (property (escaped_identifier) @attribute)) |
| 119 |
(delete_stmt target: (property (identifier) @attribute)) |
| 120 |
(delete_stmt target: (property (escaped_identifier) @attribute)) |
| 121 |
(constraint_stmt target: (property (identifier) @attribute)) |
| 122 |
(constraint_stmt target: (property (escaped_identifier) @attribute)) |
| 123 |
(layer_stmt first: (property (identifier) @attribute)) |
| 124 |
(layer_stmt first: (property (escaped_identifier) @attribute)) |
| 125 |
(layer_stmt second: (property (identifier) @attribute)) |
| 126 |
(layer_stmt second: (property (escaped_identifier) @attribute)) |
| 127 |
(stack_stmt first: (property (identifier) @attribute)) |
| 128 |
(stack_stmt first: (property (escaped_identifier) @attribute)) |
| 129 |
(stack_stmt second: (property (identifier) @attribute)) |
| 130 |
(stack_stmt second: (property (escaped_identifier) @attribute)) |
| 131 |
|
| 132 |
(override_stmt "override" @keyword) |
| 133 |
(delete_stmt "delete" @keyword) |
| 134 |
(ensure_stmt "ensure" @keyword) |
| 135 |
(encourage_stmt "encourage" @keyword) |
| 136 |
(constraint_stmt "constraint" @keyword) |
| 137 |
(layer_stmt "layer" @keyword) |
| 138 |
(layer_stmt "above" @keyword.operator) |
| 139 |
(layer_stmt "below" @keyword.operator) |
| 140 |
(stack_stmt "above" @keyword.operator) |
| 141 |
(stack_stmt "below" @keyword.operator) |
| 142 |
(ensure_stmt "in" @keyword) |
| 143 |
(encourage_stmt "in" @keyword) |
| 144 |
(style_assignment ":" @operator) |
| 145 |
(style_typed_assignment ":" @operator) |
| 146 |
|
| 147 |
|
| 148 |
(wildcard "?" @operator) |
| 149 |
(binary_expression ("+" @operator)) |
| 150 |
(binary_expression ("-" @operator)) |
| 151 |
(binary_expression ("*" @operator)) |
| 152 |
(binary_expression ("/" @operator)) |
| 153 |
(binary_expression ("%" @operator)) |
| 154 |
(binary_expression ("mod" @operator)) |
| 155 |
(binary_expression ("^" @operator)) |
| 156 |
(binary_expression (".*" @operator)) |
| 157 |
(binary_expression ("./" @operator)) |
| 158 |
(binary_expression ("then" @keyword.operator)) |
| 159 |
(binary_expression ("==" @operator)) |
| 160 |
(binary_expression ("!=" @operator)) |
| 161 |
(binary_expression ("<" @operator)) |
| 162 |
(binary_expression (">" @operator)) |
| 163 |
(binary_expression ("<=" @operator)) |
| 164 |
(binary_expression (">=" @operator)) |
| 165 |
(binary_expression ("&&" @operator)) |
| 166 |
(binary_expression ("||" @operator)) |
| 167 |
(unary_expression ("-" @operator)) |
| 168 |
(unary_expression ("+" @operator)) |
| 169 |
(unary_expression ("not" @keyword.operator)) |
| 170 |
(unary_expression ("!" @keyword.operator)) |
| 171 |
(transpose_expression ("'" @operator)) |
| 172 |
|
| 173 |
(argument_list "(" @punctuation.bracket) |
| 174 |
(argument_list ")" @punctuation.bracket) |
| 175 |
(parameter_list "(" @punctuation.bracket) |
| 176 |
(parameter_list ")" @punctuation.bracket) |
| 177 |
(list "[" @punctuation.bracket) |
| 178 |
(list "]" @punctuation.bracket) |
| 179 |
(vector "(" @punctuation.bracket) |
| 180 |
(vector ")" @punctuation.bracket) |
| 181 |
(tuple "{" @punctuation.bracket) |
| 182 |
(tuple "}" @punctuation.bracket) |
| 183 |
(block "{" @punctuation.bracket) |
| 184 |
(block "}" @punctuation.bracket) |
| 185 |
|
| 186 |
|
| 187 |
(path (identifier) @variable.other.member) |
| 188 |
(path (escaped_identifier) @variable.other.member) |
| 189 |
|
| 190 |
|
| 191 |
(call_expression (identifier) @function) |
| 192 |
(call_expression (path) @function) |
| 193 |
(numberof_expression "numberof" @function) |
| 194 |
(listof_expression "listof" @function) |
| 195 |
(nameof_expression "nameof" @function) |