|
5 | 5 | "patterns": [ |
6 | 6 | { "include": "#comments" }, |
7 | 7 | { "include": "#constructs" }, |
8 | | - { "include": "#keywords" }, |
9 | | - { "include": "#types" }, |
| 8 | + { "include": "#io" }, |
| 9 | + { "include": "#brain" }, |
| 10 | + { "include": "#events" }, |
| 11 | + { "include": "#control" }, |
| 12 | + { "include": "#modifiers" }, |
| 13 | + { "include": "#builtins" }, |
10 | 14 | { "include": "#verbs" }, |
| 15 | + { "include": "#types" }, |
| 16 | + { "include": "#config" }, |
11 | 17 | { "include": "#strings" }, |
12 | 18 | { "include": "#numbers" }, |
13 | 19 | { "include": "#operators" }, |
|
38 | 44 | "constructs": { |
39 | 45 | "patterns": [ |
40 | 46 | { |
41 | | - "match": "\\b(body|item|world|fitness|evolve|dynamics|perception|action|machine)\\s+([A-Za-z_][A-Za-z0-9_]*)", |
| 47 | + "match": "\\b(body|world|fitness|evolve|dynamics|perception|action|machine)\\s+([A-Za-z_][A-Za-z0-9_]*)", |
42 | 48 | "captures": { |
43 | | - "1": { "name": "storage.type.quale" }, |
44 | | - "2": { "name": "entity.name.type.quale" } |
| 49 | + "1": { "name": "keyword.control.quale" }, |
| 50 | + "2": { "name": "entity.name.quale" } |
45 | 51 | } |
46 | 52 | } |
47 | 53 | ] |
48 | 54 | }, |
49 | | - "keywords": { |
| 55 | + "io": { |
| 56 | + "comment": "Sensors and actuators - purple (variable.parameter)", |
| 57 | + "patterns": [ |
| 58 | + { |
| 59 | + "name": "variable.parameter.quale", |
| 60 | + "match": "\\b(sensor|actuator)\\b" |
| 61 | + } |
| 62 | + ] |
| 63 | + }, |
| 64 | + "brain": { |
| 65 | + "comment": "Brain architecture - red/pink (support.function)", |
| 66 | + "patterns": [ |
| 67 | + { |
| 68 | + "name": "support.function.quale", |
| 69 | + "match": "\\b(region|plasticity|hebbian|decay|homeostatic)\\b" |
| 70 | + } |
| 71 | + ] |
| 72 | + }, |
| 73 | + "events": { |
| 74 | + "comment": "Entity interactions and events - gold (entity.name.function)", |
| 75 | + "patterns": [ |
| 76 | + { |
| 77 | + "name": "entity.name.function.quale", |
| 78 | + "match": "\\b(on_cross|on_enter|on_pass|on_exit|on_consume|record|consume|entity|spawn)\\b" |
| 79 | + } |
| 80 | + ] |
| 81 | + }, |
| 82 | + "control": { |
| 83 | + "comment": "Control flow - orange (keyword)", |
50 | 84 | "patterns": [ |
51 | 85 | { |
52 | 86 | "name": "keyword.control.quale", |
53 | | - "match": "\\b(sensor|actuator|properties|on_consume|spawn|region|plasticity|hebbian|decay|homeostatic|hidden|per_tick|rules|death|clamp|state|scope|initial|transition|on_cross|on_enter|on_pass|on_exit|let|when|else|match|for|in|record|gate|metric|aggregate|transform|consume|query|import|include|topology)\\b" |
| 87 | + "match": "\\b(when|else|match|for|in|let|if|transition|import|include)\\b" |
| 88 | + } |
| 89 | + ] |
| 90 | + }, |
| 91 | + "modifiers": { |
| 92 | + "comment": "Declarative modifiers - cyan (support.type)", |
| 93 | + "patterns": [ |
| 94 | + { |
| 95 | + "name": "support.type.quale", |
| 96 | + "match": "\\b(scope|initial|state|hidden|properties|topology|query)\\b" |
| 97 | + } |
| 98 | + ] |
| 99 | + }, |
| 100 | + "builtins": { |
| 101 | + "comment": "Built-in functions - red/pink (support.function)", |
| 102 | + "patterns": [ |
| 103 | + { |
| 104 | + "name": "support.function.quale", |
| 105 | + "match": "\\b(min|max|clamp|abs|sqrt|nearest_ahead|speed_zone_at|nearest|at|winner_take_all|grid_move|neighbors|connected|shortest_path)\\b" |
| 106 | + } |
| 107 | + ] |
| 108 | + }, |
| 109 | + "verbs": { |
| 110 | + "comment": "Fitness verbs - green (entity.name.import)", |
| 111 | + "patterns": [ |
| 112 | + { |
| 113 | + "name": "entity.name.import.quale", |
| 114 | + "match": "\\b(maximize|reward|penalize)\\b" |
54 | 115 | }, |
55 | 116 | { |
56 | | - "name": "keyword.other.quale", |
57 | | - "match": "\\b(category|size|walls|item_respawn|population|generations|scenarios|ticks|seed|every|keep|plateau|threshold|stagnation|target_species|range|directions|weight_shift|bias_shift|add_connection|remove_connection|add_node|remove_node|rewire|change_activation|mutation|speciation|convergence|checkpoint|seed_from|agents|nodes|density|activation|recurrent|rate|max_weight|min_weight|target_activity|adjustment_rate)\\b" |
| 117 | + "comment": "Fitness structure - cyan (support.type)", |
| 118 | + "name": "support.type.quale", |
| 119 | + "match": "\\b(gate|metric|aggregate|transform)\\b" |
58 | 120 | } |
59 | 121 | ] |
60 | 122 | }, |
61 | 123 | "types": { |
| 124 | + "comment": "Sensor/actuator types - cyan (support.type)", |
62 | 125 | "patterns": [ |
63 | 126 | { |
64 | 127 | "name": "support.type.quale", |
65 | 128 | "match": "\\b(internal|directional|item_property|social|trigger)\\b" |
66 | 129 | }, |
67 | 130 | { |
68 | 131 | "name": "constant.language.quale", |
69 | | - "match": "\\b(border|true|false)\\b" |
| 132 | + "match": "\\b(border|true|false|none)\\b" |
70 | 133 | } |
71 | 134 | ] |
72 | 135 | }, |
73 | | - "verbs": { |
| 136 | + "config": { |
| 137 | + "comment": "Config keys - light orange (keyword.operator) and default", |
74 | 138 | "patterns": [ |
75 | 139 | { |
76 | | - "name": "keyword.operator.verb.quale", |
77 | | - "match": "\\b(maximize|reward|penalize)\\b" |
| 140 | + "name": "keyword.operator.quale", |
| 141 | + "match": "\\b(population|generations|scenarios|ticks|seed|agents|every|keep|mutation|speciation|convergence|checkpoint|seed_from)\\b" |
| 142 | + }, |
| 143 | + { |
| 144 | + "name": "variable.other.property.quale", |
| 145 | + "match": "\\b(category|size|walls|item_respawn|range|directions|weight_shift|bias_shift|add_connection|remove_connection|add_node|remove_node|rewire|change_activation|nodes|density|activation|recurrent|rate|max_weight|min_weight|target_activity|adjustment_rate|length|max_speed|tick|respawn|plateau|threshold|stagnation|target_species|per_tick|rules|death|clamp)\\b" |
78 | 146 | } |
79 | 147 | ] |
80 | 148 | }, |
|
130 | 198 | { |
131 | 199 | "name": "keyword.operator.logical.quale", |
132 | 200 | "match": "\\b(and|or|not)\\b" |
| 201 | + }, |
| 202 | + { |
| 203 | + "name": "keyword.operator.arrow.quale", |
| 204 | + "match": "->" |
| 205 | + }, |
| 206 | + { |
| 207 | + "name": "keyword.operator.ternary.quale", |
| 208 | + "match": "\\?" |
133 | 209 | } |
134 | 210 | ] |
135 | 211 | }, |
|
141 | 217 | "1": { "name": "variable.parameter.quale" } |
142 | 218 | } |
143 | 219 | }, |
| 220 | + { |
| 221 | + "comment": "Namespace prefixes - cyan italic (variable.language)", |
| 222 | + "match": "\\b(agent|world|actuator|engine|evolve)\\.", |
| 223 | + "captures": { |
| 224 | + "1": { "name": "variable.language.quale" } |
| 225 | + } |
| 226 | + }, |
144 | 227 | { |
145 | 228 | "match": "(?<=\\[|,\\s*)([A-Z][A-Za-z0-9_]*)", |
146 | 229 | "captures": { |
147 | | - "1": { "name": "variable.other.quale" } |
| 230 | + "1": { "name": "entity.name.quale" } |
148 | 231 | } |
149 | 232 | } |
150 | 233 | ] |
|
0 commit comments