Skip to content

Commit 4e5e3b9

Browse files
committed
Update syntax highlighting implemented assingment
1 parent 404008f commit 4e5e3b9

File tree

1 file changed

+62
-8
lines changed

1 file changed

+62
-8
lines changed

syntaxes/ini.tmLanguage.json

Lines changed: 62 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
"include": "#keyword"
1010
},
1111
{
12-
"include": "#strings"
12+
"include": "#doublequoted-strings"
1313
}
1414
],
1515
"repository": {
1616
"keyword": {
1717
"patterns": [{
18-
"begin": "\\b(MappedImage|Object|Locomotor|Armor|CommandButton|CommandSet|FXList|AudioEvent|ObjectCreationList|ParticleSystem|PlayerTemplate|Rank|Science|SpecialPower|DialogEvent|Upgrade|Weapon|Weather)\\b\\s(\\w+)",
18+
"begin": "\\b(MappedImage|Object|Locomotor|Armor|CommandButton|CommandSet|FXList|AudioEvent|ObjectCreationList|ParticleSystem|PlayerTemplate|Rank|Science|SpecialPower|DialogEvent|Upgrade|Weapon|Weather)\\s([a-zA-Z]\\w+)",
1919
"beginCaptures": {
2020
"1": {
2121
"name": "keyword.control.ini"
@@ -30,16 +30,55 @@
3030
"name": "keyword.control.ini"
3131
}
3232
},
33-
"patterns": [{
33+
"patterns": [
34+
{
35+
"include": "#assignment"
36+
},
37+
{
3438
"include": "#inline-comment"
35-
}]
39+
}
40+
]
3641
}]
3742
},
38-
"objectConditionStates": {
39-
"name": "meta.object-condition-state.ini",
40-
"match": "\\b(NONE|None|none|DAMAGED|Damaged|damaged|REALLYDAMAGED|Reallydamaged|reallydamaged|ReallyDamaged|RUBBLE|Rubble|rubble)\\b"
43+
"assignment": {
44+
"begin": "(^[ \\t]+)?([a-zA-Z]\\w+)\\s*(\\=)\\s*",
45+
"beginCaptures": {
46+
"2": {
47+
"name": "variable.parameter"
48+
},
49+
"3": {
50+
"name": "punctuation.whitespace.ini"
51+
}
52+
},
53+
"end": "(?!\\G)",
54+
"patterns": [
55+
{
56+
"include": "#string"
57+
},
58+
{
59+
"include": "#numbers"
60+
},
61+
{
62+
"include": "#inline-comment"
63+
}
64+
]
65+
},
66+
"string": {
67+
"begin": "(^[ \\t]+)?(?=[a-zA-Z])",
68+
"beginCaptures": {
69+
"1": {
70+
"name": "punctuation.whitespace.ini"
71+
}
72+
},
73+
"end": "(?!\\G)",
74+
"patterns": [
75+
{
76+
"match": "[a-zA-Z][\\w]*",
77+
"name": "string.unquoted.ini"
78+
}
79+
]
4180
},
42-
"strings": {
81+
"doublequoted-strings": {
4382
"name": "string.quoted.double.ini",
4483
"begin": "\"",
4584
"end": "\"",
@@ -50,6 +89,21 @@
5089
}
5190
]
5291
},
92+
"numbers": {
93+
"begin": "(^[ \\t]+)?(?=\\d)",
94+
"beginCaptures": {
95+
"1": {
96+
"name": "punctuation.whitespace.ini"
97+
}
98+
},
99+
"end": "(?!\\G)",
100+
"patterns": [
101+
{
102+
"match": "\\d[\\.\\d]*",
103+
"name": "constant.numeric.ini"
104+
}
105+
]
106+
},
53107
"inline-comment": {
54108
"begin": "(^[ \\t]+)?(?=;)",
55109
"beginCaptures": {

0 commit comments

Comments
 (0)