Skip to content

Commit 5ca93bc

Browse files
committed
Add CommandSet syntax to ini.tmLanguage.json
1 parent d8a4750 commit 5ca93bc

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed

syntaxes/ini.tmLanguage.json

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,74 @@
3030
{ "include": "#DialogEvent-Class" },
3131
{ "include": "#AudioEvent-Class" },
3232
{ "include": "#Weather-Class" },
33-
{ "include": "#WaterTransparency-Class" }
33+
{ "include": "#WaterTransparency-Class" },
34+
{ "include": "#CommandSet" }
3435
]
3536
},
37+
"CommandSet": {
38+
"begin": "(^[ \\t]+)?([Cc]ommandSet)[ \\t]+([a-zA-Z_][\\w%]*)",
39+
"beginCaptures": {
40+
"1": {
41+
"name": "punctuation.whitespace.ini"
42+
},
43+
"2": {
44+
"name": "keyword.control.ini"
45+
},
46+
"3": {
47+
"name": "entity.name.type.class.ini"
48+
}
49+
},
50+
"end": "(^[ \\t]+)?([Ee]nd|END)",
51+
"endCaptures": {
52+
"1": {
53+
"name": "punctuation.whitespace.ini"
54+
},
55+
"2": {
56+
"name": "keyword.control.ini"
57+
}
58+
},
59+
"patterns": [
60+
{
61+
"include": "#Inline-Comment"
62+
},
63+
{
64+
"include": "#CommandSet-Assignment"
65+
},
66+
{
67+
"include": "#CommandSet-Invalid-Assignment"
68+
}
69+
]
70+
},
71+
"CommandSet-Assignment": {
72+
"begin": "(^[ \\t]+)?\\b((1[0-8])|([1-9]))\\b",
73+
"beginCaptures": {
74+
"1": {
75+
"name": "punctuation.whitespace.ini"
76+
},
77+
"2": {
78+
"name": "entity.name.type.class.ini"
79+
}
80+
},
81+
"end": "$",
82+
"patterns": [
83+
{
84+
"include": "#Inline-Comment"
85+
},
86+
{
87+
"include": "#WhiteSpace"
88+
},
89+
{
90+
"include": "#Equals"
91+
},
92+
{
93+
"include": "#String"
94+
}
95+
]
96+
},
97+
"CommandSet-Invalid-Assignment": {
98+
"match": "(^[ \\t]+)?([^\\d]|0|19|[2-9]\\d+|\\d{2,})",
99+
"name": "invalid.illegal.commandset.ini"
100+
},
36101
"WaterTransparency-Class": {
37102
"begin": "(^[ \\t]+)?([Ww]ater[Tt]ransparency)",
38103
"beginCaptures": {

0 commit comments

Comments
 (0)