Skip to content

Commit efd3b74

Browse files
committed
Fix preprocessor highlighting on fgd keyvalue definitions and fix input/output highlighting. Fixes #107
1 parent 5221762 commit efd3b74

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

syntaxes/fgd.tmLanguage.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"end": "\\]",
8383
"patterns": [
8484
{
85-
"match": "(?i)(input|output)(?-i)",
85+
"match": "\\b(?i)(input|output)(?-i)\\b",
8686
"name": "storage.modifier"
8787
},
8888
{
@@ -98,9 +98,14 @@
9898
]
9999
},
100100
"keyvalueName": {
101-
"begin": "(\\w+)\\(",
101+
"begin": "(\\w+)(\\[.+\\])?\\(",
102102
"beginCaptures": {
103-
"1": { "name": "entity.name.function.fgd" }
103+
"1": { "name": "entity.name.function.fgd" },
104+
"2": {
105+
"patterns": [
106+
{ "include": "#preprocessorTag" }
107+
]
108+
}
104109
},
105110
"end": "(\\w+)\\)",
106111
"endCaptures": {

0 commit comments

Comments
 (0)