|
15 | 15 | }, |
16 | 16 | "RE_KEYWORDS": { |
17 | 17 | "name": "keyword.control", |
18 | | - "match": "\\b(and|as|assert|begin|class|constraint|done|downto|exception|external|fun|functor|inherit|lazy|let|pub|mutable|new|nonrec|object|of|or|pri|rec|then|to|val|virtual|try|catch|finally|do|else|for|if|switch|while|import|library|export|module|in|raise|private)\\b" |
| 18 | + "match": "\\b(and|as|assert|constraint|downto|else|exception|external|false|for|if|in|include|lazy|let|module|mutable|of|open|rec|switch|to|true|try|type|when|while|with)\\b" |
19 | 19 | }, |
20 | 20 | "RE_LITERAL": { |
21 | 21 | "name": "constant.language", |
|
230 | 230 | } |
231 | 231 | ] |
232 | 232 | }, |
233 | | - "array": { |
| 233 | + "bracketAccess": { |
234 | 234 | "patterns": [ |
235 | 235 | { |
236 | 236 | "match": "\\[", |
|
261 | 261 | } |
262 | 262 | ] |
263 | 263 | }, |
264 | | - "objectAccess": { |
265 | | - "patterns": [ |
266 | | - { |
267 | | - "match": "\\b[a-z_][0-9a-zA-Z_]*(\\[)", |
268 | | - "captures": { |
269 | | - "1": { |
270 | | - "name": "punctuation.section.brackets.begin" |
271 | | - } |
272 | | - } |
273 | | - }, |
274 | | - { |
275 | | - "match": "\\]", |
276 | | - "name": "punctuation.section.brackets.end" |
277 | | - } |
278 | | - ] |
279 | | - }, |
280 | 264 | "attribute": { |
281 | 265 | "patterns": [ |
282 | 266 | { |
283 | | - "match": "(@)(splice)", |
| 267 | + "match": "(%%?|@@?)([A-Za-z_][A-Za-z0-9_\\.]*)", |
284 | 268 | "captures": { |
285 | 269 | "1": { |
286 | 270 | "name": "storage.modifier punctuation.definition.annotation" |
287 | 271 | }, |
288 | 272 | "2": { |
289 | | - "name": "invalid.illegal" |
290 | | - } |
291 | | - } |
292 | | - }, |
293 | | - { |
294 | | - "match": "(@@?)(bs\\.)?([A-Za-z_][A-Za-z0-9_\\.]*)", |
295 | | - "captures": { |
296 | | - "1": { |
297 | | - "name": "storage.modifier punctuation.definition.annotation" |
298 | | - }, |
299 | | - "2": { |
300 | | - "name": "invalid.deprecated" |
301 | | - }, |
302 | | - "3": { |
303 | | - "name": "variable.annotation" |
304 | | - } |
305 | | - } |
306 | | - }, |
307 | | - { |
308 | | - "match": "(%%?)([A-Za-z_][A-Za-z0-9_\\.]*)", |
309 | | - "captures": { |
310 | | - "1": { |
311 | | - "name": "storage.modifier punctuation.definition.annotation" |
312 | | - }, |
313 | | - "2": { |
314 | | - "name": "variable.annotation" |
| 273 | + "patterns": [ |
| 274 | + { |
| 275 | + "match": "bs\\.send\\.pipe", |
| 276 | + "name": "invalid.deprecated" |
| 277 | + }, |
| 278 | + { |
| 279 | + "match": "splice", |
| 280 | + "name": "invalid.illegal" |
| 281 | + }, |
| 282 | + { |
| 283 | + "match": "(bs\\.)?([A-Za-z_][A-Za-z0-9_\\.]*)", |
| 284 | + "captures": { |
| 285 | + "1": { |
| 286 | + "name": "invalid.deprecated" |
| 287 | + }, |
| 288 | + "2": { |
| 289 | + "name": "variable.annotation" |
| 290 | + } |
| 291 | + } |
| 292 | + }, |
| 293 | + { |
| 294 | + "match": "[A-Za-z_][A-Za-z0-9_\\.]*", |
| 295 | + "name": "variable.annotation" |
| 296 | + } |
| 297 | + ] |
315 | 298 | } |
316 | 299 | } |
317 | 300 | } |
|
461 | 444 | "include": "#list" |
462 | 445 | }, |
463 | 446 | { |
464 | | - "include": "#objectAccess" |
465 | | - }, |
466 | | - { |
467 | | - "include": "#array" |
| 447 | + "include": "#bracketAccess" |
468 | 448 | }, |
469 | 449 | { |
470 | 450 | "include": "#jsx" |
|
0 commit comments