7777 },
7878 "head" : {
7979 "name" : " meta.head.fgd" ,
80- "match" : " ([\\ w]+:)" ,
80+ "match" : " ([\\ w]+ * :)" ,
8181 "captures" : {
8282 "1" : {
8383 "name" : " entity.name.class.fgd"
9090 "end" : " \\ ]" ,
9191 "patterns" : [
9292 {
93- "include" : " #keyvalueName"
93+ "match" : " (input|output)" ,
94+ "name" : " storage.modifier"
9495 },
9596 {
9697 "include" : " #array"
105106 "include" : " source.kv#stringQuoted"
106107 },
107108 {
108- "include" : " #description "
109+ "include" : " #keyvalueName "
109110 },
110111 {
111- "match" : " (input|output)" ,
112- "name" : " storage.modifier"
112+ "include" : " #description"
113113 }
114114 ]
115115 },
116116 "keyvalueName" : {
117- "match " : " ( \\ w+)( \\ [ \\ w+ \\ ])? \\ ((axis|angle|angle_negative_pitch|color255|color1|filterclass|instance_file|instance_parm|instance_variable|material|node_dest|node_id|npcclass|origin|particlesystem|pointentityclass|scene|script|scriptlist|sidelist|sound|sprite|decal|studio|target_destination|target_name_or_class|target_source|vecline|vector|string|integer|float|boolean|choices|flags|void) \\ ) " ,
118- "captures " : {
119- "1 " : {
117+ "begin " : " \\ w+" ,
118+ "beginCaptures " : {
119+ "0 " : {
120120 "name" : " entity.name.function.fgd"
121- },
122- "2" : {
123- "name " : " meta.preprocessor.fgd "
124- },
125- "3 " : {
121+ }
122+ },
123+ "end " : " \\ ((axis|angle|angle_negative_pitch|color255|color1|filterclass|instance_file|instance_parm|instance_variable|material|node_dest|node_id|npcclass|origin|particlesystem|pointentityclass|scene|script|scriptlist|sidelist|sound|sprite|decal|studio|target_destination|target_name_or_class|target_source|vecline|vector|string|integer|float|boolean|choices|flags|void) \\ ) " ,
124+ "endCaptures" : {
125+ "1 " : {
126126 "name" : " variable.parameter.fgd"
127127 }
128- }
128+ },
129+ "patterns" : [
130+ {
131+ "include" : " #preprocessorTag"
132+ }
133+ ]
129134 },
130135 "array" : {
131136 "begin" : " \\ [" ,
136141 },
137142 {
138143 "include" : " source.kv#stringQuoted"
144+ },
145+ {
146+ "include" : " #preprocessorTag"
139147 }
140148 ]
141149 },
154162 "name" : " constant.character.escape.fgd"
155163 }
156164 ]
165+ },
166+ "preprocessorTag" : {
167+ "begin" : " \\ [" ,
168+ "end" : " \\ ]" ,
169+ "beginCaptures" : {
170+ "0" : {
171+ "name" : " keyword.operator.fgd"
172+ }
173+ },
174+ "endCaptures" : {
175+ "0" : {
176+ "name" : " keyword.operator.fgd"
177+ }
178+ },
179+ "patterns" : [
180+ {
181+ "match" : " (\\ w+)" ,
182+ "name" : " entity.name.tag.fgd"
183+ },
184+ {
185+ "match" : " !" ,
186+ "name" : " keyword.control.fgd"
187+ }
188+ ]
157189 }
158190 }
159191}
0 commit comments