|
61 | 61 | } |
62 | 62 | }, |
63 | 63 | "patterns": [ |
| 64 | + { |
| 65 | + "include": "#Object-WeaponSet" |
| 66 | + }, |
| 67 | + { |
| 68 | + "include": "#Object-ArmorSet" |
| 69 | + }, |
| 70 | + { |
| 71 | + "include": "#Object-Prerequisites" |
| 72 | + }, |
| 73 | + { |
| 74 | + "include": "#UnitSpecificSounds" |
| 75 | + }, |
| 76 | + { |
| 77 | + "include": "#modules" |
| 78 | + }, |
64 | 79 | { |
65 | 80 | "include": "#addmodule-block" |
66 | 81 | }, |
|
77 | 92 | } |
78 | 93 | ] |
79 | 94 | }, |
| 95 | + "UnitSpecificSounds": { |
| 96 | + "begin": "\\s*\\b(UnitSpecificSounds)\\b", |
| 97 | + "beginCaptures": { |
| 98 | + "1": { |
| 99 | + "name": "keyword.control.ini" |
| 100 | + } |
| 101 | + }, |
| 102 | + "end": "\\s*\\b(End)\\b", |
| 103 | + "endCaptures": { |
| 104 | + "1": { |
| 105 | + "name": "keyword.control.ini" |
| 106 | + } |
| 107 | + }, |
| 108 | + "patterns": [ |
| 109 | + { |
| 110 | + "include": "#assignment" |
| 111 | + }, |
| 112 | + { |
| 113 | + "include": "#inline-comment" |
| 114 | + } |
| 115 | + ] |
| 116 | + }, |
| 117 | + "Object-ArmorSet": { |
| 118 | + "begin": "\\s*\\b(ArmorSet)\\b", |
| 119 | + "beginCaptures": { |
| 120 | + "1": { |
| 121 | + "name": "keyword.control.ini" |
| 122 | + } |
| 123 | + }, |
| 124 | + "end": "\\s*\\b(End)\\b", |
| 125 | + "endCaptures": { |
| 126 | + "1": { |
| 127 | + "name": "keyword.control.ini" |
| 128 | + } |
| 129 | + }, |
| 130 | + "patterns": [ |
| 131 | + { |
| 132 | + "include": "#WeaponArmor-condition" |
| 133 | + }, |
| 134 | + { |
| 135 | + "include": "#assignment" |
| 136 | + }, |
| 137 | + { |
| 138 | + "include": "#inline-comment" |
| 139 | + } |
| 140 | + ] |
| 141 | + }, |
| 142 | + "Object-WeaponSet": { |
| 143 | + "begin": "\\s*\\b(WeaponSet)\\b", |
| 144 | + "beginCaptures": { |
| 145 | + "1": { |
| 146 | + "name": "keyword.control.ini" |
| 147 | + } |
| 148 | + }, |
| 149 | + "end": "\\s*\\b(End)\\b", |
| 150 | + "endCaptures": { |
| 151 | + "1": { |
| 152 | + "name": "keyword.control.ini" |
| 153 | + } |
| 154 | + }, |
| 155 | + "patterns": [ |
| 156 | + { |
| 157 | + "include": "#WeaponArmor-condition" |
| 158 | + }, |
| 159 | + { |
| 160 | + "include": "#assignment" |
| 161 | + }, |
| 162 | + { |
| 163 | + "include": "#inline-comment" |
| 164 | + } |
| 165 | + ] |
| 166 | + }, |
| 167 | + "WeaponArmor-condition": { |
| 168 | + "match": "\\s*\\b(Conditions)\\s*(\\=)\\s*\\b([Nn][Oo][Nn][Ee]|[Pp][Ll][Aa][Yy][Ee][Rr]_[Uu][Pp][Gg][Rr][Aa][Dd][Ee])\\b", |
| 169 | + "captures": { |
| 170 | + "1": { |
| 171 | + "name": "entity.name.function" |
| 172 | + }, |
| 173 | + "2": { |
| 174 | + "name": "keyword.operator.assignment.ini" |
| 175 | + }, |
| 176 | + "3": { |
| 177 | + "name": "variable.other.constant.ini" |
| 178 | + } |
| 179 | + }, |
| 180 | + "patterns": [ |
| 181 | + { |
| 182 | + "include": "#inline-comment" |
| 183 | + } |
| 184 | + ] |
| 185 | + }, |
| 186 | + "Object-Prerequisites": { |
| 187 | + "begin": "\\s*\\b(Prerequisites)\\b", |
| 188 | + "beginCaptures": { |
| 189 | + "1": { |
| 190 | + "name": "keyword.control.ini" |
| 191 | + } |
| 192 | + }, |
| 193 | + "end": "\\s*\\b(End)\\b", |
| 194 | + "endCaptures": { |
| 195 | + "1": { |
| 196 | + "name": "keyword.control.ini" |
| 197 | + } |
| 198 | + }, |
| 199 | + "patterns": [ |
| 200 | + { |
| 201 | + "include": "#assignment" |
| 202 | + }, |
| 203 | + { |
| 204 | + "include": "#inline-comment" |
| 205 | + } |
| 206 | + ] |
| 207 | + }, |
80 | 208 | "addmodule-block": { |
81 | 209 | "begin": "\\s*\\b(AddModule)\\b", |
82 | 210 | "beginCaptures": { |
|
318 | 446 | }, |
319 | 447 | "end": "(?!\\G)", |
320 | 448 | "patterns": [ |
| 449 | + { |
| 450 | + "include": "#weapon-types" |
| 451 | + }, |
321 | 452 | { |
322 | 453 | "include": "#locomotor-types" |
323 | 454 | }, |
|
349 | 480 | } |
350 | 481 | } |
351 | 482 | }, |
| 483 | + "weapon-types": { |
| 484 | + "match": "\\b(PRIMARY|SECONDARY|TERTIARY)", |
| 485 | + "name": "variable.other.constant.ini" |
| 486 | + }, |
352 | 487 | "string": { |
353 | 488 | "begin": "(^[ \\t]+)?(?=[a-zA-Z])", |
354 | 489 | "beginCaptures": { |
|
359 | 494 | "end": "(?!\\G)", |
360 | 495 | "patterns": [ |
361 | 496 | { |
362 | | - "match": "[a-zA-Z][ \\._a-zA-Z0-9]*", |
| 497 | + "match": "[a-zA-Z][ \\._a-zA-Z0-9:\\+\\-]*", |
363 | 498 | "name": "string.unquoted.ini" |
364 | 499 | } |
365 | 500 | ] |
|
390 | 525 | ] |
391 | 526 | }, |
392 | 527 | "double": { |
393 | | - "match": "-?\\d[(\\.\\d]*( \\d[(\\.\\d]*)?", |
| 528 | + "match": "-?\\d[(\\.\\d]*( \\d[(\\.\\d]*)*", |
394 | 529 | "name": "constant.numeric.ini" |
395 | 530 | }, |
396 | 531 | "boolean": { |
397 | | - "match": "([Yy]es|[Nn]o|[Tt]rue|[Ff]alse)", |
398 | | - "name": "constant.language.boolean.ini" |
| 532 | + "match": "\\b([Yy]es|[Nn]o|[Tt]rue|[Ff]alse)\\s*(?![a-zA-Z])", |
| 533 | + "name": "constant.language.boolean.ini", |
| 534 | + "patterns": [ |
| 535 | + { |
| 536 | + "include": "#string" |
| 537 | + } |
| 538 | + ] |
399 | 539 | }, |
400 | 540 | "inline-comment": { |
401 | 541 | "begin": "(^[ \\t]+)?(?=;)", |
|
0 commit comments