Skip to content

Commit c1ca39f

Browse files
committed
Add unit-specific FX and behavior decals to ini syntax
1 parent 4c88ecb commit c1ca39f

File tree

1 file changed

+137
-5
lines changed

1 file changed

+137
-5
lines changed

syntaxes/ini.tmLanguage.json

Lines changed: 137 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,47 @@
127127
{
128128
"include": "#Object-UnitSpecificSounds"
129129
},
130+
{
131+
"include": "#Object-UnitSpecificFX"
132+
},
130133
{
131134
"include": "#Object-Prerequisites"
132135
}
133136
]
134137
},
138+
"Object-UnitSpecificFX": {
139+
"begin": "(^[ \\t]+)?\\b([Uu]nit[Ss]pecific[Ff][Xx]|UNITSPECIFICFX)\\b",
140+
"beginCaptures": {
141+
"1": {
142+
"name": "punctuation.whitespace.ini"
143+
},
144+
"2": {
145+
"name": "keyword.control.ini"
146+
}
147+
},
148+
"end": "(^[ \\t]+)?([Ee]nd|END)",
149+
"endCaptures": {
150+
"1": {
151+
"name": "punctuation.whitespace.ini"
152+
},
153+
"2": {
154+
"name": "keyword.control.ini"
155+
}
156+
},
157+
"patterns": [
158+
{
159+
"include": "#Inline-Comment"
160+
},
161+
{
162+
"include": "#General-Assignment"
163+
},
164+
{
165+
"include": "#Invalid-Assignment"
166+
}
167+
]
168+
},
135169
"Object-Prerequisites": {
136-
"begin": "(^[ \\t]+)?\\b(Prerequisites|PREREQUISITES)\\b",
170+
"begin": "(^[ \\t]+)?\\b([Pp]rerequisites|PREREQUISITES)\\b",
137171
"beginCaptures": {
138172
"1": {
139173
"name": "punctuation.whitespace.ini"
@@ -430,6 +464,108 @@
430464
{
431465
"include": "#Behavior-Turret"
432466
},
467+
{
468+
"include": "#Behavior-AttackAreaDecal"
469+
},
470+
{
471+
"include": "#Behavior-TargetingReticleDecal"
472+
},
473+
{
474+
"include": "#Behavior-GridDecalTemplate"
475+
},
476+
{
477+
"include": "#General-Assignment"
478+
},
479+
{
480+
"include": "#Invalid-Assignment"
481+
}
482+
]
483+
},
484+
"Behavior-GridDecalTemplate": {
485+
"begin": "(^[ \\t]+)?\\b([Gg]rid[Dd]ecal[Tt]emplate)\\b",
486+
"beginCaptures": {
487+
"1": {
488+
"name": "punctuation.whitespace.ini"
489+
},
490+
"2": {
491+
"name": "keyword.control.ini"
492+
}
493+
},
494+
"end": "(^[ \\t]+)?\\b([Ee]nd|END)\\b",
495+
"endCaptures": {
496+
"1": {
497+
"name": "punctuation.whitespace.ini"
498+
},
499+
"2": {
500+
"name": "keyword.control.ini"
501+
}
502+
},
503+
"patterns": [
504+
{
505+
"include": "#Inline-Comment"
506+
},
507+
{
508+
"include": "#General-Assignment"
509+
},
510+
{
511+
"include": "#Invalid-Assignment"
512+
}
513+
]
514+
},
515+
"Behavior-TargetingReticleDecal": {
516+
"begin": "(^[ \\t]+)?\\b([Tt]argeting[Rr]eticle[Dd]ecal)\\b",
517+
"beginCaptures": {
518+
"1": {
519+
"name": "punctuation.whitespace.ini"
520+
},
521+
"2": {
522+
"name": "keyword.control.ini"
523+
}
524+
},
525+
"end": "(^[ \\t]+)?\\b([Ee]nd|END)\\b",
526+
"endCaptures": {
527+
"1": {
528+
"name": "punctuation.whitespace.ini"
529+
},
530+
"2": {
531+
"name": "keyword.control.ini"
532+
}
533+
},
534+
"patterns": [
535+
{
536+
"include": "#Inline-Comment"
537+
},
538+
{
539+
"include": "#General-Assignment"
540+
},
541+
{
542+
"include": "#Invalid-Assignment"
543+
}
544+
]
545+
},
546+
"Behavior-AttackAreaDecal": {
547+
"begin": "(^[ \\t]+)?\\b([Aa]ttack[Aa]rea[Dd]ecal)\\b",
548+
"beginCaptures": {
549+
"1": {
550+
"name": "punctuation.whitespace.ini"
551+
},
552+
"2": {
553+
"name": "keyword.control.ini"
554+
}
555+
},
556+
"end": "(^[ \\t]+)?\\b([Ee]nd|END)\\b",
557+
"endCaptures": {
558+
"1": {
559+
"name": "punctuation.whitespace.ini"
560+
},
561+
"2": {
562+
"name": "keyword.control.ini"
563+
}
564+
},
565+
"patterns": [
566+
{
567+
"include": "#Inline-Comment"
568+
},
433569
{
434570
"include": "#General-Assignment"
435571
},
@@ -915,10 +1051,6 @@
9151051
},
9161052
"Number": {
9171053
"patterns": [
918-
{
919-
"match": "-?\\d*\\.\\d+%",
920-
"name": "invalid.illegal.precentage.ini"
921-
},
9221054
{
9231055
"match": "-?\\d+(\\.\\d+)?[%fF]?",
9241056
"name": "constant.numeric.ini"

0 commit comments

Comments
 (0)