|
17 | 17 | { |
18 | 18 | "include": "#comparisons" |
19 | 19 | }, |
| 20 | + { |
| 21 | + "include": "#commas" |
| 22 | + }, |
20 | 23 | { |
21 | 24 | "include": "#augmented-assignments" |
22 | 25 | }, |
23 | 26 | { |
24 | 27 | "include": "#assignment" |
25 | 28 | }, |
26 | 29 | { |
27 | | - "include": "#numeric" |
| 30 | + "include": "#coords" |
| 31 | + }, |
| 32 | + { |
| 33 | + "include": "#floats" |
28 | 34 | }, |
29 | 35 | { |
30 | 36 | "include": "#spaces" |
|
41 | 47 | { |
42 | 48 | "include": "#colons" |
43 | 49 | }, |
44 | | - { |
45 | | - "include": "#commas" |
46 | | - }, |
47 | 50 | { |
48 | 51 | "include": "#event" |
49 | 52 | }, |
|
59 | 62 | ], |
60 | 63 | "repository": { |
61 | 64 | "comments": { |
62 | | - "patterns": [ |
63 | | - { |
64 | | - "name": "comment.line.double-slash.pulpscript", |
65 | | - "match": "//.*" |
66 | | - } |
67 | | - ] |
| 65 | + "name": "comment.line.double-slash.pulpscript", |
| 66 | + "match": "//.*" |
68 | 67 | }, |
69 | 68 | "strings": { |
70 | 69 | "name": "string.quoted.double.pulpscript", |
|
89 | 88 | "include": "#spaces" |
90 | 89 | }, |
91 | 90 | { |
92 | | - "include": "#numeric" |
| 91 | + "include": "#floats" |
93 | 92 | }, |
94 | 93 | { |
95 | 94 | "include": "#functions" |
|
118 | 117 | ] |
119 | 118 | }, |
120 | 119 | "decrement": { |
121 | | - "patterns": [ |
122 | | - { |
123 | | - "name": "keyword.operator.decrement.pulpscript", |
124 | | - "match": "--" |
125 | | - } |
126 | | - ] |
| 120 | + "name": "keyword.operator.decrement.pulpscript", |
| 121 | + "match": "--" |
127 | 122 | }, |
128 | 123 | "increment": { |
129 | 124 | "name": "keyword.operator.increment.pulpscript", |
130 | | - "patterns": [ |
131 | | - { |
132 | | - "name": "keyword.operator.increment.pulpscript", |
133 | | - "match": "\\+\\+" |
134 | | - } |
135 | | - ] |
| 125 | + "match": "\\+\\+" |
136 | 126 | }, |
137 | 127 | "comparisons": { |
138 | | - "begin": "(if|elseif) (\\w*)( )?", |
139 | | - "beginCaptures": { |
140 | | - "0": { |
141 | | - "name": "text.pulpscript" |
142 | | - }, |
143 | | - "1": { |
144 | | - "name": "keyword.control.pulpscript" |
145 | | - }, |
146 | | - "2": { |
147 | | - "name": "variable.pulpscript" |
148 | | - } |
149 | | - }, |
150 | | - "end": "[0-9]*\\b (then)", |
151 | | - "endCaptures": { |
152 | | - "0": { |
153 | | - "name": "constant.numeric.pulpscript" |
154 | | - }, |
155 | | - "1": { |
156 | | - "name": "keyword.control.pulpscript" |
157 | | - } |
158 | | - }, |
159 | 128 | "patterns": [ |
160 | 129 | { |
161 | | - "include": "#controls" |
| 130 | + "begin": "\\b([0-9]+)(==|<=|>=)([0-9]+)", |
| 131 | + "beginCaptures": { |
| 132 | + "0": { |
| 133 | + "name": "constant.numeric.pulpscript" |
| 134 | + }, |
| 135 | + "1": { |
| 136 | + "name": "constant.numeric.pulpscript" |
| 137 | + }, |
| 138 | + "2": { |
| 139 | + "name": "keyword.operator.comparison.pulpscript" |
| 140 | + } |
| 141 | + }, |
| 142 | + "end": "\\b" |
162 | 143 | }, |
163 | 144 | { |
164 | | - "include": "#numeric" |
| 145 | + "begin": "\\b(\\w+)(==|<=|>=)([0-9]+)", |
| 146 | + "beginCaptures": { |
| 147 | + "0": { |
| 148 | + "name": "constant.numeric.pulpscript" |
| 149 | + }, |
| 150 | + "1": { |
| 151 | + "name": "variable.pulpscript" |
| 152 | + }, |
| 153 | + "2": { |
| 154 | + "name": "keyword.operator.comparison.pulpscript" |
| 155 | + } |
| 156 | + }, |
| 157 | + "end": "\\b" |
165 | 158 | }, |
166 | 159 | { |
167 | | - "include": "#strings" |
| 160 | + "begin": "\\b([0-9]+)(==|<=|>=)(\\w+)", |
| 161 | + "beginCaptures": { |
| 162 | + "0": { |
| 163 | + "name": "variable.pulpscript" |
| 164 | + }, |
| 165 | + "1": { |
| 166 | + "name": "constant.numeric.pulpscript" |
| 167 | + }, |
| 168 | + "2": { |
| 169 | + "name": "keyword.operator.comparison.pulpscript" |
| 170 | + } |
| 171 | + }, |
| 172 | + "end": "\\b" |
168 | 173 | }, |
169 | 174 | { |
170 | 175 | "name": "keyword.operator.comparison.pulpscript", |
171 | 176 | "match": "(==|<=|>=)" |
172 | | - }, |
173 | | - { |
174 | | - "include": "#variables" |
175 | 177 | } |
176 | 178 | ] |
177 | 179 | }, |
178 | 180 | "augmented-assignments": { |
179 | | - "patterns": [ |
180 | | - { |
181 | | - "name": "keyword.operator.assignment.augmented.pulpscript", |
182 | | - "match": "(-=|\\+=|\\*=|\/=)" |
183 | | - } |
184 | | - ] |
| 181 | + "name": "keyword.operator.assignment.augmented.pulpscript", |
| 182 | + "match": "(-=|\\+=|\\*=|\/=)" |
185 | 183 | }, |
186 | 184 | "assignment": { |
187 | | - "patterns": [ |
188 | | - { |
189 | | - "name": "keyword.operator.assignment.pulpscript", |
190 | | - "match": "=" |
191 | | - } |
192 | | - ] |
| 185 | + "name": "keyword.operator.assignment.pulpscript", |
| 186 | + "match": "=" |
193 | 187 | }, |
194 | | - "numeric": { |
195 | | - "patterns": [ |
196 | | - { |
197 | | - "name": "constant.numeric.pulpscript", |
198 | | - "match": "[^\\w][0-9]" |
| 188 | + "coords": { |
| 189 | + "begin": "\\b([0-9]+)", |
| 190 | + "beginCaptures": { |
| 191 | + "0": { |
| 192 | + "name": "constant.numeric.pulpscript" |
199 | 193 | } |
200 | | - ] |
| 194 | + }, |
| 195 | + "end": "(,)?([0-9]+)?\\b", |
| 196 | + "endCaptures": { |
| 197 | + "0": { |
| 198 | + "name": "constant.numeric.pulpscript" |
| 199 | + }, |
| 200 | + "1": { |
| 201 | + "name": "punctuation.separator.comma.pulpscript" |
| 202 | + } |
| 203 | + } |
| 204 | + }, |
| 205 | + "floats": { |
| 206 | + "name": "constant.numeric.pulpscript", |
| 207 | + "match": "[^a-zA-Z_][0-9]+" |
201 | 208 | }, |
202 | 209 | "spaces": { |
203 | | - "patterns": [ |
204 | | - { |
205 | | - "name": "text.pulpscript", |
206 | | - "match": " " |
207 | | - } |
208 | | - ] |
| 210 | + "name": "text.pulpscript", |
| 211 | + "match": " " |
209 | 212 | }, |
210 | 213 | "functions": { |
211 | | - "patterns": [ |
212 | | - { |
213 | | - "name": "support.function.pulpscript", |
214 | | - "match": "\\b(log|dump|say|fin|swap|frame|play|wait|shake|tell|to|call|emit|mimic|ignore|listen|act|draw|hide|window|label(:( )?)?|fill|crop|goto|sound|stop|loop|bpm|store|restore|toss|random|floor|ceil|round|sine|cosine|tangent|radians|degrees|invert|solid|type|id|name|embed:( )?)\\b" |
215 | | - } |
216 | | - ] |
| 214 | + "name": "support.function.pulpscript", |
| 215 | + "match": "\\b(log|dump|say|fin|swap|frame|play|wait|shake|tell|to|call|emit|mimic|ignore|listen|act|draw|hide|window|label(:( )?)?|fill|crop|goto|sound|stop|loop|bpm|store|restore|toss|random|floor|ceil|round|sine|cosine|tangent|radians|degrees|invert|solid|type|id|name|embed:( )?)\\b" |
217 | 216 | }, |
218 | 217 | "built-in-events": { |
219 | 218 | "begin": "\\b(on)\\b( )", |
|
246 | 245 | ] |
247 | 246 | }, |
248 | 247 | "controls": { |
249 | | - "patterns": [ |
250 | | - { |
251 | | - "name": "keyword.control.pulpscript", |
252 | | - "match": "\\b(if|then|on|while|do|else|elseif|end|menu|ask|option|once|at)\\b" |
253 | | - } |
254 | | - ] |
| 248 | + "name": "keyword.control.pulpscript", |
| 249 | + "match": "\\b(if|then|on|while|do|else|elseif|end|menu|ask|option|once|at)\\b" |
255 | 250 | }, |
256 | 251 | "colons": { |
257 | | - "patterns": [ |
258 | | - { |
259 | | - "name": "punctuation.definition.constant.pulpscript", |
260 | | - "match": ":" |
261 | | - } |
262 | | - ] |
| 252 | + "name": "punctuation.definition.constant.pulpscript", |
| 253 | + "match": ":" |
263 | 254 | }, |
264 | 255 | "commas": { |
265 | | - "patterns": [ |
266 | | - { |
267 | | - "name": "punctuation.separator.comma.pulpscript", |
268 | | - "match": "," |
269 | | - } |
270 | | - ] |
| 256 | + "name": "punctuation.separator.comma.pulpscript", |
| 257 | + "match": "," |
271 | 258 | }, |
272 | 259 | "event": { |
273 | 260 | "patterns": [ |
|
327 | 314 | ] |
328 | 315 | }, |
329 | 316 | "variables": { |
330 | | - "patterns": [ |
331 | | - { |
332 | | - "name": "variable.pulpscript", |
333 | | - "match": "(.)" |
334 | | - } |
335 | | - ] |
| 317 | + "name": "variable.pulpscript", |
| 318 | + "match": "(.)" |
336 | 319 | }, |
337 | 320 | "accessor": { |
338 | | - "patterns": [ |
339 | | - { |
340 | | - "name": "punctuation.accessor.pulpscript", |
341 | | - "match": "\\b(\\.)\\b" |
342 | | - } |
343 | | - ] |
| 321 | + "name": "punctuation.accessor.pulpscript", |
| 322 | + "match": "\\b(\\.)\\b" |
344 | 323 | } |
345 | 324 | }, |
346 | 325 | "scopeName": "text.pulpscript" |
|
0 commit comments