|
3 | 3 | "name": "FGD", |
4 | 4 | "scopeName": "source.fgd", |
5 | 5 | "patterns": [ |
6 | | - { |
7 | | - "include": "#classDefinition" |
8 | | - } |
| 6 | + { "include": "#classDefinition" } |
9 | 7 | ], |
10 | 8 | "repository": { |
11 | 9 | "classDefinition": { |
12 | | - "begin": "(\\@)(PointClass|NPCClass|SolidClass|KeyFrameClass|MoveClass|FilterClass|BaseClass)", |
| 10 | + "begin": "(\\@)(\\w+)", |
13 | 11 | "beginCaptures": { |
14 | | - "1": { |
15 | | - "name": "entity.name.type.fgd" |
16 | | - }, |
| 12 | + "1": { "name": "entity.name.type.fgd" }, |
17 | 13 | "2": { |
18 | | - "name": "entity.name.type.fgd" |
| 14 | + "patterns": [ |
| 15 | + { |
| 16 | + "match": "(?i)(PointClass|NPCClass|SolidClass|KeyFrameClass|MoveClass|FilterClass|BaseClass)(?-i)", |
| 17 | + "name": "entity.name.type.fgd" |
| 18 | + } |
| 19 | + ] |
19 | 20 | } |
20 | 21 | }, |
21 | 22 | "end": "\\]", |
22 | 23 | "patterns": [ |
23 | | - { |
24 | | - "include": "#helper" |
25 | | - }, |
26 | | - { |
27 | | - "include": "#content" |
28 | | - }, |
29 | | - { |
30 | | - "include": "source.kv#comment" |
31 | | - } |
| 24 | + { "include": "#helper" }, |
| 25 | + { "include": "#content" }, |
| 26 | + { "include": "source.kv#comment" } |
32 | 27 | ] |
33 | 28 | }, |
34 | 29 | "helper": { |
35 | 30 | "begin": "(\\w+)\\(", |
36 | 31 | "beginCaptures": { |
37 | | - "1": { |
38 | | - "name": "entity.other.attribute-name.fgd" |
39 | | - } |
| 32 | + "1": { "name": "entity.other.attribute-name.fgd" } |
40 | 33 | }, |
41 | 34 | "end": "\\)", |
42 | 35 | "patterns": [ |
|
58 | 51 | "content": { |
59 | 52 | "begin": "=", |
60 | 53 | "beginCaptures": { |
61 | | - "0": { |
62 | | - "name": "keyword.operator.fgd" |
63 | | - } |
| 54 | + "0": { "name": "keyword.operator.fgd" } |
64 | 55 | }, |
65 | 56 | "end": "\\]", |
66 | 57 | "patterns": [ |
67 | | - { |
68 | | - "include": "#head" |
69 | | - }, |
70 | | - { |
71 | | - "include": "#description" |
72 | | - }, |
73 | | - { |
74 | | - "include": "#body" |
75 | | - } |
| 58 | + { "include": "#head" }, |
| 59 | + { "include": "#description" }, |
| 60 | + { "include": "#body" } |
76 | 61 | ] |
77 | 62 | }, |
78 | 63 | "head": { |
79 | 64 | "name": "meta.head.fgd", |
80 | | - "match": "([\\w]+ *:)", |
| 65 | + "match": "([\\w]+ *)(:)", |
81 | 66 | "captures": { |
82 | | - "1": { |
83 | | - "name": "entity.name.class.fgd" |
84 | | - } |
| 67 | + "1": { "name": "entity.name.class.fgd" }, |
| 68 | + "2": { "name": "keyword.operator.fgd" } |
85 | 69 | } |
86 | 70 | }, |
87 | 71 | "body": { |
|
93 | 77 | "match": "(input|output)", |
94 | 78 | "name": "storage.modifier" |
95 | 79 | }, |
96 | | - { |
97 | | - "include": "#array" |
98 | | - }, |
99 | | - { |
100 | | - "include": "source.kv#comment" |
101 | | - }, |
102 | | - { |
103 | | - "include": "source.kv#number" |
104 | | - }, |
105 | | - { |
106 | | - "include": "source.kv#stringQuoted" |
107 | | - }, |
108 | | - { |
109 | | - "include": "#keyvalueName" |
110 | | - }, |
111 | | - { |
112 | | - "include": "#description" |
113 | | - } |
| 80 | + { "include": "#array" }, |
| 81 | + { "include": "source.kv#comment" }, |
| 82 | + { "include": "source.kv#number" }, |
| 83 | + { "include": "source.kv#stringQuoted" }, |
| 84 | + { "include": "#keyvalueName" }, |
| 85 | + { "include": "#description" } |
114 | 86 | ] |
115 | 87 | }, |
116 | 88 | "keyvalueName": { |
117 | 89 | "begin": "\\w+", |
118 | 90 | "beginCaptures": { |
119 | | - "0": { |
120 | | - "name": "entity.name.function.fgd" |
121 | | - } |
| 91 | + "0": { "name": "entity.name.function.fgd" } |
122 | 92 | }, |
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)\\)", |
| 93 | + "end": "\\((\\w+)\\)", |
124 | 94 | "endCaptures": { |
125 | 95 | "1": { |
126 | | - "name": "variable.parameter.fgd" |
| 96 | + "patterns": [ |
| 97 | + { |
| 98 | + "match": "(?i)(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)(?-i)", |
| 99 | + "name": "variable.parameter.fgd" |
| 100 | + } |
| 101 | + ] |
127 | 102 | } |
128 | 103 | }, |
129 | 104 | "patterns": [ |
130 | | - { |
131 | | - "include": "#preprocessorTag" |
132 | | - } |
| 105 | + { "include": "#preprocessorTag" } |
133 | 106 | ] |
134 | 107 | }, |
135 | 108 | "array": { |
136 | 109 | "begin": "\\[", |
137 | 110 | "end": "\\]", |
138 | 111 | "patterns": [ |
139 | | - { |
140 | | - "include": "source.kv#number" |
141 | | - }, |
142 | | - { |
143 | | - "include": "source.kv#stringQuoted" |
144 | | - }, |
145 | | - { |
146 | | - "include": "#preprocessorTag" |
147 | | - } |
| 112 | + { "include": "source.kv#number" }, |
| 113 | + { "include": "source.kv#stringQuoted" }, |
| 114 | + { "include": "#preprocessorTag" } |
148 | 115 | ] |
149 | 116 | }, |
150 | 117 | "description": { |
151 | 118 | "name": "string.quoted.double.fgd", |
152 | 119 | "begin": "\"", |
153 | 120 | "end": "\"(\\s+)?", |
154 | 121 | "endCaptures": { |
155 | | - "1": { |
156 | | - "name": "keyword.operator.fgd" |
157 | | - } |
| 122 | + "1": { "name": "keyword.operator.fgd" } |
158 | 123 | }, |
159 | 124 | "patterns": [ |
160 | 125 | { |
|
167 | 132 | "begin": "\\[", |
168 | 133 | "end": "\\]", |
169 | 134 | "beginCaptures": { |
170 | | - "0": { |
171 | | - "name": "keyword.operator.fgd" |
172 | | - } |
| 135 | + "0": { "name": "keyword.operator.fgd" } |
173 | 136 | }, |
174 | 137 | "endCaptures": { |
175 | | - "0": { |
176 | | - "name": "keyword.operator.fgd" |
177 | | - } |
| 138 | + "0": { "name": "keyword.operator.fgd" } |
178 | 139 | }, |
179 | 140 | "patterns": [ |
180 | 141 | { |
|
0 commit comments