highlight: Add more supported languages

79f4ea36824c3b0ab4adf7d5378f018559316b9a
Alexis Sellier committed ago 1 parent e5e534c8
crates/diff/src/bin/rustik-diff/builtins.rs +51 -1
8 8
/// Theme name used for built-in diff highlighting.
9 9
const THEME_NAME: &str = "rustik-catppuccin-mocha";
10 10
/// Built-in syntax theme JSON.
11 11
const THEME: &str = include_str!("../../themes/rustik-catppuccin-mocha.json");
12 12
/// Common syntax grammars loaded by the interactive pager.
13 -
const SYNTAXES: [SyntaxAsset; 6] = [
13 +
const SYNTAXES: [SyntaxAsset; 12] = [
14 14
    SyntaxAsset {
15 15
        source: syntax::syntaxes::C,
16 16
        file_types: &["c", "h"],
17 17
    },
18 18
    SyntaxAsset {
19 19
        source: syntax::syntaxes::CSS,
20 20
        file_types: &["css"],
21 21
    },
22 +
    SyntaxAsset {
23 +
        source: syntax::syntaxes::GO,
24 +
        file_types: &["go"],
25 +
    },
22 26
    SyntaxAsset {
23 27
        source: syntax::syntaxes::HTML,
24 28
        file_types: &["html", "htm"],
25 29
    },
30 +
    SyntaxAsset {
31 +
        source: syntax::syntaxes::JAVASCRIPT,
32 +
        file_types: &["js", "cjs", "mjs"],
33 +
    },
34 +
    SyntaxAsset {
35 +
        source: syntax::syntaxes::MAKE,
36 +
        file_types: &["makefile", "mk"],
37 +
    },
26 38
    SyntaxAsset {
27 39
        source: syntax::syntaxes::MARKDOWN,
28 40
        file_types: &["md", "markdown", "mdown"],
29 41
    },
42 +
    SyntaxAsset {
43 +
        source: syntax::syntaxes::PYTHON,
44 +
        file_types: &["py", "pyw"],
45 +
    },
46 +
    SyntaxAsset {
47 +
        source: syntax::syntaxes::RUBY,
48 +
        file_types: &["rb", "rake", "gemspec"],
49 +
    },
30 50
    SyntaxAsset {
31 51
        source: syntax::syntaxes::RUST,
32 52
        file_types: &["rs"],
33 53
    },
54 +
    SyntaxAsset {
55 +
        source: syntax::syntaxes::SHELL,
56 +
        file_types: &["sh", "bash", "zsh"],
57 +
    },
34 58
    SyntaxAsset {
35 59
        source: syntax::syntaxes::TYPESCRIPT,
36 60
        file_types: &["ts", "cts", "mts"],
37 61
    },
38 62
];
115 139
            }
116 140
        }
117 141
        syntax::Grammar::compile(&raw)
118 142
    }
119 143
}
144 +
145 +
#[cfg(test)]
146 +
mod tests {
147 +
    use super::*;
148 +
149 +
    #[test]
150 +
    fn syntax_assets_match_common_source_paths() {
151 +
        for path in [
152 +
            "main.go",
153 +
            "app.js",
154 +
            "server.mjs",
155 +
            "Makefile",
156 +
            "rules.mk",
157 +
            "script.py",
158 +
            "task.rb",
159 +
            "build.sh",
160 +
        ] {
161 +
            assert!(
162 +
                SYNTAXES
163 +
                    .iter()
164 +
                    .any(|syntax| syntax.matches_path(path.as_ref())),
165 +
                "no built-in syntax matched {path}"
166 +
            );
167 +
        }
168 +
    }
169 +
}
crates/highlight/src/syntaxes.rs +18 -0
8 8
pub const C: &str = include_str!("../syntaxes/c.json");
9 9
10 10
/// CSS grammar source.
11 11
pub const CSS: &str = include_str!("../syntaxes/css.json");
12 12
13 +
/// Go grammar source.
14 +
pub const GO: &str = include_str!("../syntaxes/go.json");
15 +
13 16
/// HTML grammar source.
14 17
pub const HTML: &str = include_str!("../syntaxes/html.json");
15 18
19 +
/// JavaScript grammar source.
20 +
pub const JAVASCRIPT: &str = include_str!("../syntaxes/javascript.json");
21 +
22 +
/// Makefile grammar source.
23 +
pub const MAKE: &str = include_str!("../syntaxes/make.json");
24 +
16 25
/// Markdown grammar source.
17 26
pub const MARKDOWN: &str = include_str!("../syntaxes/markdown.json");
18 27
28 +
/// Python grammar source.
29 +
pub const PYTHON: &str = include_str!("../syntaxes/python.json");
30 +
31 +
/// Ruby grammar source.
32 +
pub const RUBY: &str = include_str!("../syntaxes/ruby.json");
33 +
19 34
/// Rust grammar source.
20 35
pub const RUST: &str = include_str!("../syntaxes/rust.json");
21 36
37 +
/// Shell grammar source.
38 +
pub const SHELL: &str = include_str!("../syntaxes/shellscript.json");
39 +
22 40
/// TypeScript grammar source.
23 41
pub const TYPESCRIPT: &str = include_str!("../syntaxes/typescript.json");
crates/highlight/syntaxes/LICENSE +2 -0
1 1
Copyright (c) 2020 Dustin Pomerleau
2 2
Copyright (c) Microsoft Corporation
3 +
Copyright (c) 2021 Pine Wu
4 +
Copyright (c) 2023 Anthony Fu
3 5
4 6
Permission is hereby granted, free of charge, to any person obtaining a copy
5 7
of this software and associated documentation files (the "Software"), to deal
6 8
in the Software without restriction, including without limitation the rights
7 9
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
crates/highlight/syntaxes/go.json added +3156 -0
1 +
{
2 +
  "displayName": "Go",
3 +
  "name": "go",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#statements"
7 +
    }
8 +
  ],
9 +
  "repository": {
10 +
    "after_control_variables": {
11 +
      "captures": {
12 +
        "1": {
13 +
          "patterns": [
14 +
            {
15 +
              "include": "#type-declarations-without-brackets"
16 +
            },
17 +
            {
18 +
              "match": "\\[",
19 +
              "name": "punctuation.definition.begin.bracket.square.go"
20 +
            },
21 +
            {
22 +
              "match": "]",
23 +
              "name": "punctuation.definition.end.bracket.square.go"
24 +
            },
25 +
            {
26 +
              "match": "\\w+",
27 +
              "name": "variable.other.go"
28 +
            }
29 +
          ]
30 +
        }
31 +
      },
32 +
      "match": "(?<=\\brange\\b|;|\\bif\\b|\\bfor\\b|[<>]|<=|>=|==|!=|\\w[-%*+/]|\\w[-%*+/]=|\\|\\||&&)\\s*((?![]\\[]+)[-\\]!%*+./:<=>\\[_[:alnum:]]+)\\s*(?=\\{)"
33 +
    },
34 +
    "brackets": {
35 +
      "patterns": [
36 +
        {
37 +
          "begin": "\\{",
38 +
          "beginCaptures": {
39 +
            "0": {
40 +
              "name": "punctuation.definition.begin.bracket.curly.go"
41 +
            }
42 +
          },
43 +
          "end": "}",
44 +
          "endCaptures": {
45 +
            "0": {
46 +
              "name": "punctuation.definition.end.bracket.curly.go"
47 +
            }
48 +
          },
49 +
          "patterns": [
50 +
            {
51 +
              "include": "$self"
52 +
            }
53 +
          ]
54 +
        },
55 +
        {
56 +
          "begin": "\\(",
57 +
          "beginCaptures": {
58 +
            "0": {
59 +
              "name": "punctuation.definition.begin.bracket.round.go"
60 +
            }
61 +
          },
62 +
          "end": "\\)",
63 +
          "endCaptures": {
64 +
            "0": {
65 +
              "name": "punctuation.definition.end.bracket.round.go"
66 +
            }
67 +
          },
68 +
          "patterns": [
69 +
            {
70 +
              "include": "$self"
71 +
            }
72 +
          ]
73 +
        },
74 +
        {
75 +
          "begin": "\\[",
76 +
          "beginCaptures": {
77 +
            "0": {
78 +
              "name": "punctuation.definition.begin.bracket.square.go"
79 +
            }
80 +
          },
81 +
          "end": "]",
82 +
          "endCaptures": {
83 +
            "0": {
84 +
              "name": "punctuation.definition.end.bracket.square.go"
85 +
            }
86 +
          },
87 +
          "patterns": [
88 +
            {
89 +
              "include": "$self"
90 +
            }
91 +
          ]
92 +
        }
93 +
      ]
94 +
    },
95 +
    "built_in_functions": {
96 +
      "patterns": [
97 +
        {
98 +
          "match": "\\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\\b(?=\\()",
99 +
          "name": "entity.name.function.support.builtin.go"
100 +
        },
101 +
        {
102 +
          "begin": "\\b(new)\\b(\\()",
103 +
          "beginCaptures": {
104 +
            "1": {
105 +
              "name": "entity.name.function.support.builtin.go"
106 +
            },
107 +
            "2": {
108 +
              "name": "punctuation.definition.begin.bracket.round.go"
109 +
            }
110 +
          },
111 +
          "end": "\\)",
112 +
          "endCaptures": {
113 +
            "0": {
114 +
              "name": "punctuation.definition.end.bracket.round.go"
115 +
            }
116 +
          },
117 +
          "patterns": [
118 +
            {
119 +
              "include": "#functions"
120 +
            },
121 +
            {
122 +
              "include": "#struct_variables_types"
123 +
            },
124 +
            {
125 +
              "include": "#support_functions"
126 +
            },
127 +
            {
128 +
              "include": "#type-declarations"
129 +
            },
130 +
            {
131 +
              "include": "#generic_types"
132 +
            },
133 +
            {
134 +
              "match": "\\w+",
135 +
              "name": "entity.name.type.go"
136 +
            },
137 +
            {
138 +
              "include": "$self"
139 +
            }
140 +
          ]
141 +
        },
142 +
        {
143 +
          "begin": "\\b(make)\\b(\\()((?:(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+(?:\\([^)]+\\))?)?[]*\\[]+{0,1}(?:(?!\\bmap\\b)[.\\w]+)?(\\[(?:\\S+(?:,\\s*\\S+)*)?])?,?)?",
144 +
          "beginCaptures": {
145 +
            "1": {
146 +
              "name": "entity.name.function.support.builtin.go"
147 +
            },
148 +
            "2": {
149 +
              "name": "punctuation.definition.begin.bracket.round.go"
150 +
            },
151 +
            "3": {
152 +
              "patterns": [
153 +
                {
154 +
                  "include": "#type-declarations-without-brackets"
155 +
                },
156 +
                {
157 +
                  "include": "#parameter-variable-types"
158 +
                },
159 +
                {
160 +
                  "match": "\\w+",
161 +
                  "name": "entity.name.type.go"
162 +
                }
163 +
              ]
164 +
            }
165 +
          },
166 +
          "end": "\\)",
167 +
          "endCaptures": {
168 +
            "0": {
169 +
              "name": "punctuation.definition.end.bracket.round.go"
170 +
            }
171 +
          },
172 +
          "patterns": [
173 +
            {
174 +
              "include": "$self"
175 +
            }
176 +
          ]
177 +
        }
178 +
      ]
179 +
    },
180 +
    "comments": {
181 +
      "patterns": [
182 +
        {
183 +
          "begin": "(/\\*)",
184 +
          "beginCaptures": {
185 +
            "1": {
186 +
              "name": "punctuation.definition.comment.go"
187 +
            }
188 +
          },
189 +
          "end": "(\\*/)",
190 +
          "endCaptures": {
191 +
            "1": {
192 +
              "name": "punctuation.definition.comment.go"
193 +
            }
194 +
          },
195 +
          "name": "comment.block.go"
196 +
        },
197 +
        {
198 +
          "begin": "(//)",
199 +
          "beginCaptures": {
200 +
            "1": {
201 +
              "name": "punctuation.definition.comment.go"
202 +
            }
203 +
          },
204 +
          "end": "\\n|$",
205 +
          "name": "comment.line.double-slash.go"
206 +
        }
207 +
      ]
208 +
    },
209 +
    "const_assignment": {
210 +
      "patterns": [
211 +
        {
212 +
          "captures": {
213 +
            "1": {
214 +
              "patterns": [
215 +
                {
216 +
                  "include": "#delimiters"
217 +
                },
218 +
                {
219 +
                  "match": "\\w+",
220 +
                  "name": "variable.other.constant.go"
221 +
                }
222 +
              ]
223 +
            },
224 +
            "2": {
225 +
              "patterns": [
226 +
                {
227 +
                  "include": "#type-declarations-without-brackets"
228 +
                },
229 +
                {
230 +
                  "include": "#generic_types"
231 +
                },
232 +
                {
233 +
                  "match": "\\(",
234 +
                  "name": "punctuation.definition.begin.bracket.round.go"
235 +
                },
236 +
                {
237 +
                  "match": "\\)",
238 +
                  "name": "punctuation.definition.end.bracket.round.go"
239 +
                },
240 +
                {
241 +
                  "match": "\\[",
242 +
                  "name": "punctuation.definition.begin.bracket.square.go"
243 +
                },
244 +
                {
245 +
                  "match": "]",
246 +
                  "name": "punctuation.definition.end.bracket.square.go"
247 +
                },
248 +
                {
249 +
                  "match": "\\w+",
250 +
                  "name": "entity.name.type.go"
251 +
                }
252 +
              ]
253 +
            }
254 +
          },
255 +
          "match": "(?<=\\bconst\\b)\\s*\\b([.\\w]+(?:,\\s*[.\\w]+)*)\\s*((?:(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+(?:\\([^)]+\\))?)?(?![]*\\[]+{0,1}\\b(?:struct|func|map)\\b)(?:[]*.\\[\\w]+(?:,\\s*[]*.\\[\\w]+)*)?\\s*=?)?"
256 +
        },
257 +
        {
258 +
          "begin": "(?<=\\bconst\\b)\\s*(\\()",
259 +
          "beginCaptures": {
260 +
            "1": {
261 +
              "name": "punctuation.definition.begin.bracket.round.go"
262 +
            }
263 +
          },
264 +
          "end": "\\)",
265 +
          "endCaptures": {
266 +
            "0": {
267 +
              "name": "punctuation.definition.end.bracket.round.go"
268 +
            }
269 +
          },
270 +
          "patterns": [
271 +
            {
272 +
              "captures": {
273 +
                "1": {
274 +
                  "patterns": [
275 +
                    {
276 +
                      "include": "#delimiters"
277 +
                    },
278 +
                    {
279 +
                      "match": "\\w+",
280 +
                      "name": "variable.other.constant.go"
281 +
                    }
282 +
                  ]
283 +
                },
284 +
                "2": {
285 +
                  "patterns": [
286 +
                    {
287 +
                      "include": "#type-declarations-without-brackets"
288 +
                    },
289 +
                    {
290 +
                      "include": "#generic_types"
291 +
                    },
292 +
                    {
293 +
                      "match": "\\(",
294 +
                      "name": "punctuation.definition.begin.bracket.round.go"
295 +
                    },
296 +
                    {
297 +
                      "match": "\\)",
298 +
                      "name": "punctuation.definition.end.bracket.round.go"
299 +
                    },
300 +
                    {
301 +
                      "match": "\\[",
302 +
                      "name": "punctuation.definition.begin.bracket.square.go"
303 +
                    },
304 +
                    {
305 +
                      "match": "]",
306 +
                      "name": "punctuation.definition.end.bracket.square.go"
307 +
                    },
308 +
                    {
309 +
                      "match": "\\w+",
310 +
                      "name": "entity.name.type.go"
311 +
                    }
312 +
                  ]
313 +
                }
314 +
              },
315 +
              "match": "^\\s*\\b([.\\w]+(?:,\\s*[.\\w]+)*)\\s*((?:(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+(?:\\([^)]+\\))?)?(?![]*\\[]+{0,1}\\b(?:struct|func|map)\\b)(?:[]*.\\[\\w]+(?:,\\s*[]*.\\[\\w]+)*)?\\s*=?)?"
316 +
            },
317 +
            {
318 +
              "include": "$self"
319 +
            }
320 +
          ]
321 +
        }
322 +
      ]
323 +
    },
324 +
    "delimiters": {
325 +
      "patterns": [
326 +
        {
327 +
          "match": ",",
328 +
          "name": "punctuation.other.comma.go"
329 +
        },
330 +
        {
331 +
          "match": "\\.(?!\\.\\.)",
332 +
          "name": "punctuation.other.period.go"
333 +
        },
334 +
        {
335 +
          "match": ":(?!=)",
336 +
          "name": "punctuation.other.colon.go"
337 +
        }
338 +
      ]
339 +
    },
340 +
    "double_parentheses_types": {
341 +
      "captures": {
342 +
        "1": {
343 +
          "patterns": [
344 +
            {
345 +
              "include": "#type-declarations-without-brackets"
346 +
            },
347 +
            {
348 +
              "match": "\\(",
349 +
              "name": "punctuation.definition.begin.bracket.round.go"
350 +
            },
351 +
            {
352 +
              "match": "\\)",
353 +
              "name": "punctuation.definition.end.bracket.round.go"
354 +
            },
355 +
            {
356 +
              "match": "\\[",
357 +
              "name": "punctuation.definition.begin.bracket.square.go"
358 +
            },
359 +
            {
360 +
              "match": "]",
361 +
              "name": "punctuation.definition.end.bracket.square.go"
362 +
            },
363 +
            {
364 +
              "match": "\\{",
365 +
              "name": "punctuation.definition.begin.bracket.curly.go"
366 +
            },
367 +
            {
368 +
              "match": "}",
369 +
              "name": "punctuation.definition.end.bracket.curly.go"
370 +
            },
371 +
            {
372 +
              "match": "\\w+",
373 +
              "name": "entity.name.type.go"
374 +
            }
375 +
          ]
376 +
        }
377 +
      },
378 +
      "match": "(?<!\\w)(\\([]*\\[]+{0,1}[.\\w]+(?:\\[(?:[]*.\\[{}\\w]+(?:,\\s*[]*.\\[{}\\w]+)*)?])?\\))(?=\\()"
379 +
    },
380 +
    "function_declaration": {
381 +
      "begin": "^\\b(func)\\b\\s*(\\([^)]+\\)\\s*)?(?:(\\w+)(?=[(\\[]))?",
382 +
      "beginCaptures": {
383 +
        "1": {
384 +
          "name": "keyword.function.go"
385 +
        },
386 +
        "2": {
387 +
          "patterns": [
388 +
            {
389 +
              "begin": "\\(",
390 +
              "beginCaptures": {
391 +
                "0": {
392 +
                  "name": "punctuation.definition.begin.bracket.round.go"
393 +
                }
394 +
              },
395 +
              "end": "\\)",
396 +
              "endCaptures": {
397 +
                "0": {
398 +
                  "name": "punctuation.definition.end.bracket.round.go"
399 +
                }
400 +
              },
401 +
              "patterns": [
402 +
                {
403 +
                  "captures": {
404 +
                    "1": {
405 +
                      "name": "variable.parameter.go"
406 +
                    },
407 +
                    "2": {
408 +
                      "patterns": [
409 +
                        {
410 +
                          "include": "#type-declarations-without-brackets"
411 +
                        },
412 +
                        {
413 +
                          "include": "#parameter-variable-types"
414 +
                        },
415 +
                        {
416 +
                          "match": "\\w+",
417 +
                          "name": "entity.name.type.go"
418 +
                        }
419 +
                      ]
420 +
                    }
421 +
                  },
422 +
                  "match": "(\\w+\\s+)?([*.\\w]+(?:\\[(?:[*.\\w]+(?:,\\s+)?)+{0,1}])?)"
423 +
                },
424 +
                {
425 +
                  "include": "$self"
426 +
                }
427 +
              ]
428 +
            }
429 +
          ]
430 +
        },
431 +
        "3": {
432 +
          "patterns": [
433 +
            {
434 +
              "match": "\\d\\w*",
435 +
              "name": "invalid.illegal.identifier.go"
436 +
            },
437 +
            {
438 +
              "match": "\\w+",
439 +
              "name": "entity.name.function.go"
440 +
            }
441 +
          ]
442 +
        }
443 +
      },
444 +
      "end": "(?<=\\))\\s*((?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}(?![]*\\[]+{0,1}\\b(?:struct|interface)\\b)[-\\]*.\\[\\w]+)?\\s*(?=\\{)",
445 +
      "endCaptures": {
446 +
        "1": {
447 +
          "patterns": [
448 +
            {
449 +
              "include": "#type-declarations-without-brackets"
450 +
            },
451 +
            {
452 +
              "include": "#parameter-variable-types"
453 +
            },
454 +
            {
455 +
              "match": "\\w+",
456 +
              "name": "entity.name.type.go"
457 +
            }
458 +
          ]
459 +
        }
460 +
      },
461 +
      "patterns": [
462 +
        {
463 +
          "begin": "\\(",
464 +
          "beginCaptures": {
465 +
            "0": {
466 +
              "name": "punctuation.definition.begin.bracket.round.go"
467 +
            }
468 +
          },
469 +
          "end": "\\)",
470 +
          "endCaptures": {
471 +
            "0": {
472 +
              "name": "punctuation.definition.end.bracket.round.go"
473 +
            }
474 +
          },
475 +
          "patterns": [
476 +
            {
477 +
              "include": "#function_param_types"
478 +
            }
479 +
          ]
480 +
        },
481 +
        {
482 +
          "begin": "([*.\\w]+)?(\\[)",
483 +
          "beginCaptures": {
484 +
            "1": {
485 +
              "patterns": [
486 +
                {
487 +
                  "include": "#type-declarations"
488 +
                },
489 +
                {
490 +
                  "match": "\\w+",
491 +
                  "name": "entity.name.type.go"
492 +
                }
493 +
              ]
494 +
            },
495 +
            "2": {
496 +
              "name": "punctuation.definition.begin.bracket.square.go"
497 +
            }
498 +
          },
499 +
          "end": "]",
500 +
          "endCaptures": {
501 +
            "0": {
502 +
              "name": "punctuation.definition.end.bracket.square.go"
503 +
            }
504 +
          },
505 +
          "patterns": [
506 +
            {
507 +
              "include": "#generic_param_types"
508 +
            }
509 +
          ]
510 +
        },
511 +
        {
512 +
          "captures": {
513 +
            "1": {
514 +
              "patterns": [
515 +
                {
516 +
                  "include": "#type-declarations-without-brackets"
517 +
                },
518 +
                {
519 +
                  "include": "#parameter-variable-types"
520 +
                },
521 +
                {
522 +
                  "match": "\\w+",
523 +
                  "name": "entity.name.type.go"
524 +
                }
525 +
              ]
526 +
            }
527 +
          },
528 +
          "match": "(?<=\\))\\s*((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[-\\]*.<>\\[\\w]+\\s*(?:/[*/].*)?)$"
529 +
        },
530 +
        {
531 +
          "include": "$self"
532 +
        }
533 +
      ]
534 +
    },
535 +
    "function_param_types": {
536 +
      "patterns": [
537 +
        {
538 +
          "include": "#struct_variables_types"
539 +
        },
540 +
        {
541 +
          "include": "#interface_variables_types"
542 +
        },
543 +
        {
544 +
          "include": "#type-declarations-without-brackets"
545 +
        },
546 +
        {
547 +
          "captures": {
548 +
            "1": {
549 +
              "patterns": [
550 +
                {
551 +
                  "include": "#type-declarations"
552 +
                },
553 +
                {
554 +
                  "match": "\\w+",
555 +
                  "name": "variable.parameter.go"
556 +
                }
557 +
              ]
558 +
            }
559 +
          },
560 +
          "match": "((?:\\b\\w+,\\s*)+{0,1}\\b\\w+)\\s+(?=(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[]*\\[]+{0,1}\\b(?:struct|interface)\\b\\s*\\{)"
561 +
        },
562 +
        {
563 +
          "captures": {
564 +
            "1": {
565 +
              "patterns": [
566 +
                {
567 +
                  "include": "#type-declarations"
568 +
                },
569 +
                {
570 +
                  "match": "\\w+",
571 +
                  "name": "variable.parameter.go"
572 +
                }
573 +
              ]
574 +
            }
575 +
          },
576 +
          "match": "(?:(?<=\\()|^\\s*)((?:\\b\\w+,\\s*)+(?:/[*/].*)?)$"
577 +
        },
578 +
        {
579 +
          "captures": {
580 +
            "1": {
581 +
              "patterns": [
582 +
                {
583 +
                  "include": "#delimiters"
584 +
                },
585 +
                {
586 +
                  "match": "\\w+",
587 +
                  "name": "variable.parameter.go"
588 +
                }
589 +
              ]
590 +
            },
591 +
            "2": {
592 +
              "patterns": [
593 +
                {
594 +
                  "include": "#type-declarations-without-brackets"
595 +
                },
596 +
                {
597 +
                  "include": "#parameter-variable-types"
598 +
                },
599 +
                {
600 +
                  "match": "\\w+",
601 +
                  "name": "entity.name.type.go"
602 +
                }
603 +
              ]
604 +
            }
605 +
          },
606 +
          "match": "((?:\\b\\w+,\\s*)+{0,1}\\b\\w+)\\s+((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}(?:[]*.\\[\\w]+{0,1}(?:\\bfunc\\b\\([^)]+{0,1}\\)(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}\\s*)+(?:[]*.\\[\\w]+|\\([^)]+{0,1}\\))?|(?:[]*\\[]+{0,1}[*.\\w]+(?:\\[[^]]+])?[*.\\w]+{0,1})+))"
607 +
        },
608 +
        {
609 +
          "begin": "([*.\\w]+)?(\\[)",
610 +
          "beginCaptures": {
611 +
            "1": {
612 +
              "patterns": [
613 +
                {
614 +
                  "include": "#type-declarations"
615 +
                },
616 +
                {
617 +
                  "match": "\\w+",
618 +
                  "name": "entity.name.type.go"
619 +
                }
620 +
              ]
621 +
            },
622 +
            "2": {
623 +
              "name": "punctuation.definition.begin.bracket.square.go"
624 +
            }
625 +
          },
626 +
          "end": "]",
627 +
          "endCaptures": {
628 +
            "0": {
629 +
              "name": "punctuation.definition.end.bracket.square.go"
630 +
            }
631 +
          },
632 +
          "patterns": [
633 +
            {
634 +
              "include": "#generic_param_types"
635 +
            }
636 +
          ]
637 +
        },
638 +
        {
639 +
          "begin": "\\(",
640 +
          "beginCaptures": {
641 +
            "0": {
642 +
              "name": "punctuation.definition.begin.bracket.round.go"
643 +
            }
644 +
          },
645 +
          "end": "\\)",
646 +
          "endCaptures": {
647 +
            "0": {
648 +
              "name": "punctuation.definition.end.bracket.round.go"
649 +
            }
650 +
          },
651 +
          "patterns": [
652 +
            {
653 +
              "include": "#function_param_types"
654 +
            }
655 +
          ]
656 +
        },
657 +
        {
658 +
          "captures": {
659 +
            "1": {
660 +
              "patterns": [
661 +
                {
662 +
                  "include": "#type-declarations"
663 +
                },
664 +
                {
665 +
                  "match": "\\w+",
666 +
                  "name": "entity.name.type.go"
667 +
                }
668 +
              ]
669 +
            }
670 +
          },
671 +
          "match": "([.\\w]+)"
672 +
        },
673 +
        {
674 +
          "include": "$self"
675 +
        }
676 +
      ]
677 +
    },
678 +
    "functions": {
679 +
      "begin": "\\b(func)\\b(?=\\()",
680 +
      "beginCaptures": {
681 +
        "1": {
682 +
          "name": "keyword.function.go"
683 +
        }
684 +
      },
685 +
      "end": "(?<=\\))(\\s*(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+)?(\\s*(?:[]*\\[]+{0,1}[*.\\w]+)?(?:\\[(?:[*.\\w]+{0,1}(?:\\[[^]]+{0,1}])?(?:,\\s+)?)+]|\\([^)]+{0,1}\\))?[*.\\w]+{0,1}\\s*(?=\\{)|\\s*(?:[]*\\[]+{0,1}(?!\\bfunc\\b)[*.\\w]+(?:\\[(?:[*.\\w]+{0,1}(?:\\[[^]]+{0,1}])?(?:,\\s+)?)+])?[*.\\w]+{0,1}|\\([^)]+{0,1}\\)))?",
686 +
      "endCaptures": {
687 +
        "1": {
688 +
          "patterns": [
689 +
            {
690 +
              "include": "#type-declarations"
691 +
            }
692 +
          ]
693 +
        },
694 +
        "2": {
695 +
          "patterns": [
696 +
            {
697 +
              "include": "#type-declarations-without-brackets"
698 +
            },
699 +
            {
700 +
              "include": "#parameter-variable-types"
701 +
            },
702 +
            {
703 +
              "match": "\\w+",
704 +
              "name": "entity.name.type.go"
705 +
            }
706 +
          ]
707 +
        }
708 +
      },
709 +
      "patterns": [
710 +
        {
711 +
          "include": "#parameter-variable-types"
712 +
        }
713 +
      ]
714 +
    },
715 +
    "functions_inline": {
716 +
      "captures": {
717 +
        "1": {
718 +
          "name": "keyword.function.go"
719 +
        },
720 +
        "2": {
721 +
          "patterns": [
722 +
            {
723 +
              "include": "#type-declarations-without-brackets"
724 +
            },
725 +
            {
726 +
              "begin": "\\(",
727 +
              "beginCaptures": {
728 +
                "0": {
729 +
                  "name": "punctuation.definition.begin.bracket.round.go"
730 +
                }
731 +
              },
732 +
              "end": "\\)",
733 +
              "endCaptures": {
734 +
                "0": {
735 +
                  "name": "punctuation.definition.end.bracket.round.go"
736 +
                }
737 +
              },
738 +
              "patterns": [
739 +
                {
740 +
                  "include": "#function_param_types"
741 +
                },
742 +
                {
743 +
                  "include": "$self"
744 +
                }
745 +
              ]
746 +
            },
747 +
            {
748 +
              "match": "\\[",
749 +
              "name": "punctuation.definition.begin.bracket.square.go"
750 +
            },
751 +
            {
752 +
              "match": "]",
753 +
              "name": "punctuation.definition.end.bracket.square.go"
754 +
            },
755 +
            {
756 +
              "match": "\\{",
757 +
              "name": "punctuation.definition.begin.bracket.curly.go"
758 +
            },
759 +
            {
760 +
              "match": "}",
761 +
              "name": "punctuation.definition.end.bracket.curly.go"
762 +
            },
763 +
            {
764 +
              "match": "\\w+",
765 +
              "name": "entity.name.type.go"
766 +
            }
767 +
          ]
768 +
        }
769 +
      },
770 +
      "match": "\\b(func)\\b(\\([^/]*?\\)\\s+\\([^/]*?\\))\\s+(?=\\{)"
771 +
    },
772 +
    "generic_param_types": {
773 +
      "patterns": [
774 +
        {
775 +
          "include": "#struct_variables_types"
776 +
        },
777 +
        {
778 +
          "include": "#interface_variables_types"
779 +
        },
780 +
        {
781 +
          "include": "#type-declarations-without-brackets"
782 +
        },
783 +
        {
784 +
          "captures": {
785 +
            "1": {
786 +
              "patterns": [
787 +
                {
788 +
                  "include": "#type-declarations"
789 +
                },
790 +
                {
791 +
                  "match": "\\w+",
792 +
                  "name": "variable.parameter.go"
793 +
                }
794 +
              ]
795 +
            }
796 +
          },
797 +
          "match": "((?:\\b\\w+,\\s*)+{0,1}\\b\\w+)\\s+(?=(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[]*\\[]+{0,1}\\b(?:struct|interface)\\b\\s*\\{)"
798 +
        },
799 +
        {
800 +
          "captures": {
801 +
            "1": {
802 +
              "patterns": [
803 +
                {
804 +
                  "include": "#type-declarations"
805 +
                },
806 +
                {
807 +
                  "match": "\\w+",
808 +
                  "name": "variable.parameter.go"
809 +
                }
810 +
              ]
811 +
            }
812 +
          },
813 +
          "match": "(?:(?<=\\()|^\\s*)((?:\\b\\w+,\\s*)+(?:/[*/].*)?)$"
814 +
        },
815 +
        {
816 +
          "captures": {
817 +
            "1": {
818 +
              "patterns": [
819 +
                {
820 +
                  "include": "#delimiters"
821 +
                },
822 +
                {
823 +
                  "match": "\\w+",
824 +
                  "name": "variable.parameter.go"
825 +
                }
826 +
              ]
827 +
            },
828 +
            "2": {
829 +
              "patterns": [
830 +
                {
831 +
                  "include": "#type-declarations-without-brackets"
832 +
                },
833 +
                {
834 +
                  "include": "#parameter-variable-types"
835 +
                },
836 +
                {
837 +
                  "match": "\\w+",
838 +
                  "name": "entity.name.type.go"
839 +
                }
840 +
              ]
841 +
            },
842 +
            "3": {
843 +
              "patterns": [
844 +
                {
845 +
                  "include": "#type-declarations"
846 +
                },
847 +
                {
848 +
                  "match": "\\w+",
849 +
                  "name": "entity.name.type.go"
850 +
                }
851 +
              ]
852 +
            }
853 +
          },
854 +
          "match": "((?:\\b\\w+,\\s*)+{0,1}\\b\\w+)\\s+((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}(?:[]*.\\[\\w]+{0,1}(?:\\bfunc\\b\\([^)]+{0,1}\\)(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}\\s*)+(?:[*.\\w]+|\\([^)]+{0,1}\\))?|(?:(?:[*.~\\w]+|\\[(?:[*.\\w]+{0,1}(?:\\[[^]]+{0,1}])?(?:,\\s+)?)+])[*.\\w]+{0,1})+))"
855 +
        },
856 +
        {
857 +
          "begin": "([*.\\w]+)?(\\[)",
858 +
          "beginCaptures": {
859 +
            "1": {
860 +
              "patterns": [
861 +
                {
862 +
                  "include": "#type-declarations"
863 +
                },
864 +
                {
865 +
                  "match": "\\w+",
866 +
                  "name": "entity.name.type.go"
867 +
                }
868 +
              ]
869 +
            },
870 +
            "2": {
871 +
              "name": "punctuation.definition.begin.bracket.square.go"
872 +
            }
873 +
          },
874 +
          "end": "]",
875 +
          "endCaptures": {
876 +
            "0": {
877 +
              "name": "punctuation.definition.end.bracket.square.go"
878 +
            }
879 +
          },
880 +
          "patterns": [
881 +
            {
882 +
              "include": "#generic_param_types"
883 +
            }
884 +
          ]
885 +
        },
886 +
        {
887 +
          "begin": "\\(",
888 +
          "beginCaptures": {
889 +
            "0": {
890 +
              "name": "punctuation.definition.begin.bracket.round.go"
891 +
            }
892 +
          },
893 +
          "end": "\\)",
894 +
          "endCaptures": {
895 +
            "0": {
896 +
              "name": "punctuation.definition.end.bracket.round.go"
897 +
            }
898 +
          },
899 +
          "patterns": [
900 +
            {
901 +
              "include": "#function_param_types"
902 +
            }
903 +
          ]
904 +
        },
905 +
        {
906 +
          "captures": {
907 +
            "1": {
908 +
              "patterns": [
909 +
                {
910 +
                  "include": "#type-declarations"
911 +
                },
912 +
                {
913 +
                  "match": "\\w+",
914 +
                  "name": "entity.name.type.go"
915 +
                }
916 +
              ]
917 +
            }
918 +
          },
919 +
          "match": "\\b([.\\w]+)"
920 +
        },
921 +
        {
922 +
          "include": "$self"
923 +
        }
924 +
      ]
925 +
    },
926 +
    "generic_types": {
927 +
      "captures": {
928 +
        "1": {
929 +
          "patterns": [
930 +
            {
931 +
              "include": "#type-declarations"
932 +
            },
933 +
            {
934 +
              "match": "\\w+",
935 +
              "name": "entity.name.type.go"
936 +
            }
937 +
          ]
938 +
        },
939 +
        "2": {
940 +
          "patterns": [
941 +
            {
942 +
              "include": "#parameter-variable-types"
943 +
            }
944 +
          ]
945 +
        }
946 +
      },
947 +
      "match": "([*.\\w]+)(\\[[^]]+{0,1}])"
948 +
    },
949 +
    "group-functions": {
950 +
      "patterns": [
951 +
        {
952 +
          "include": "#function_declaration"
953 +
        },
954 +
        {
955 +
          "include": "#functions_inline"
956 +
        },
957 +
        {
958 +
          "include": "#functions"
959 +
        },
960 +
        {
961 +
          "include": "#built_in_functions"
962 +
        },
963 +
        {
964 +
          "include": "#support_functions"
965 +
        }
966 +
      ]
967 +
    },
968 +
    "group-types": {
969 +
      "patterns": [
970 +
        {
971 +
          "include": "#other_struct_interface_expressions"
972 +
        },
973 +
        {
974 +
          "include": "#type_assertion_inline"
975 +
        },
976 +
        {
977 +
          "include": "#struct_variables_types"
978 +
        },
979 +
        {
980 +
          "include": "#interface_variables_types"
981 +
        },
982 +
        {
983 +
          "include": "#single_type"
984 +
        },
985 +
        {
986 +
          "include": "#multi_types"
987 +
        },
988 +
        {
989 +
          "include": "#struct_interface_declaration"
990 +
        },
991 +
        {
992 +
          "include": "#double_parentheses_types"
993 +
        },
994 +
        {
995 +
          "include": "#switch_types"
996 +
        },
997 +
        {
998 +
          "include": "#type-declarations"
999 +
        }
1000 +
      ]
1001 +
    },
1002 +
    "group-variables": {
1003 +
      "patterns": [
1004 +
        {
1005 +
          "include": "#const_assignment"
1006 +
        },
1007 +
        {
1008 +
          "include": "#var_assignment"
1009 +
        },
1010 +
        {
1011 +
          "include": "#variable_assignment"
1012 +
        },
1013 +
        {
1014 +
          "include": "#label_loop_variables"
1015 +
        },
1016 +
        {
1017 +
          "include": "#slice_index_variables"
1018 +
        },
1019 +
        {
1020 +
          "include": "#property_variables"
1021 +
        },
1022 +
        {
1023 +
          "include": "#switch_variables"
1024 +
        },
1025 +
        {
1026 +
          "include": "#other_variables"
1027 +
        }
1028 +
      ]
1029 +
    },
1030 +
    "hover": {
1031 +
      "patterns": [
1032 +
        {
1033 +
          "captures": {
1034 +
            "1": {
1035 +
              "patterns": [
1036 +
                {
1037 +
                  "include": "#type-declarations"
1038 +
                },
1039 +
                {
1040 +
                  "match": "\\w+",
1041 +
                  "name": "variable.other.property.go"
1042 +
                }
1043 +
              ]
1044 +
            },
1045 +
            "2": {
1046 +
              "patterns": [
1047 +
                {
1048 +
                  "match": "\\binvalid\\b\\s+\\btype\\b",
1049 +
                  "name": "invalid.field.go"
1050 +
                },
1051 +
                {
1052 +
                  "include": "#type-declarations-without-brackets"
1053 +
                },
1054 +
                {
1055 +
                  "include": "#parameter-variable-types"
1056 +
                },
1057 +
                {
1058 +
                  "match": "\\w+",
1059 +
                  "name": "entity.name.type.go"
1060 +
                }
1061 +
              ]
1062 +
            }
1063 +
          },
1064 +
          "match": "(?<=^\\bfield\\b)\\s+([*.\\w]+)\\s+([\\s\\S]+)"
1065 +
        },
1066 +
        {
1067 +
          "captures": {
1068 +
            "1": {
1069 +
              "patterns": [
1070 +
                {
1071 +
                  "include": "#type-declarations-without-brackets"
1072 +
                },
1073 +
                {
1074 +
                  "include": "#parameter-variable-types"
1075 +
                },
1076 +
                {
1077 +
                  "match": "\\w+",
1078 +
                  "name": "entity.name.type.go"
1079 +
                }
1080 +
              ]
1081 +
            }
1082 +
          },
1083 +
          "match": "(?<=^\\breturns\\b)\\s+([\\s\\S]+)"
1084 +
        }
1085 +
      ]
1086 +
    },
1087 +
    "import": {
1088 +
      "patterns": [
1089 +
        {
1090 +
          "begin": "\\b(import)\\s+",
1091 +
          "beginCaptures": {
1092 +
            "1": {
1093 +
              "name": "keyword.control.import.go"
1094 +
            }
1095 +
          },
1096 +
          "end": "(?!\\G)",
1097 +
          "patterns": [
1098 +
            {
1099 +
              "include": "#imports"
1100 +
            }
1101 +
          ]
1102 +
        }
1103 +
      ]
1104 +
    },
1105 +
    "imports": {
1106 +
      "patterns": [
1107 +
        {
1108 +
          "captures": {
1109 +
            "1": {
1110 +
              "patterns": [
1111 +
                {
1112 +
                  "include": "#delimiters"
1113 +
                },
1114 +
                {
1115 +
                  "match": "\\w+",
1116 +
                  "name": "variable.other.import.go"
1117 +
                }
1118 +
              ]
1119 +
            },
1120 +
            "2": {
1121 +
              "name": "string.quoted.double.go"
1122 +
            },
1123 +
            "3": {
1124 +
              "name": "punctuation.definition.string.begin.go"
1125 +
            },
1126 +
            "4": {
1127 +
              "name": "entity.name.import.go"
1128 +
            },
1129 +
            "5": {
1130 +
              "name": "punctuation.definition.string.end.go"
1131 +
            }
1132 +
          },
1133 +
          "match": "(\\s*[.\\w]+)?\\s*((\")([^\"]*)(\"))"
1134 +
        },
1135 +
        {
1136 +
          "begin": "\\(",
1137 +
          "beginCaptures": {
1138 +
            "0": {
1139 +
              "name": "punctuation.definition.imports.begin.bracket.round.go"
1140 +
            }
1141 +
          },
1142 +
          "end": "\\)",
1143 +
          "endCaptures": {
1144 +
            "0": {
1145 +
              "name": "punctuation.definition.imports.end.bracket.round.go"
1146 +
            }
1147 +
          },
1148 +
          "patterns": [
1149 +
            {
1150 +
              "include": "#comments"
1151 +
            },
1152 +
            {
1153 +
              "include": "#imports"
1154 +
            }
1155 +
          ]
1156 +
        },
1157 +
        {
1158 +
          "include": "$self"
1159 +
        }
1160 +
      ]
1161 +
    },
1162 +
    "interface_variables_types": {
1163 +
      "begin": "\\b(interface)\\b\\s*(\\{)",
1164 +
      "beginCaptures": {
1165 +
        "1": {
1166 +
          "name": "keyword.interface.go"
1167 +
        },
1168 +
        "2": {
1169 +
          "name": "punctuation.definition.begin.bracket.curly.go"
1170 +
        }
1171 +
      },
1172 +
      "end": "}",
1173 +
      "endCaptures": {
1174 +
        "0": {
1175 +
          "name": "punctuation.definition.end.bracket.curly.go"
1176 +
        }
1177 +
      },
1178 +
      "patterns": [
1179 +
        {
1180 +
          "include": "#interface_variables_types_field"
1181 +
        },
1182 +
        {
1183 +
          "include": "$self"
1184 +
        }
1185 +
      ]
1186 +
    },
1187 +
    "interface_variables_types_field": {
1188 +
      "patterns": [
1189 +
        {
1190 +
          "include": "#support_functions"
1191 +
        },
1192 +
        {
1193 +
          "include": "#type-declarations-without-brackets"
1194 +
        },
1195 +
        {
1196 +
          "begin": "([*.\\w]+)?(\\[)",
1197 +
          "beginCaptures": {
1198 +
            "1": {
1199 +
              "patterns": [
1200 +
                {
1201 +
                  "include": "#type-declarations"
1202 +
                },
1203 +
                {
1204 +
                  "match": "\\w+",
1205 +
                  "name": "entity.name.type.go"
1206 +
                }
1207 +
              ]
1208 +
            },
1209 +
            "2": {
1210 +
              "name": "punctuation.definition.begin.bracket.square.go"
1211 +
            }
1212 +
          },
1213 +
          "end": "]",
1214 +
          "endCaptures": {
1215 +
            "0": {
1216 +
              "name": "punctuation.definition.end.bracket.square.go"
1217 +
            }
1218 +
          },
1219 +
          "patterns": [
1220 +
            {
1221 +
              "include": "#generic_param_types"
1222 +
            }
1223 +
          ]
1224 +
        },
1225 +
        {
1226 +
          "begin": "\\(",
1227 +
          "beginCaptures": {
1228 +
            "0": {
1229 +
              "name": "punctuation.definition.begin.bracket.round.go"
1230 +
            }
1231 +
          },
1232 +
          "end": "\\)",
1233 +
          "endCaptures": {
1234 +
            "0": {
1235 +
              "name": "punctuation.definition.end.bracket.round.go"
1236 +
            }
1237 +
          },
1238 +
          "patterns": [
1239 +
            {
1240 +
              "include": "#function_param_types"
1241 +
            }
1242 +
          ]
1243 +
        },
1244 +
        {
1245 +
          "captures": {
1246 +
            "1": {
1247 +
              "patterns": [
1248 +
                {
1249 +
                  "include": "#type-declarations"
1250 +
                },
1251 +
                {
1252 +
                  "match": "\\w+",
1253 +
                  "name": "entity.name.type.go"
1254 +
                }
1255 +
              ]
1256 +
            }
1257 +
          },
1258 +
          "match": "([.\\w]+)"
1259 +
        }
1260 +
      ]
1261 +
    },
1262 +
    "keywords": {
1263 +
      "patterns": [
1264 +
        {
1265 +
          "match": "\\b(break|case|continue|default|defer|else|fallthrough|for|go|goto|if|range|return|select|switch)\\b",
1266 +
          "name": "keyword.control.go"
1267 +
        },
1268 +
        {
1269 +
          "match": "\\bchan\\b",
1270 +
          "name": "keyword.channel.go"
1271 +
        },
1272 +
        {
1273 +
          "match": "\\bconst\\b",
1274 +
          "name": "keyword.const.go"
1275 +
        },
1276 +
        {
1277 +
          "match": "\\bvar\\b",
1278 +
          "name": "keyword.var.go"
1279 +
        },
1280 +
        {
1281 +
          "match": "\\bfunc\\b",
1282 +
          "name": "keyword.function.go"
1283 +
        },
1284 +
        {
1285 +
          "match": "\\binterface\\b",
1286 +
          "name": "keyword.interface.go"
1287 +
        },
1288 +
        {
1289 +
          "match": "\\bmap\\b",
1290 +
          "name": "keyword.map.go"
1291 +
        },
1292 +
        {
1293 +
          "match": "\\bstruct\\b",
1294 +
          "name": "keyword.struct.go"
1295 +
        },
1296 +
        {
1297 +
          "match": "\\bimport\\b",
1298 +
          "name": "keyword.control.import.go"
1299 +
        },
1300 +
        {
1301 +
          "match": "\\btype\\b",
1302 +
          "name": "keyword.type.go"
1303 +
        }
1304 +
      ]
1305 +
    },
1306 +
    "label_loop_variables": {
1307 +
      "captures": {
1308 +
        "1": {
1309 +
          "patterns": [
1310 +
            {
1311 +
              "include": "#type-declarations"
1312 +
            },
1313 +
            {
1314 +
              "match": "\\w+",
1315 +
              "name": "variable.other.label.go"
1316 +
            }
1317 +
          ]
1318 +
        }
1319 +
      },
1320 +
      "match": "^(\\s*\\w+:\\s*|\\s*\\b(?:break|goto|continue)\\b\\s+\\w+(?:\\s*/[*/]\\s*.*)?)$"
1321 +
    },
1322 +
    "language_constants": {
1323 +
      "captures": {
1324 +
        "1": {
1325 +
          "name": "constant.language.boolean.go"
1326 +
        },
1327 +
        "2": {
1328 +
          "name": "constant.language.null.go"
1329 +
        },
1330 +
        "3": {
1331 +
          "name": "constant.language.iota.go"
1332 +
        }
1333 +
      },
1334 +
      "match": "\\b(?:(true|false)|(nil)|(iota))\\b"
1335 +
    },
1336 +
    "map_types": {
1337 +
      "begin": "\\b(map)\\b(\\[)",
1338 +
      "beginCaptures": {
1339 +
        "1": {
1340 +
          "name": "keyword.map.go"
1341 +
        },
1342 +
        "2": {
1343 +
          "name": "punctuation.definition.begin.bracket.square.go"
1344 +
        }
1345 +
      },
1346 +
      "end": "(])((?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}(?![]*\\[]+{0,1}\\b(?:func|struct|map)\\b)[]*\\[]+{0,1}[.\\w]+(?:\\[(?:[]*.\\[{}\\w]+(?:,\\s*[]*.\\[{}\\w]+)*)?])?)?",
1347 +
      "endCaptures": {
1348 +
        "1": {
1349 +
          "name": "punctuation.definition.end.bracket.square.go"
1350 +
        },
1351 +
        "2": {
1352 +
          "patterns": [
1353 +
            {
1354 +
              "include": "#type-declarations-without-brackets"
1355 +
            },
1356 +
            {
1357 +
              "match": "\\[",
1358 +
              "name": "punctuation.definition.begin.bracket.square.go"
1359 +
            },
1360 +
            {
1361 +
              "match": "]",
1362 +
              "name": "punctuation.definition.end.bracket.square.go"
1363 +
            },
1364 +
            {
1365 +
              "match": "\\w+",
1366 +
              "name": "entity.name.type.go"
1367 +
            }
1368 +
          ]
1369 +
        }
1370 +
      },
1371 +
      "patterns": [
1372 +
        {
1373 +
          "include": "#type-declarations-without-brackets"
1374 +
        },
1375 +
        {
1376 +
          "include": "#parameter-variable-types"
1377 +
        },
1378 +
        {
1379 +
          "include": "#functions"
1380 +
        },
1381 +
        {
1382 +
          "match": "\\[",
1383 +
          "name": "punctuation.definition.begin.bracket.square.go"
1384 +
        },
1385 +
        {
1386 +
          "match": "]",
1387 +
          "name": "punctuation.definition.end.bracket.square.go"
1388 +
        },
1389 +
        {
1390 +
          "match": "\\{",
1391 +
          "name": "punctuation.definition.begin.bracket.curly.go"
1392 +
        },
1393 +
        {
1394 +
          "match": "}",
1395 +
          "name": "punctuation.definition.end.bracket.curly.go"
1396 +
        },
1397 +
        {
1398 +
          "match": "\\(",
1399 +
          "name": "punctuation.definition.begin.bracket.round.go"
1400 +
        },
1401 +
        {
1402 +
          "match": "\\)",
1403 +
          "name": "punctuation.definition.end.bracket.round.go"
1404 +
        },
1405 +
        {
1406 +
          "match": "\\w+",
1407 +
          "name": "entity.name.type.go"
1408 +
        }
1409 +
      ]
1410 +
    },
1411 +
    "multi_types": {
1412 +
      "begin": "\\b(type)\\b\\s*(\\()",
1413 +
      "beginCaptures": {
1414 +
        "1": {
1415 +
          "name": "keyword.type.go"
1416 +
        },
1417 +
        "2": {
1418 +
          "name": "punctuation.definition.begin.bracket.round.go"
1419 +
        }
1420 +
      },
1421 +
      "end": "\\)",
1422 +
      "endCaptures": {
1423 +
        "0": {
1424 +
          "name": "punctuation.definition.end.bracket.round.go"
1425 +
        }
1426 +
      },
1427 +
      "patterns": [
1428 +
        {
1429 +
          "include": "#struct_variables_types"
1430 +
        },
1431 +
        {
1432 +
          "include": "#interface_variables_types"
1433 +
        },
1434 +
        {
1435 +
          "include": "#type-declarations-without-brackets"
1436 +
        },
1437 +
        {
1438 +
          "include": "#parameter-variable-types"
1439 +
        },
1440 +
        {
1441 +
          "match": "\\w+",
1442 +
          "name": "entity.name.type.go"
1443 +
        }
1444 +
      ]
1445 +
    },
1446 +
    "numeric_literals": {
1447 +
      "captures": {
1448 +
        "0": {
1449 +
          "patterns": [
1450 +
            {
1451 +
              "begin": "(?=.)",
1452 +
              "end": "\\n|$",
1453 +
              "patterns": [
1454 +
                {
1455 +
                  "captures": {
1456 +
                    "1": {
1457 +
                      "name": "constant.numeric.decimal.go",
1458 +
                      "patterns": [
1459 +
                        {
1460 +
                          "match": "(?<=\\h)_(?=\\h)",
1461 +
                          "name": "punctuation.separator.constant.numeric.go"
1462 +
                        }
1463 +
                      ]
1464 +
                    },
1465 +
                    "10": {
1466 +
                      "name": "keyword.other.unit.imaginary.go"
1467 +
                    },
1468 +
                    "11": {
1469 +
                      "name": "constant.numeric.decimal.go",
1470 +
                      "patterns": [
1471 +
                        {
1472 +
                          "match": "(?<=\\h)_(?=\\h)",
1473 +
                          "name": "punctuation.separator.constant.numeric.go"
1474 +
                        }
1475 +
                      ]
1476 +
                    },
1477 +
                    "12": {
1478 +
                      "name": "punctuation.separator.constant.numeric.go"
1479 +
                    },
1480 +
                    "13": {
1481 +
                      "name": "keyword.other.unit.exponent.decimal.go"
1482 +
                    },
1483 +
                    "14": {
1484 +
                      "name": "keyword.operator.plus.exponent.decimal.go"
1485 +
                    },
1486 +
                    "15": {
1487 +
                      "name": "keyword.operator.minus.exponent.decimal.go"
1488 +
                    },
1489 +
                    "16": {
1490 +
                      "name": "constant.numeric.exponent.decimal.go",
1491 +
                      "patterns": [
1492 +
                        {
1493 +
                          "match": "(?<=\\h)_(?=\\h)",
1494 +
                          "name": "punctuation.separator.constant.numeric.go"
1495 +
                        }
1496 +
                      ]
1497 +
                    },
1498 +
                    "17": {
1499 +
                      "name": "keyword.other.unit.imaginary.go"
1500 +
                    },
1501 +
                    "18": {
1502 +
                      "name": "constant.numeric.decimal.point.go"
1503 +
                    },
1504 +
                    "19": {
1505 +
                      "name": "constant.numeric.decimal.go",
1506 +
                      "patterns": [
1507 +
                        {
1508 +
                          "match": "(?<=\\h)_(?=\\h)",
1509 +
                          "name": "punctuation.separator.constant.numeric.go"
1510 +
                        }
1511 +
                      ]
1512 +
                    },
1513 +
                    "2": {
1514 +
                      "name": "punctuation.separator.constant.numeric.go"
1515 +
                    },
1516 +
                    "20": {
1517 +
                      "name": "punctuation.separator.constant.numeric.go"
1518 +
                    },
1519 +
                    "21": {
1520 +
                      "name": "keyword.other.unit.exponent.decimal.go"
1521 +
                    },
1522 +
                    "22": {
1523 +
                      "name": "keyword.operator.plus.exponent.decimal.go"
1524 +
                    },
1525 +
                    "23": {
1526 +
                      "name": "keyword.operator.minus.exponent.decimal.go"
1527 +
                    },
1528 +
                    "24": {
1529 +
                      "name": "constant.numeric.exponent.decimal.go",
1530 +
                      "patterns": [
1531 +
                        {
1532 +
                          "match": "(?<=\\h)_(?=\\h)",
1533 +
                          "name": "punctuation.separator.constant.numeric.go"
1534 +
                        }
1535 +
                      ]
1536 +
                    },
1537 +
                    "25": {
1538 +
                      "name": "keyword.other.unit.imaginary.go"
1539 +
                    },
1540 +
                    "26": {
1541 +
                      "name": "keyword.other.unit.hexadecimal.go"
1542 +
                    },
1543 +
                    "27": {
1544 +
                      "name": "constant.numeric.hexadecimal.go",
1545 +
                      "patterns": [
1546 +
                        {
1547 +
                          "match": "(?<=\\h)_(?=\\h)",
1548 +
                          "name": "punctuation.separator.constant.numeric.go"
1549 +
                        }
1550 +
                      ]
1551 +
                    },
1552 +
                    "28": {
1553 +
                      "name": "punctuation.separator.constant.numeric.go"
1554 +
                    },
1555 +
                    "29": {
1556 +
                      "name": "constant.numeric.hexadecimal.go"
1557 +
                    },
1558 +
                    "3": {
1559 +
                      "name": "constant.numeric.decimal.point.go"
1560 +
                    },
1561 +
                    "30": {
1562 +
                      "name": "constant.numeric.hexadecimal.go",
1563 +
                      "patterns": [
1564 +
                        {
1565 +
                          "match": "(?<=\\h)_(?=\\h)",
1566 +
                          "name": "punctuation.separator.constant.numeric.go"
1567 +
                        }
1568 +
                      ]
1569 +
                    },
1570 +
                    "31": {
1571 +
                      "name": "punctuation.separator.constant.numeric.go"
1572 +
                    },
1573 +
                    "32": {
1574 +
                      "name": "keyword.other.unit.exponent.hexadecimal.go"
1575 +
                    },
1576 +
                    "33": {
1577 +
                      "name": "keyword.operator.plus.exponent.hexadecimal.go"
1578 +
                    },
1579 +
                    "34": {
1580 +
                      "name": "keyword.operator.minus.exponent.hexadecimal.go"
1581 +
                    },
1582 +
                    "35": {
1583 +
                      "name": "constant.numeric.exponent.hexadecimal.go",
1584 +
                      "patterns": [
1585 +
                        {
1586 +
                          "match": "(?<=\\h)_(?=\\h)",
1587 +
                          "name": "punctuation.separator.constant.numeric.go"
1588 +
                        }
1589 +
                      ]
1590 +
                    },
1591 +
                    "36": {
1592 +
                      "name": "keyword.other.unit.imaginary.go"
1593 +
                    },
1594 +
                    "37": {
1595 +
                      "name": "keyword.other.unit.hexadecimal.go"
1596 +
                    },
1597 +
                    "38": {
1598 +
                      "name": "constant.numeric.hexadecimal.go",
1599 +
                      "patterns": [
1600 +
                        {
1601 +
                          "match": "(?<=\\h)_(?=\\h)",
1602 +
                          "name": "punctuation.separator.constant.numeric.go"
1603 +
                        }
1604 +
                      ]
1605 +
                    },
1606 +
                    "39": {
1607 +
                      "name": "punctuation.separator.constant.numeric.go"
1608 +
                    },
1609 +
                    "4": {
1610 +
                      "name": "constant.numeric.decimal.go",
1611 +
                      "patterns": [
1612 +
                        {
1613 +
                          "match": "(?<=\\h)_(?=\\h)",
1614 +
                          "name": "punctuation.separator.constant.numeric.go"
1615 +
                        }
1616 +
                      ]
1617 +
                    },
1618 +
                    "40": {
1619 +
                      "name": "keyword.other.unit.exponent.hexadecimal.go"
1620 +
                    },
1621 +
                    "41": {
1622 +
                      "name": "keyword.operator.plus.exponent.hexadecimal.go"
1623 +
                    },
1624 +
                    "42": {
1625 +
                      "name": "keyword.operator.minus.exponent.hexadecimal.go"
1626 +
                    },
1627 +
                    "43": {
1628 +
                      "name": "constant.numeric.exponent.hexadecimal.go",
1629 +
                      "patterns": [
1630 +
                        {
1631 +
                          "match": "(?<=\\h)_(?=\\h)",
1632 +
                          "name": "punctuation.separator.constant.numeric.go"
1633 +
                        }
1634 +
                      ]
1635 +
                    },
1636 +
                    "44": {
1637 +
                      "name": "keyword.other.unit.imaginary.go"
1638 +
                    },
1639 +
                    "45": {
1640 +
                      "name": "keyword.other.unit.hexadecimal.go"
1641 +
                    },
1642 +
                    "46": {
1643 +
                      "name": "constant.numeric.hexadecimal.go"
1644 +
                    },
1645 +
                    "47": {
1646 +
                      "name": "constant.numeric.hexadecimal.go",
1647 +
                      "patterns": [
1648 +
                        {
1649 +
                          "match": "(?<=\\h)_(?=\\h)",
1650 +
                          "name": "punctuation.separator.constant.numeric.go"
1651 +
                        }
1652 +
                      ]
1653 +
                    },
1654 +
                    "48": {
1655 +
                      "name": "punctuation.separator.constant.numeric.go"
1656 +
                    },
1657 +
                    "49": {
1658 +
                      "name": "keyword.other.unit.exponent.hexadecimal.go"
1659 +
                    },
1660 +
                    "5": {
1661 +
                      "name": "punctuation.separator.constant.numeric.go"
1662 +
                    },
1663 +
                    "50": {
1664 +
                      "name": "keyword.operator.plus.exponent.hexadecimal.go"
1665 +
                    },
1666 +
                    "51": {
1667 +
                      "name": "keyword.operator.minus.exponent.hexadecimal.go"
1668 +
                    },
1669 +
                    "52": {
1670 +
                      "name": "constant.numeric.exponent.hexadecimal.go",
1671 +
                      "patterns": [
1672 +
                        {
1673 +
                          "match": "(?<=\\h)_(?=\\h)",
1674 +
                          "name": "punctuation.separator.constant.numeric.go"
1675 +
                        }
1676 +
                      ]
1677 +
                    },
1678 +
                    "53": {
1679 +
                      "name": "keyword.other.unit.imaginary.go"
1680 +
                    },
1681 +
                    "6": {
1682 +
                      "name": "keyword.other.unit.exponent.decimal.go"
1683 +
                    },
1684 +
                    "7": {
1685 +
                      "name": "keyword.operator.plus.exponent.decimal.go"
1686 +
                    },
1687 +
                    "8": {
1688 +
                      "name": "keyword.operator.minus.exponent.decimal.go"
1689 +
                    },
1690 +
                    "9": {
1691 +
                      "name": "constant.numeric.exponent.decimal.go",
1692 +
                      "patterns": [
1693 +
                        {
1694 +
                          "match": "(?<=\\h)_(?=\\h)",
1695 +
                          "name": "punctuation.separator.constant.numeric.go"
1696 +
                        }
1697 +
                      ]
1698 +
                    }
1699 +
                  },
1700 +
                  "match": "\\G(?:(?:(?:(?:(?:(?=[.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\\h)_(?=\\h)))*)((?<=[0-9])\\.|\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\h)_(?=\\h)))*)?(?:(?<!_)([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*))?(i(?!\\w))?(?:\\n|$)|(?=[.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\\h)_(?=\\h)))*)(?<!_)([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*)(i(?!\\w))?(?:\\n|$))|((?<=[0-9])\\.|\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\h)_(?=\\h)))*)(?:(?<!_)([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*))?(i(?!\\w))?(?:\\n|$))|(0[Xx])_?(\\h(?:\\h|((?<=\\h)_(?=\\h)))*)((?<=\\h)\\.|\\.(?=\\h))(\\h(?:\\h|((?<=\\h)_(?=\\h)))*)?(?<!_)([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*)(i(?!\\w))?(?:\\n|$))|(0[Xx])_?(\\h(?:\\h|((?<=\\h)_(?=\\h)))*)(?<!_)([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*)(i(?!\\w))?(?:\\n|$))|(0[Xx])((?<=\\h)\\.|\\.(?=\\h))(\\h(?:\\h|((?<=\\h)_(?=\\h)))*)(?<!_)([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)_(?=\\h))*)(i(?!\\w))?(?:\\n|$))"
1701 +
                },
1702 +
                {
1703 +
                  "captures": {
1704 +
                    "1": {
1705 +
                      "name": "constant.numeric.decimal.go",
1706 +
                      "patterns": [
1707 +
                        {
1708 +
                          "match": "(?<=\\h)_(?=\\h)",
1709 +
                          "name": "punctuation.separator.constant.numeric.go"
1710 +
                        }
1711 +
                      ]
1712 +
                    },
1713 +
                    "10": {
1714 +
                      "name": "punctuation.separator.constant.numeric.go"
1715 +
                    },
1716 +
                    "11": {
1717 +
                      "name": "keyword.other.unit.imaginary.go"
1718 +
                    },
1719 +
                    "12": {
1720 +
                      "name": "keyword.other.unit.hexadecimal.go"
1721 +
                    },
1722 +
                    "13": {
1723 +
                      "name": "constant.numeric.hexadecimal.go",
1724 +
                      "patterns": [
1725 +
                        {
1726 +
                          "match": "(?<=\\h)_(?=\\h)",
1727 +
                          "name": "punctuation.separator.constant.numeric.go"
1728 +
                        }
1729 +
                      ]
1730 +
                    },
1731 +
                    "14": {
1732 +
                      "name": "punctuation.separator.constant.numeric.go"
1733 +
                    },
1734 +
                    "15": {
1735 +
                      "name": "keyword.other.unit.imaginary.go"
1736 +
                    },
1737 +
                    "2": {
1738 +
                      "name": "punctuation.separator.constant.numeric.go"
1739 +
                    },
1740 +
                    "3": {
1741 +
                      "name": "keyword.other.unit.imaginary.go"
1742 +
                    },
1743 +
                    "4": {
1744 +
                      "name": "keyword.other.unit.binary.go"
1745 +
                    },
1746 +
                    "5": {
1747 +
                      "name": "constant.numeric.binary.go",
1748 +
                      "patterns": [
1749 +
                        {
1750 +
                          "match": "(?<=\\h)_(?=\\h)",
1751 +
                          "name": "punctuation.separator.constant.numeric.go"
1752 +
                        }
1753 +
                      ]
1754 +
                    },
1755 +
                    "6": {
1756 +
                      "name": "punctuation.separator.constant.numeric.go"
1757 +
                    },
1758 +
                    "7": {
1759 +
                      "name": "keyword.other.unit.imaginary.go"
1760 +
                    },
1761 +
                    "8": {
1762 +
                      "name": "keyword.other.unit.octal.go"
1763 +
                    },
1764 +
                    "9": {
1765 +
                      "name": "constant.numeric.octal.go",
1766 +
                      "patterns": [
1767 +
                        {
1768 +
                          "match": "(?<=\\h)_(?=\\h)",
1769 +
                          "name": "punctuation.separator.constant.numeric.go"
1770 +
                        }
1771 +
                      ]
1772 +
                    }
1773 +
                  },
1774 +
                  "match": "\\G(?:(?:(?:(?=[.0-9])(?!0[BOXbox])([0-9](?:[0-9]|((?<=\\h)_(?=\\h)))*)(i(?!\\w))?(?:\\n|$)|(0[Bb])_?([01](?:[01]|((?<=\\h)_(?=\\h)))*)(i(?!\\w))?(?:\\n|$))|(0[Oo]?)_?((?:[0-7]|((?<=\\h)_(?=\\h)))+)(i(?!\\w))?(?:\\n|$))|(0[Xx])_?(\\h(?:\\h|((?<=\\h)_(?=\\h)))*)(i(?!\\w))?(?:\\n|$))"
1775 +
                },
1776 +
                {
1777 +
                  "match": "(?:[.0-9A-Z_a-z]|(?<=[EPep])[-+])+",
1778 +
                  "name": "invalid.illegal.constant.numeric.go"
1779 +
                }
1780 +
              ]
1781 +
            }
1782 +
          ]
1783 +
        }
1784 +
      },
1785 +
      "match": "(?<!\\w)\\.?\\d(?:[.0-9A-Z_a-z]|(?<=[EPep])[-+])*"
1786 +
    },
1787 +
    "operators": {
1788 +
      "patterns": [
1789 +
        {
1790 +
          "match": "(?<!\\w)[\\&*]+(?!\\d)(?=[]\\[\\w]|<-)",
1791 +
          "name": "keyword.operator.address.go"
1792 +
        },
1793 +
        {
1794 +
          "match": "<-",
1795 +
          "name": "keyword.operator.channel.go"
1796 +
        },
1797 +
        {
1798 +
          "match": "--",
1799 +
          "name": "keyword.operator.decrement.go"
1800 +
        },
1801 +
        {
1802 +
          "match": "\\+\\+",
1803 +
          "name": "keyword.operator.increment.go"
1804 +
        },
1805 +
        {
1806 +
          "match": "(==|!=|<=|>=|<(?!<)|>(?!>))",
1807 +
          "name": "keyword.operator.comparison.go"
1808 +
        },
1809 +
        {
1810 +
          "match": "(&&|\\|\\||!)",
1811 +
          "name": "keyword.operator.logical.go"
1812 +
        },
1813 +
        {
1814 +
          "match": "((?:|[-%*+/:^|]|<<|>>|&\\^?)=)",
1815 +
          "name": "keyword.operator.assignment.go"
1816 +
        },
1817 +
        {
1818 +
          "match": "([-%*+/])",
1819 +
          "name": "keyword.operator.arithmetic.go"
1820 +
        },
1821 +
        {
1822 +
          "match": "(&(?!\\^)|[\\^|]|&\\^|<<|>>|~)",
1823 +
          "name": "keyword.operator.arithmetic.bitwise.go"
1824 +
        },
1825 +
        {
1826 +
          "match": "\\.\\.\\.",
1827 +
          "name": "keyword.operator.ellipsis.go"
1828 +
        }
1829 +
      ]
1830 +
    },
1831 +
    "other_struct_interface_expressions": {
1832 +
      "patterns": [
1833 +
        {
1834 +
          "include": "#after_control_variables"
1835 +
        },
1836 +
        {
1837 +
          "captures": {
1838 +
            "1": {
1839 +
              "patterns": [
1840 +
                {
1841 +
                  "include": "#type-declarations"
1842 +
                },
1843 +
                {
1844 +
                  "match": "\\w+",
1845 +
                  "name": "entity.name.type.go"
1846 +
                }
1847 +
              ]
1848 +
            },
1849 +
            "2": {
1850 +
              "patterns": [
1851 +
                {
1852 +
                  "include": "#type-declarations-without-brackets"
1853 +
                },
1854 +
                {
1855 +
                  "match": "\\[",
1856 +
                  "name": "punctuation.definition.begin.bracket.square.go"
1857 +
                },
1858 +
                {
1859 +
                  "match": "]",
1860 +
                  "name": "punctuation.definition.end.bracket.square.go"
1861 +
                },
1862 +
                {
1863 +
                  "match": "\\{",
1864 +
                  "name": "punctuation.definition.begin.bracket.curly.go"
1865 +
                },
1866 +
                {
1867 +
                  "match": "}",
1868 +
                  "name": "punctuation.definition.end.bracket.curly.go"
1869 +
                },
1870 +
                {
1871 +
                  "match": "\\w+",
1872 +
                  "name": "entity.name.type.go"
1873 +
                }
1874 +
              ]
1875 +
            }
1876 +
          },
1877 +
          "match": "\\b(?!(?:struct|interface)\\b)([.\\w]+)(?<brackets>\\[(?:[^]\\[]|\\g<brackets>)*])?(?=\\{)"
1878 +
        }
1879 +
      ]
1880 +
    },
1881 +
    "other_variables": {
1882 +
      "match": "\\w+",
1883 +
      "name": "variable.other.go"
1884 +
    },
1885 +
    "package_name": {
1886 +
      "patterns": [
1887 +
        {
1888 +
          "begin": "\\b(package)\\s+",
1889 +
          "beginCaptures": {
1890 +
            "1": {
1891 +
              "name": "keyword.package.go"
1892 +
            }
1893 +
          },
1894 +
          "end": "(?!\\G)",
1895 +
          "patterns": [
1896 +
            {
1897 +
              "match": "\\d\\w*",
1898 +
              "name": "invalid.illegal.identifier.go"
1899 +
            },
1900 +
            {
1901 +
              "match": "\\w+",
1902 +
              "name": "entity.name.type.package.go"
1903 +
            }
1904 +
          ]
1905 +
        }
1906 +
      ]
1907 +
    },
1908 +
    "parameter-variable-types": {
1909 +
      "patterns": [
1910 +
        {
1911 +
          "match": "\\{",
1912 +
          "name": "punctuation.definition.begin.bracket.curly.go"
1913 +
        },
1914 +
        {
1915 +
          "match": "}",
1916 +
          "name": "punctuation.definition.end.bracket.curly.go"
1917 +
        },
1918 +
        {
1919 +
          "begin": "([*.\\w]+)?(\\[)",
1920 +
          "beginCaptures": {
1921 +
            "1": {
1922 +
              "patterns": [
1923 +
                {
1924 +
                  "include": "#type-declarations"
1925 +
                },
1926 +
                {
1927 +
                  "match": "\\w+",
1928 +
                  "name": "entity.name.type.go"
1929 +
                }
1930 +
              ]
1931 +
            },
1932 +
            "2": {
1933 +
              "name": "punctuation.definition.begin.bracket.square.go"
1934 +
            }
1935 +
          },
1936 +
          "end": "]",
1937 +
          "endCaptures": {
1938 +
            "0": {
1939 +
              "name": "punctuation.definition.end.bracket.square.go"
1940 +
            }
1941 +
          },
1942 +
          "patterns": [
1943 +
            {
1944 +
              "include": "#generic_param_types"
1945 +
            }
1946 +
          ]
1947 +
        },
1948 +
        {
1949 +
          "begin": "\\(",
1950 +
          "beginCaptures": {
1951 +
            "0": {
1952 +
              "name": "punctuation.definition.begin.bracket.round.go"
1953 +
            }
1954 +
          },
1955 +
          "end": "\\)",
1956 +
          "endCaptures": {
1957 +
            "0": {
1958 +
              "name": "punctuation.definition.end.bracket.round.go"
1959 +
            }
1960 +
          },
1961 +
          "patterns": [
1962 +
            {
1963 +
              "include": "#function_param_types"
1964 +
            }
1965 +
          ]
1966 +
        }
1967 +
      ]
1968 +
    },
1969 +
    "property_variables": {
1970 +
      "captures": {
1971 +
        "1": {
1972 +
          "patterns": [
1973 +
            {
1974 +
              "include": "#type-declarations"
1975 +
            },
1976 +
            {
1977 +
              "match": "\\w+",
1978 +
              "name": "variable.other.property.go"
1979 +
            }
1980 +
          ]
1981 +
        }
1982 +
      },
1983 +
      "match": "\\b([.\\w]+:(?!=))"
1984 +
    },
1985 +
    "raw_string_literals": {
1986 +
      "begin": "`",
1987 +
      "beginCaptures": {
1988 +
        "0": {
1989 +
          "name": "punctuation.definition.string.begin.go"
1990 +
        }
1991 +
      },
1992 +
      "end": "`",
1993 +
      "endCaptures": {
1994 +
        "0": {
1995 +
          "name": "punctuation.definition.string.end.go"
1996 +
        }
1997 +
      },
1998 +
      "name": "string.quoted.raw.go",
1999 +
      "patterns": [
2000 +
        {
2001 +
          "include": "#string_placeholder"
2002 +
        }
2003 +
      ]
2004 +
    },
2005 +
    "runes": {
2006 +
      "patterns": [
2007 +
        {
2008 +
          "begin": "'",
2009 +
          "beginCaptures": {
2010 +
            "0": {
2011 +
              "name": "punctuation.definition.string.begin.go"
2012 +
            }
2013 +
          },
2014 +
          "end": "'",
2015 +
          "endCaptures": {
2016 +
            "0": {
2017 +
              "name": "punctuation.definition.string.end.go"
2018 +
            }
2019 +
          },
2020 +
          "name": "string.quoted.rune.go",
2021 +
          "patterns": [
2022 +
            {
2023 +
              "match": "\\G(\\\\([0-7]{3}|[\"'\\\\abfnrtv]|x\\h{2}|u\\h{4}|U\\h{8})|.)(?=')",
2024 +
              "name": "constant.other.rune.go"
2025 +
            },
2026 +
            {
2027 +
              "match": "[^']+",
2028 +
              "name": "invalid.illegal.unknown-rune.go"
2029 +
            }
2030 +
          ]
2031 +
        }
2032 +
      ]
2033 +
    },
2034 +
    "single_type": {
2035 +
      "patterns": [
2036 +
        {
2037 +
          "captures": {
2038 +
            "1": {
2039 +
              "name": "keyword.type.go"
2040 +
            },
2041 +
            "2": {
2042 +
              "patterns": [
2043 +
                {
2044 +
                  "include": "#type-declarations"
2045 +
                },
2046 +
                {
2047 +
                  "match": "\\w+",
2048 +
                  "name": "entity.name.type.go"
2049 +
                }
2050 +
              ]
2051 +
            },
2052 +
            "3": {
2053 +
              "patterns": [
2054 +
                {
2055 +
                  "begin": "\\(",
2056 +
                  "beginCaptures": {
2057 +
                    "0": {
2058 +
                      "name": "punctuation.definition.begin.bracket.round.go"
2059 +
                    }
2060 +
                  },
2061 +
                  "end": "\\)",
2062 +
                  "endCaptures": {
2063 +
                    "0": {
2064 +
                      "name": "punctuation.definition.end.bracket.round.go"
2065 +
                    }
2066 +
                  },
2067 +
                  "patterns": [
2068 +
                    {
2069 +
                      "include": "#function_param_types"
2070 +
                    },
2071 +
                    {
2072 +
                      "include": "$self"
2073 +
                    }
2074 +
                  ]
2075 +
                },
2076 +
                {
2077 +
                  "include": "#type-declarations"
2078 +
                },
2079 +
                {
2080 +
                  "include": "#generic_types"
2081 +
                },
2082 +
                {
2083 +
                  "match": "\\w+",
2084 +
                  "name": "entity.name.type.go"
2085 +
                }
2086 +
              ]
2087 +
            }
2088 +
          },
2089 +
          "match": "^\\s*\\b(type)\\b\\s*([*.\\w]+)\\s+(?!(?:=\\s*)?[]*\\[]+{0,1}\\b(?:struct|interface)\\b)([\\s\\S]+)"
2090 +
        },
2091 +
        {
2092 +
          "begin": "(?:^|\\s+)\\b(type)\\b\\s*([*.\\w]+)(?=\\[)",
2093 +
          "beginCaptures": {
2094 +
            "1": {
2095 +
              "name": "keyword.type.go"
2096 +
            },
2097 +
            "2": {
2098 +
              "patterns": [
2099 +
                {
2100 +
                  "include": "#type-declarations-without-brackets"
2101 +
                },
2102 +
                {
2103 +
                  "match": "\\w+",
2104 +
                  "name": "entity.name.type.go"
2105 +
                }
2106 +
              ]
2107 +
            }
2108 +
          },
2109 +
          "end": "(?<=])(\\s+(?:=\\s*)?(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}(?![]*\\[]+{0,1}\\b(?:struct|interface|func)\\b)[-\\]*.\\[\\w]+(?:,\\s*[]*.\\[\\w]+)*)?",
2110 +
          "endCaptures": {
2111 +
            "1": {
2112 +
              "patterns": [
2113 +
                {
2114 +
                  "include": "#type-declarations-without-brackets"
2115 +
                },
2116 +
                {
2117 +
                  "match": "\\[",
2118 +
                  "name": "punctuation.definition.begin.bracket.square.go"
2119 +
                },
2120 +
                {
2121 +
                  "match": "]",
2122 +
                  "name": "punctuation.definition.end.bracket.square.go"
2123 +
                },
2124 +
                {
2125 +
                  "match": "\\w+",
2126 +
                  "name": "entity.name.type.go"
2127 +
                }
2128 +
              ]
2129 +
            }
2130 +
          },
2131 +
          "patterns": [
2132 +
            {
2133 +
              "include": "#struct_variables_types"
2134 +
            },
2135 +
            {
2136 +
              "include": "#type-declarations-without-brackets"
2137 +
            },
2138 +
            {
2139 +
              "include": "#parameter-variable-types"
2140 +
            },
2141 +
            {
2142 +
              "match": "\\[",
2143 +
              "name": "punctuation.definition.begin.bracket.square.go"
2144 +
            },
2145 +
            {
2146 +
              "match": "]",
2147 +
              "name": "punctuation.definition.end.bracket.square.go"
2148 +
            },
2149 +
            {
2150 +
              "match": "\\{",
2151 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2152 +
            },
2153 +
            {
2154 +
              "match": "}",
2155 +
              "name": "punctuation.definition.end.bracket.curly.go"
2156 +
            },
2157 +
            {
2158 +
              "match": "\\(",
2159 +
              "name": "punctuation.definition.begin.bracket.round.go"
2160 +
            },
2161 +
            {
2162 +
              "match": "\\)",
2163 +
              "name": "punctuation.definition.end.bracket.round.go"
2164 +
            },
2165 +
            {
2166 +
              "match": "\\w+",
2167 +
              "name": "entity.name.type.go"
2168 +
            }
2169 +
          ]
2170 +
        }
2171 +
      ]
2172 +
    },
2173 +
    "slice_index_variables": {
2174 +
      "captures": {
2175 +
        "1": {
2176 +
          "patterns": [
2177 +
            {
2178 +
              "include": "#type-declarations"
2179 +
            },
2180 +
            {
2181 +
              "match": "\\w+",
2182 +
              "name": "variable.other.go"
2183 +
            }
2184 +
          ]
2185 +
        }
2186 +
      },
2187 +
      "match": "(?<=\\w\\[)((?:\\b[-%\\&*+./<>|\\w]+:|:\\b[-%\\&*+./<>|\\w]+)(?:\\b[-%\\&*+./<>|\\w]+)?(?::\\b[-%\\&*+./<>|\\w]+)?)(?=])"
2188 +
    },
2189 +
    "statements": {
2190 +
      "patterns": [
2191 +
        {
2192 +
          "include": "#package_name"
2193 +
        },
2194 +
        {
2195 +
          "include": "#import"
2196 +
        },
2197 +
        {
2198 +
          "include": "#syntax_errors"
2199 +
        },
2200 +
        {
2201 +
          "include": "#group-functions"
2202 +
        },
2203 +
        {
2204 +
          "include": "#group-types"
2205 +
        },
2206 +
        {
2207 +
          "include": "#group-variables"
2208 +
        },
2209 +
        {
2210 +
          "include": "#hover"
2211 +
        }
2212 +
      ]
2213 +
    },
2214 +
    "storage_types": {
2215 +
      "patterns": [
2216 +
        {
2217 +
          "match": "\\bbool\\b",
2218 +
          "name": "storage.type.boolean.go"
2219 +
        },
2220 +
        {
2221 +
          "match": "\\bbyte\\b",
2222 +
          "name": "storage.type.byte.go"
2223 +
        },
2224 +
        {
2225 +
          "match": "\\berror\\b",
2226 +
          "name": "storage.type.error.go"
2227 +
        },
2228 +
        {
2229 +
          "match": "\\b(complex(64|128)|float(32|64)|u?int(8|16|32|64)?)\\b",
2230 +
          "name": "storage.type.numeric.go"
2231 +
        },
2232 +
        {
2233 +
          "match": "\\brune\\b",
2234 +
          "name": "storage.type.rune.go"
2235 +
        },
2236 +
        {
2237 +
          "match": "\\bstring\\b",
2238 +
          "name": "storage.type.string.go"
2239 +
        },
2240 +
        {
2241 +
          "match": "\\buintptr\\b",
2242 +
          "name": "storage.type.uintptr.go"
2243 +
        },
2244 +
        {
2245 +
          "match": "\\bany\\b",
2246 +
          "name": "entity.name.type.any.go"
2247 +
        },
2248 +
        {
2249 +
          "match": "\\bcomparable\\b",
2250 +
          "name": "entity.name.type.comparable.go"
2251 +
        }
2252 +
      ]
2253 +
    },
2254 +
    "string_escaped_char": {
2255 +
      "patterns": [
2256 +
        {
2257 +
          "match": "\\\\([0-7]{3}|[\"'\\\\abfnrtv]|x\\h{2}|u\\h{4}|U\\h{8})",
2258 +
          "name": "constant.character.escape.go"
2259 +
        },
2260 +
        {
2261 +
          "match": "\\\\[^\"'0-7Uabfnrtuvx]",
2262 +
          "name": "invalid.illegal.unknown-escape.go"
2263 +
        }
2264 +
      ]
2265 +
    },
2266 +
    "string_literals": {
2267 +
      "patterns": [
2268 +
        {
2269 +
          "begin": "\"",
2270 +
          "beginCaptures": {
2271 +
            "0": {
2272 +
              "name": "punctuation.definition.string.begin.go"
2273 +
            }
2274 +
          },
2275 +
          "end": "\"",
2276 +
          "endCaptures": {
2277 +
            "0": {
2278 +
              "name": "punctuation.definition.string.end.go"
2279 +
            }
2280 +
          },
2281 +
          "name": "string.quoted.double.go",
2282 +
          "patterns": [
2283 +
            {
2284 +
              "include": "#string_escaped_char"
2285 +
            },
2286 +
            {
2287 +
              "include": "#string_placeholder"
2288 +
            }
2289 +
          ]
2290 +
        }
2291 +
      ]
2292 +
    },
2293 +
    "string_placeholder": {
2294 +
      "patterns": [
2295 +
        {
2296 +
          "match": "%(\\[\\d+])?([- #+0]{0,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+])\\*?)?(\\[\\d+])?)?))?[%EFGTUXb-gopqstvwx]",
2297 +
          "name": "constant.other.placeholder.go"
2298 +
        }
2299 +
      ]
2300 +
    },
2301 +
    "struct_interface_declaration": {
2302 +
      "captures": {
2303 +
        "1": {
2304 +
          "name": "keyword.type.go"
2305 +
        },
2306 +
        "2": {
2307 +
          "patterns": [
2308 +
            {
2309 +
              "include": "#type-declarations"
2310 +
            },
2311 +
            {
2312 +
              "match": "\\w+",
2313 +
              "name": "entity.name.type.go"
2314 +
            }
2315 +
          ]
2316 +
        }
2317 +
      },
2318 +
      "match": "^\\s*\\b(type)\\b\\s*([.\\w]+)"
2319 +
    },
2320 +
    "struct_variable_types_fields_multi": {
2321 +
      "patterns": [
2322 +
        {
2323 +
          "begin": "\\b(\\w+(?:,\\s*\\b\\w+)*(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}\\s*[]*\\[]+{0,1})\\b(struct)\\b\\s*(\\{)",
2324 +
          "beginCaptures": {
2325 +
            "1": {
2326 +
              "patterns": [
2327 +
                {
2328 +
                  "include": "#type-declarations"
2329 +
                },
2330 +
                {
2331 +
                  "match": "\\w+",
2332 +
                  "name": "variable.other.property.go"
2333 +
                }
2334 +
              ]
2335 +
            },
2336 +
            "2": {
2337 +
              "name": "keyword.struct.go"
2338 +
            },
2339 +
            "3": {
2340 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2341 +
            }
2342 +
          },
2343 +
          "end": "}",
2344 +
          "endCaptures": {
2345 +
            "0": {
2346 +
              "name": "punctuation.definition.end.bracket.curly.go"
2347 +
            }
2348 +
          },
2349 +
          "patterns": [
2350 +
            {
2351 +
              "include": "#struct_variables_types_fields"
2352 +
            },
2353 +
            {
2354 +
              "include": "$self"
2355 +
            }
2356 +
          ]
2357 +
        },
2358 +
        {
2359 +
          "begin": "\\b(\\w+(?:,\\s*\\b\\w+)*(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}\\s*[]*\\[]+{0,1})\\b(interface)\\b\\s*(\\{)",
2360 +
          "beginCaptures": {
2361 +
            "1": {
2362 +
              "patterns": [
2363 +
                {
2364 +
                  "include": "#type-declarations"
2365 +
                },
2366 +
                {
2367 +
                  "match": "\\w+",
2368 +
                  "name": "variable.other.property.go"
2369 +
                }
2370 +
              ]
2371 +
            },
2372 +
            "2": {
2373 +
              "name": "keyword.interface.go"
2374 +
            },
2375 +
            "3": {
2376 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2377 +
            }
2378 +
          },
2379 +
          "end": "}",
2380 +
          "endCaptures": {
2381 +
            "0": {
2382 +
              "name": "punctuation.definition.end.bracket.curly.go"
2383 +
            }
2384 +
          },
2385 +
          "patterns": [
2386 +
            {
2387 +
              "include": "#interface_variables_types_field"
2388 +
            },
2389 +
            {
2390 +
              "include": "$self"
2391 +
            }
2392 +
          ]
2393 +
        },
2394 +
        {
2395 +
          "begin": "\\b(\\w+(?:,\\s*\\b\\w+)*(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}\\s*[]*\\[]+{0,1})\\b(func)\\b\\s*(\\()",
2396 +
          "beginCaptures": {
2397 +
            "1": {
2398 +
              "patterns": [
2399 +
                {
2400 +
                  "include": "#type-declarations"
2401 +
                },
2402 +
                {
2403 +
                  "match": "\\w+",
2404 +
                  "name": "variable.other.property.go"
2405 +
                }
2406 +
              ]
2407 +
            },
2408 +
            "2": {
2409 +
              "name": "keyword.function.go"
2410 +
            },
2411 +
            "3": {
2412 +
              "name": "punctuation.definition.begin.bracket.round.go"
2413 +
            }
2414 +
          },
2415 +
          "end": "\\)",
2416 +
          "endCaptures": {
2417 +
            "0": {
2418 +
              "name": "punctuation.definition.end.bracket.round.go"
2419 +
            }
2420 +
          },
2421 +
          "patterns": [
2422 +
            {
2423 +
              "include": "#function_param_types"
2424 +
            },
2425 +
            {
2426 +
              "include": "$self"
2427 +
            }
2428 +
          ]
2429 +
        },
2430 +
        {
2431 +
          "include": "#parameter-variable-types"
2432 +
        }
2433 +
      ]
2434 +
    },
2435 +
    "struct_variables_types": {
2436 +
      "begin": "\\b(struct)\\b\\s*(\\{)",
2437 +
      "beginCaptures": {
2438 +
        "1": {
2439 +
          "name": "keyword.struct.go"
2440 +
        },
2441 +
        "2": {
2442 +
          "name": "punctuation.definition.begin.bracket.curly.go"
2443 +
        }
2444 +
      },
2445 +
      "end": "}",
2446 +
      "endCaptures": {
2447 +
        "0": {
2448 +
          "name": "punctuation.definition.end.bracket.curly.go"
2449 +
        }
2450 +
      },
2451 +
      "patterns": [
2452 +
        {
2453 +
          "include": "#struct_variables_types_fields"
2454 +
        },
2455 +
        {
2456 +
          "include": "$self"
2457 +
        }
2458 +
      ]
2459 +
    },
2460 +
    "struct_variables_types_fields": {
2461 +
      "patterns": [
2462 +
        {
2463 +
          "include": "#struct_variable_types_fields_multi"
2464 +
        },
2465 +
        {
2466 +
          "captures": {
2467 +
            "1": {
2468 +
              "patterns": [
2469 +
                {
2470 +
                  "include": "#type-declarations"
2471 +
                },
2472 +
                {
2473 +
                  "match": "\\w+",
2474 +
                  "name": "entity.name.type.go"
2475 +
                }
2476 +
              ]
2477 +
            }
2478 +
          },
2479 +
          "match": "(?<=\\{)\\s*((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[]*.\\[\\w]+)\\s*(?=})"
2480 +
        },
2481 +
        {
2482 +
          "captures": {
2483 +
            "1": {
2484 +
              "patterns": [
2485 +
                {
2486 +
                  "include": "#type-declarations"
2487 +
                },
2488 +
                {
2489 +
                  "match": "\\w+",
2490 +
                  "name": "variable.other.property.go"
2491 +
                }
2492 +
              ]
2493 +
            },
2494 +
            "2": {
2495 +
              "patterns": [
2496 +
                {
2497 +
                  "include": "#type-declarations"
2498 +
                },
2499 +
                {
2500 +
                  "match": "\\w+",
2501 +
                  "name": "entity.name.type.go"
2502 +
                }
2503 +
              ]
2504 +
            }
2505 +
          },
2506 +
          "match": "(?<=\\{)\\s*((?:\\w+,\\s*)+{0,1}\\w+\\s+)((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[]*.\\[\\w]+)\\s*(?=})"
2507 +
        },
2508 +
        {
2509 +
          "captures": {
2510 +
            "1": {
2511 +
              "patterns": [
2512 +
                {
2513 +
                  "captures": {
2514 +
                    "1": {
2515 +
                      "patterns": [
2516 +
                        {
2517 +
                          "include": "#type-declarations"
2518 +
                        },
2519 +
                        {
2520 +
                          "match": "\\w+",
2521 +
                          "name": "variable.other.property.go"
2522 +
                        }
2523 +
                      ]
2524 +
                    },
2525 +
                    "2": {
2526 +
                      "patterns": [
2527 +
                        {
2528 +
                          "include": "#type-declarations"
2529 +
                        },
2530 +
                        {
2531 +
                          "match": "\\w+",
2532 +
                          "name": "entity.name.type.go"
2533 +
                        }
2534 +
                      ]
2535 +
                    }
2536 +
                  },
2537 +
                  "match": "((?:\\w+,\\s*)+{0,1}\\w+\\s+)?((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[^\"/`\\s]+;?)"
2538 +
                }
2539 +
              ]
2540 +
            }
2541 +
          },
2542 +
          "match": "(?<=\\{)((?:\\s*(?:(?:\\w+,\\s*)+{0,1}\\w+\\s+)?(?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[^\"/`\\s]+;?)+)\\s*(?=})"
2543 +
        },
2544 +
        {
2545 +
          "captures": {
2546 +
            "1": {
2547 +
              "patterns": [
2548 +
                {
2549 +
                  "include": "#type-declarations"
2550 +
                },
2551 +
                {
2552 +
                  "match": "\\w+",
2553 +
                  "name": "entity.name.type.go"
2554 +
                }
2555 +
              ]
2556 +
            }
2557 +
          },
2558 +
          "match": "((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[*.\\w]+\\s*)(?:(?=[\"/`])|$)"
2559 +
        },
2560 +
        {
2561 +
          "captures": {
2562 +
            "1": {
2563 +
              "patterns": [
2564 +
                {
2565 +
                  "include": "#type-declarations"
2566 +
                },
2567 +
                {
2568 +
                  "match": "\\w+",
2569 +
                  "name": "variable.other.property.go"
2570 +
                }
2571 +
              ]
2572 +
            },
2573 +
            "2": {
2574 +
              "patterns": [
2575 +
                {
2576 +
                  "include": "#type-declarations-without-brackets"
2577 +
                },
2578 +
                {
2579 +
                  "include": "#parameter-variable-types"
2580 +
                },
2581 +
                {
2582 +
                  "match": "\\w+",
2583 +
                  "name": "entity.name.type.go"
2584 +
                }
2585 +
              ]
2586 +
            }
2587 +
          },
2588 +
          "match": "\\b(\\w+(?:\\s*,\\s*\\b\\w+)*)\\s*([^\"/`]+)"
2589 +
        }
2590 +
      ]
2591 +
    },
2592 +
    "support_functions": {
2593 +
      "captures": {
2594 +
        "1": {
2595 +
          "name": "entity.name.function.support.go"
2596 +
        },
2597 +
        "2": {
2598 +
          "patterns": [
2599 +
            {
2600 +
              "include": "#type-declarations"
2601 +
            },
2602 +
            {
2603 +
              "match": "\\d\\w*",
2604 +
              "name": "invalid.illegal.identifier.go"
2605 +
            },
2606 +
            {
2607 +
              "match": "\\w+",
2608 +
              "name": "entity.name.function.support.go"
2609 +
            }
2610 +
          ]
2611 +
        },
2612 +
        "3": {
2613 +
          "patterns": [
2614 +
            {
2615 +
              "include": "#type-declarations-without-brackets"
2616 +
            },
2617 +
            {
2618 +
              "match": "\\[",
2619 +
              "name": "punctuation.definition.begin.bracket.square.go"
2620 +
            },
2621 +
            {
2622 +
              "match": "]",
2623 +
              "name": "punctuation.definition.end.bracket.square.go"
2624 +
            },
2625 +
            {
2626 +
              "match": "\\{",
2627 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2628 +
            },
2629 +
            {
2630 +
              "match": "}",
2631 +
              "name": "punctuation.definition.end.bracket.curly.go"
2632 +
            },
2633 +
            {
2634 +
              "match": "\\w+",
2635 +
              "name": "entity.name.type.go"
2636 +
            }
2637 +
          ]
2638 +
        }
2639 +
      },
2640 +
      "match": "(?:((?<=\\.)\\b\\w+)|\\b(\\w+))(?<brackets>\\[(?:[^]\\[]|\\g<brackets>)*])?(?=\\()"
2641 +
    },
2642 +
    "switch_types": {
2643 +
      "begin": "(?<=\\bswitch\\b)\\s*(\\w+\\s*:=)?\\s*([-\\]%\\&(-+./<>\\[|\\w]+)(\\.\\(\\btype\\b\\)\\s*)(\\{)",
2644 +
      "beginCaptures": {
2645 +
        "1": {
2646 +
          "patterns": [
2647 +
            {
2648 +
              "include": "#operators"
2649 +
            },
2650 +
            {
2651 +
              "match": "\\w+",
2652 +
              "name": "variable.other.assignment.go"
2653 +
            }
2654 +
          ]
2655 +
        },
2656 +
        "2": {
2657 +
          "patterns": [
2658 +
            {
2659 +
              "include": "#support_functions"
2660 +
            },
2661 +
            {
2662 +
              "include": "#type-declarations"
2663 +
            },
2664 +
            {
2665 +
              "match": "\\w+",
2666 +
              "name": "variable.other.go"
2667 +
            }
2668 +
          ]
2669 +
        },
2670 +
        "3": {
2671 +
          "patterns": [
2672 +
            {
2673 +
              "include": "#delimiters"
2674 +
            },
2675 +
            {
2676 +
              "include": "#brackets"
2677 +
            },
2678 +
            {
2679 +
              "match": "\\btype\\b",
2680 +
              "name": "keyword.type.go"
2681 +
            }
2682 +
          ]
2683 +
        },
2684 +
        "4": {
2685 +
          "name": "punctuation.definition.begin.bracket.curly.go"
2686 +
        }
2687 +
      },
2688 +
      "end": "}",
2689 +
      "endCaptures": {
2690 +
        "0": {
2691 +
          "name": "punctuation.definition.end.bracket.curly.go"
2692 +
        }
2693 +
      },
2694 +
      "patterns": [
2695 +
        {
2696 +
          "captures": {
2697 +
            "1": {
2698 +
              "name": "keyword.control.go"
2699 +
            },
2700 +
            "2": {
2701 +
              "patterns": [
2702 +
                {
2703 +
                  "include": "#type-declarations"
2704 +
                },
2705 +
                {
2706 +
                  "match": "\\w+",
2707 +
                  "name": "entity.name.type.go"
2708 +
                }
2709 +
              ]
2710 +
            },
2711 +
            "3": {
2712 +
              "name": "punctuation.other.colon.go"
2713 +
            },
2714 +
            "4": {
2715 +
              "patterns": [
2716 +
                {
2717 +
                  "include": "#comments"
2718 +
                }
2719 +
              ]
2720 +
            }
2721 +
          },
2722 +
          "match": "^\\s*\\b(case)\\b\\s+([!*,.<=>\\w\\s]+)(:)(\\s*/[*/]\\s*.*)?$"
2723 +
        },
2724 +
        {
2725 +
          "begin": "\\bcase\\b",
2726 +
          "beginCaptures": {
2727 +
            "0": {
2728 +
              "name": "keyword.control.go"
2729 +
            }
2730 +
          },
2731 +
          "end": ":",
2732 +
          "endCaptures": {
2733 +
            "0": {
2734 +
              "name": "punctuation.other.colon.go"
2735 +
            }
2736 +
          },
2737 +
          "patterns": [
2738 +
            {
2739 +
              "include": "#type-declarations"
2740 +
            },
2741 +
            {
2742 +
              "match": "\\w+",
2743 +
              "name": "entity.name.type.go"
2744 +
            }
2745 +
          ]
2746 +
        },
2747 +
        {
2748 +
          "include": "$self"
2749 +
        }
2750 +
      ]
2751 +
    },
2752 +
    "switch_variables": {
2753 +
      "patterns": [
2754 +
        {
2755 +
          "captures": {
2756 +
            "1": {
2757 +
              "name": "keyword.control.go"
2758 +
            },
2759 +
            "2": {
2760 +
              "patterns": [
2761 +
                {
2762 +
                  "include": "#type-declarations"
2763 +
                },
2764 +
                {
2765 +
                  "include": "#support_functions"
2766 +
                },
2767 +
                {
2768 +
                  "include": "#variable_assignment"
2769 +
                },
2770 +
                {
2771 +
                  "match": "\\w+",
2772 +
                  "name": "variable.other.go"
2773 +
                }
2774 +
              ]
2775 +
            }
2776 +
          },
2777 +
          "match": "^\\s*\\b(case)\\b\\s+([\\s\\S]+:\\s*(?:/[*/].*)?)$"
2778 +
        },
2779 +
        {
2780 +
          "begin": "(?<=\\bswitch\\b)\\s*((?:[.\\w]+(?:\\s*[-!%\\&+,/:<=>|]+\\s*[.\\w]+)*\\s*[-!%\\&+,/:<=>|]+)?\\s*[-\\]%\\&(-+./<>\\[|\\w]+{0,1}\\s*(?:;\\s*[-\\]%\\&(-+./<>\\[|\\w]+\\s*)?)(\\{)",
2781 +
          "beginCaptures": {
2782 +
            "1": {
2783 +
              "patterns": [
2784 +
                {
2785 +
                  "include": "#support_functions"
2786 +
                },
2787 +
                {
2788 +
                  "include": "#type-declarations"
2789 +
                },
2790 +
                {
2791 +
                  "include": "#variable_assignment"
2792 +
                },
2793 +
                {
2794 +
                  "match": "\\w+",
2795 +
                  "name": "variable.other.go"
2796 +
                }
2797 +
              ]
2798 +
            },
2799 +
            "2": {
2800 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2801 +
            }
2802 +
          },
2803 +
          "end": "}",
2804 +
          "endCaptures": {
2805 +
            "0": {
2806 +
              "name": "punctuation.definition.end.bracket.curly.go"
2807 +
            }
2808 +
          },
2809 +
          "patterns": [
2810 +
            {
2811 +
              "begin": "\\bcase\\b",
2812 +
              "beginCaptures": {
2813 +
                "0": {
2814 +
                  "name": "keyword.control.go"
2815 +
                }
2816 +
              },
2817 +
              "end": ":",
2818 +
              "endCaptures": {
2819 +
                "0": {
2820 +
                  "name": "punctuation.other.colon.go"
2821 +
                }
2822 +
              },
2823 +
              "patterns": [
2824 +
                {
2825 +
                  "include": "#support_functions"
2826 +
                },
2827 +
                {
2828 +
                  "include": "#type-declarations"
2829 +
                },
2830 +
                {
2831 +
                  "include": "#variable_assignment"
2832 +
                },
2833 +
                {
2834 +
                  "match": "\\w+",
2835 +
                  "name": "variable.other.go"
2836 +
                }
2837 +
              ]
2838 +
            },
2839 +
            {
2840 +
              "include": "$self"
2841 +
            }
2842 +
          ]
2843 +
        }
2844 +
      ]
2845 +
    },
2846 +
    "syntax_errors": {
2847 +
      "patterns": [
2848 +
        {
2849 +
          "captures": {
2850 +
            "1": {
2851 +
              "name": "invalid.illegal.slice.go"
2852 +
            }
2853 +
          },
2854 +
          "match": "\\[](\\s+)"
2855 +
        },
2856 +
        {
2857 +
          "match": "\\b0[0-7]*[89]\\d*\\b",
2858 +
          "name": "invalid.illegal.numeric.go"
2859 +
        }
2860 +
      ]
2861 +
    },
2862 +
    "terminators": {
2863 +
      "match": ";",
2864 +
      "name": "punctuation.terminator.go"
2865 +
    },
2866 +
    "type-declarations": {
2867 +
      "patterns": [
2868 +
        {
2869 +
          "include": "#language_constants"
2870 +
        },
2871 +
        {
2872 +
          "include": "#comments"
2873 +
        },
2874 +
        {
2875 +
          "include": "#map_types"
2876 +
        },
2877 +
        {
2878 +
          "include": "#brackets"
2879 +
        },
2880 +
        {
2881 +
          "include": "#delimiters"
2882 +
        },
2883 +
        {
2884 +
          "include": "#keywords"
2885 +
        },
2886 +
        {
2887 +
          "include": "#operators"
2888 +
        },
2889 +
        {
2890 +
          "include": "#runes"
2891 +
        },
2892 +
        {
2893 +
          "include": "#storage_types"
2894 +
        },
2895 +
        {
2896 +
          "include": "#raw_string_literals"
2897 +
        },
2898 +
        {
2899 +
          "include": "#string_literals"
2900 +
        },
2901 +
        {
2902 +
          "include": "#numeric_literals"
2903 +
        },
2904 +
        {
2905 +
          "include": "#terminators"
2906 +
        }
2907 +
      ]
2908 +
    },
2909 +
    "type-declarations-without-brackets": {
2910 +
      "patterns": [
2911 +
        {
2912 +
          "include": "#language_constants"
2913 +
        },
2914 +
        {
2915 +
          "include": "#comments"
2916 +
        },
2917 +
        {
2918 +
          "include": "#map_types"
2919 +
        },
2920 +
        {
2921 +
          "include": "#delimiters"
2922 +
        },
2923 +
        {
2924 +
          "include": "#keywords"
2925 +
        },
2926 +
        {
2927 +
          "include": "#operators"
2928 +
        },
2929 +
        {
2930 +
          "include": "#runes"
2931 +
        },
2932 +
        {
2933 +
          "include": "#storage_types"
2934 +
        },
2935 +
        {
2936 +
          "include": "#raw_string_literals"
2937 +
        },
2938 +
        {
2939 +
          "include": "#string_literals"
2940 +
        },
2941 +
        {
2942 +
          "include": "#numeric_literals"
2943 +
        },
2944 +
        {
2945 +
          "include": "#terminators"
2946 +
        }
2947 +
      ]
2948 +
    },
2949 +
    "type_assertion_inline": {
2950 +
      "captures": {
2951 +
        "1": {
2952 +
          "name": "keyword.type.go"
2953 +
        },
2954 +
        "2": {
2955 +
          "patterns": [
2956 +
            {
2957 +
              "include": "#type-declarations-without-brackets"
2958 +
            },
2959 +
            {
2960 +
              "match": "\\(",
2961 +
              "name": "punctuation.definition.begin.bracket.round.go"
2962 +
            },
2963 +
            {
2964 +
              "match": "\\)",
2965 +
              "name": "punctuation.definition.end.bracket.round.go"
2966 +
            },
2967 +
            {
2968 +
              "match": "\\[",
2969 +
              "name": "punctuation.definition.begin.bracket.square.go"
2970 +
            },
2971 +
            {
2972 +
              "match": "]",
2973 +
              "name": "punctuation.definition.end.bracket.square.go"
2974 +
            },
2975 +
            {
2976 +
              "match": "\\{",
2977 +
              "name": "punctuation.definition.begin.bracket.curly.go"
2978 +
            },
2979 +
            {
2980 +
              "match": "}",
2981 +
              "name": "punctuation.definition.end.bracket.curly.go"
2982 +
            },
2983 +
            {
2984 +
              "match": "\\w+",
2985 +
              "name": "entity.name.type.go"
2986 +
            }
2987 +
          ]
2988 +
        }
2989 +
      },
2990 +
      "match": "(?<=\\.\\()(?:\\b(type)\\b|((?:\\s*[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+{0,1}[]*\\[]+{0,1}[.\\w]+(?:\\[(?:[]*.\\[{}\\w]+(?:,\\s*[]*.\\[{}\\w]+)*)?])?))(?=\\))"
2991 +
    },
2992 +
    "var_assignment": {
2993 +
      "patterns": [
2994 +
        {
2995 +
          "captures": {
2996 +
            "1": {
2997 +
              "patterns": [
2998 +
                {
2999 +
                  "include": "#delimiters"
3000 +
                },
3001 +
                {
3002 +
                  "match": "\\w+",
3003 +
                  "name": "variable.other.assignment.go"
3004 +
                }
3005 +
              ]
3006 +
            },
3007 +
            "2": {
3008 +
              "patterns": [
3009 +
                {
3010 +
                  "include": "#type-declarations-without-brackets"
3011 +
                },
3012 +
                {
3013 +
                  "include": "#generic_types"
3014 +
                },
3015 +
                {
3016 +
                  "match": "\\(",
3017 +
                  "name": "punctuation.definition.begin.bracket.round.go"
3018 +
                },
3019 +
                {
3020 +
                  "match": "\\)",
3021 +
                  "name": "punctuation.definition.end.bracket.round.go"
3022 +
                },
3023 +
                {
3024 +
                  "match": "\\[",
3025 +
                  "name": "punctuation.definition.begin.bracket.square.go"
3026 +
                },
3027 +
                {
3028 +
                  "match": "]",
3029 +
                  "name": "punctuation.definition.end.bracket.square.go"
3030 +
                },
3031 +
                {
3032 +
                  "match": "\\w+",
3033 +
                  "name": "entity.name.type.go"
3034 +
                }
3035 +
              ]
3036 +
            }
3037 +
          },
3038 +
          "match": "(?<=\\bvar\\b)\\s*\\b([.\\w]+(?:,\\s*[.\\w]+)*)\\s*((?:(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+(?:\\([^)]+\\))?)?(?![]*\\[]+{0,1}\\b(?:struct|func|map)\\b)(?:[]*.\\[\\w]+(?:,\\s*[]*.\\[\\w]+)*)?\\s*=?)?"
3039 +
        },
3040 +
        {
3041 +
          "begin": "(?<=\\bvar\\b)\\s*(\\()",
3042 +
          "beginCaptures": {
3043 +
            "1": {
3044 +
              "name": "punctuation.definition.begin.bracket.round.go"
3045 +
            }
3046 +
          },
3047 +
          "end": "\\)",
3048 +
          "endCaptures": {
3049 +
            "0": {
3050 +
              "name": "punctuation.definition.end.bracket.round.go"
3051 +
            }
3052 +
          },
3053 +
          "patterns": [
3054 +
            {
3055 +
              "captures": {
3056 +
                "1": {
3057 +
                  "patterns": [
3058 +
                    {
3059 +
                      "include": "#delimiters"
3060 +
                    },
3061 +
                    {
3062 +
                      "match": "\\w+",
3063 +
                      "name": "variable.other.assignment.go"
3064 +
                    }
3065 +
                  ]
3066 +
                },
3067 +
                "2": {
3068 +
                  "patterns": [
3069 +
                    {
3070 +
                      "include": "#type-declarations-without-brackets"
3071 +
                    },
3072 +
                    {
3073 +
                      "include": "#generic_types"
3074 +
                    },
3075 +
                    {
3076 +
                      "match": "\\(",
3077 +
                      "name": "punctuation.definition.begin.bracket.round.go"
3078 +
                    },
3079 +
                    {
3080 +
                      "match": "\\)",
3081 +
                      "name": "punctuation.definition.end.bracket.round.go"
3082 +
                    },
3083 +
                    {
3084 +
                      "match": "\\[",
3085 +
                      "name": "punctuation.definition.begin.bracket.square.go"
3086 +
                    },
3087 +
                    {
3088 +
                      "match": "]",
3089 +
                      "name": "punctuation.definition.end.bracket.square.go"
3090 +
                    },
3091 +
                    {
3092 +
                      "match": "\\w+",
3093 +
                      "name": "entity.name.type.go"
3094 +
                    }
3095 +
                  ]
3096 +
                }
3097 +
              },
3098 +
              "match": "^\\s*\\b([.\\w]+(?:,\\s*[.\\w]+)*)\\s*((?:(?:[]*\\[]+{0,1}(?:<-\\s*)?\\bchan\\b(?:\\s*<-)?\\s*)+(?:\\([^)]+\\))?)?(?![]*\\[]+{0,1}\\b(?:struct|func|map)\\b)(?:[]*.\\[\\w]+(?:,\\s*[]*.\\[\\w]+)*)?\\s*=?)?"
3099 +
            },
3100 +
            {
3101 +
              "include": "$self"
3102 +
            }
3103 +
          ]
3104 +
        }
3105 +
      ]
3106 +
    },
3107 +
    "variable_assignment": {
3108 +
      "patterns": [
3109 +
        {
3110 +
          "captures": {
3111 +
            "0": {
3112 +
              "patterns": [
3113 +
                {
3114 +
                  "include": "#delimiters"
3115 +
                },
3116 +
                {
3117 +
                  "match": "\\d\\w*",
3118 +
                  "name": "invalid.illegal.identifier.go"
3119 +
                },
3120 +
                {
3121 +
                  "match": "\\w+",
3122 +
                  "name": "variable.other.assignment.go"
3123 +
                }
3124 +
              ]
3125 +
            }
3126 +
          },
3127 +
          "match": "\\b\\w+(?:,\\s*\\w+)*(?=\\s*:=)"
3128 +
        },
3129 +
        {
3130 +
          "captures": {
3131 +
            "0": {
3132 +
              "patterns": [
3133 +
                {
3134 +
                  "include": "#delimiters"
3135 +
                },
3136 +
                {
3137 +
                  "include": "#operators"
3138 +
                },
3139 +
                {
3140 +
                  "match": "\\d\\w*",
3141 +
                  "name": "invalid.illegal.identifier.go"
3142 +
                },
3143 +
                {
3144 +
                  "match": "\\w+",
3145 +
                  "name": "variable.other.assignment.go"
3146 +
                }
3147 +
              ]
3148 +
            }
3149 +
          },
3150 +
          "match": "\\b[*.\\w]+(?:,\\s*[*.\\w]+)*(?=\\s*=(?!=))"
3151 +
        }
3152 +
      ]
3153 +
    }
3154 +
  },
3155 +
  "scopeName": "source.go"
3156 +
}
crates/highlight/syntaxes/javascript.json added +5996 -0
1 +
{
2 +
  "displayName": "JavaScript",
3 +
  "name": "javascript",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#directives"
7 +
    },
8 +
    {
9 +
      "include": "#statements"
10 +
    },
11 +
    {
12 +
      "include": "#shebang"
13 +
    }
14 +
  ],
15 +
  "repository": {
16 +
    "access-modifier": {
17 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
18 +
      "name": "storage.modifier.js"
19 +
    },
20 +
    "after-operator-block-as-object-literal": {
21 +
      "begin": "(?<!\\+\\+|--)(?<=[!(+,:=>?\\[]|^await|[^$._[:alnum:]]await|^return|[^$._[:alnum:]]return|^yield|[^$._[:alnum:]]yield|^throw|[^$._[:alnum:]]throw|^in|[^$._[:alnum:]]in|^of|[^$._[:alnum:]]of|^typeof|[^$._[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
22 +
      "beginCaptures": {
23 +
        "1": {
24 +
          "name": "punctuation.definition.block.js"
25 +
        }
26 +
      },
27 +
      "end": "}",
28 +
      "endCaptures": {
29 +
        "0": {
30 +
          "name": "punctuation.definition.block.js"
31 +
        }
32 +
      },
33 +
      "name": "meta.objectliteral.js",
34 +
      "patterns": [
35 +
        {
36 +
          "include": "#object-member"
37 +
        }
38 +
      ]
39 +
    },
40 +
    "array-binding-pattern": {
41 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
42 +
      "beginCaptures": {
43 +
        "1": {
44 +
          "name": "keyword.operator.rest.js"
45 +
        },
46 +
        "2": {
47 +
          "name": "punctuation.definition.binding-pattern.array.js"
48 +
        }
49 +
      },
50 +
      "end": "]",
51 +
      "endCaptures": {
52 +
        "0": {
53 +
          "name": "punctuation.definition.binding-pattern.array.js"
54 +
        }
55 +
      },
56 +
      "patterns": [
57 +
        {
58 +
          "include": "#binding-element"
59 +
        },
60 +
        {
61 +
          "include": "#punctuation-comma"
62 +
        }
63 +
      ]
64 +
    },
65 +
    "array-binding-pattern-const": {
66 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
67 +
      "beginCaptures": {
68 +
        "1": {
69 +
          "name": "keyword.operator.rest.js"
70 +
        },
71 +
        "2": {
72 +
          "name": "punctuation.definition.binding-pattern.array.js"
73 +
        }
74 +
      },
75 +
      "end": "]",
76 +
      "endCaptures": {
77 +
        "0": {
78 +
          "name": "punctuation.definition.binding-pattern.array.js"
79 +
        }
80 +
      },
81 +
      "patterns": [
82 +
        {
83 +
          "include": "#binding-element-const"
84 +
        },
85 +
        {
86 +
          "include": "#punctuation-comma"
87 +
        }
88 +
      ]
89 +
    },
90 +
    "array-literal": {
91 +
      "begin": "\\s*(\\[)",
92 +
      "beginCaptures": {
93 +
        "1": {
94 +
          "name": "meta.brace.square.js"
95 +
        }
96 +
      },
97 +
      "end": "]",
98 +
      "endCaptures": {
99 +
        "0": {
100 +
          "name": "meta.brace.square.js"
101 +
        }
102 +
      },
103 +
      "name": "meta.array.literal.js",
104 +
      "patterns": [
105 +
        {
106 +
          "include": "#expression"
107 +
        },
108 +
        {
109 +
          "include": "#punctuation-comma"
110 +
        }
111 +
      ]
112 +
    },
113 +
    "arrow-function": {
114 +
      "patterns": [
115 +
        {
116 +
          "captures": {
117 +
            "1": {
118 +
              "name": "storage.modifier.async.js"
119 +
            },
120 +
            "2": {
121 +
              "name": "variable.parameter.js"
122 +
            }
123 +
          },
124 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(async)\\s+)?([$_[:alpha:]][$_[:alnum:]]*)\\s*(?==>)",
125 +
          "name": "meta.arrow.js"
126 +
        },
127 +
        {
128 +
          "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(async))?((?<![]!)}])\\s*(?=((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))",
129 +
          "beginCaptures": {
130 +
            "1": {
131 +
              "name": "storage.modifier.async.js"
132 +
            }
133 +
          },
134 +
          "end": "(?==>|\\{|^(\\s*(export|function|class|interface|let|var|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
135 +
          "name": "meta.arrow.js",
136 +
          "patterns": [
137 +
            {
138 +
              "include": "#comment"
139 +
            },
140 +
            {
141 +
              "include": "#type-parameters"
142 +
            },
143 +
            {
144 +
              "include": "#function-parameters"
145 +
            },
146 +
            {
147 +
              "include": "#arrow-return-type"
148 +
            },
149 +
            {
150 +
              "include": "#possibly-arrow-return-type"
151 +
            }
152 +
          ]
153 +
        },
154 +
        {
155 +
          "begin": "=>",
156 +
          "beginCaptures": {
157 +
            "0": {
158 +
              "name": "storage.type.function.arrow.js"
159 +
            }
160 +
          },
161 +
          "end": "((?<=[}\\S])(?<!=>)|((?!\\{)(?=\\S)))(?!/[*/])",
162 +
          "name": "meta.arrow.js",
163 +
          "patterns": [
164 +
            {
165 +
              "include": "#single-line-comment-consuming-line-ending"
166 +
            },
167 +
            {
168 +
              "include": "#decl-block"
169 +
            },
170 +
            {
171 +
              "include": "#expression"
172 +
            }
173 +
          ]
174 +
        }
175 +
      ]
176 +
    },
177 +
    "arrow-return-type": {
178 +
      "begin": "(?<=\\))\\s*(:)",
179 +
      "beginCaptures": {
180 +
        "1": {
181 +
          "name": "keyword.operator.type.annotation.js"
182 +
        }
183 +
      },
184 +
      "end": "(?==>|\\{|^(\\s*(export|function|class|interface|let|var|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
185 +
      "name": "meta.return.type.arrow.js",
186 +
      "patterns": [
187 +
        {
188 +
          "include": "#arrow-return-type-body"
189 +
        }
190 +
      ]
191 +
    },
192 +
    "arrow-return-type-body": {
193 +
      "patterns": [
194 +
        {
195 +
          "begin": "(?<=:)(?=\\s*\\{)",
196 +
          "end": "(?<=})",
197 +
          "patterns": [
198 +
            {
199 +
              "include": "#type-object"
200 +
            }
201 +
          ]
202 +
        },
203 +
        {
204 +
          "include": "#type-predicate-operator"
205 +
        },
206 +
        {
207 +
          "include": "#type"
208 +
        }
209 +
      ]
210 +
    },
211 +
    "async-modifier": {
212 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
213 +
      "name": "storage.modifier.async.js"
214 +
    },
215 +
    "binding-element": {
216 +
      "patterns": [
217 +
        {
218 +
          "include": "#comment"
219 +
        },
220 +
        {
221 +
          "include": "#string"
222 +
        },
223 +
        {
224 +
          "include": "#numeric-literal"
225 +
        },
226 +
        {
227 +
          "include": "#regex"
228 +
        },
229 +
        {
230 +
          "include": "#object-binding-pattern"
231 +
        },
232 +
        {
233 +
          "include": "#array-binding-pattern"
234 +
        },
235 +
        {
236 +
          "include": "#destructuring-variable-rest"
237 +
        },
238 +
        {
239 +
          "include": "#variable-initializer"
240 +
        }
241 +
      ]
242 +
    },
243 +
    "binding-element-const": {
244 +
      "patterns": [
245 +
        {
246 +
          "include": "#comment"
247 +
        },
248 +
        {
249 +
          "include": "#string"
250 +
        },
251 +
        {
252 +
          "include": "#numeric-literal"
253 +
        },
254 +
        {
255 +
          "include": "#regex"
256 +
        },
257 +
        {
258 +
          "include": "#object-binding-pattern-const"
259 +
        },
260 +
        {
261 +
          "include": "#array-binding-pattern-const"
262 +
        },
263 +
        {
264 +
          "include": "#destructuring-variable-rest-const"
265 +
        },
266 +
        {
267 +
          "include": "#variable-initializer"
268 +
        }
269 +
      ]
270 +
    },
271 +
    "boolean-literal": {
272 +
      "patterns": [
273 +
        {
274 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
275 +
          "name": "constant.language.boolean.true.js"
276 +
        },
277 +
        {
278 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
279 +
          "name": "constant.language.boolean.false.js"
280 +
        }
281 +
      ]
282 +
    },
283 +
    "brackets": {
284 +
      "patterns": [
285 +
        {
286 +
          "begin": "\\{",
287 +
          "end": "}|(?=\\*/)",
288 +
          "patterns": [
289 +
            {
290 +
              "include": "#brackets"
291 +
            }
292 +
          ]
293 +
        },
294 +
        {
295 +
          "begin": "\\[",
296 +
          "end": "]|(?=\\*/)",
297 +
          "patterns": [
298 +
            {
299 +
              "include": "#brackets"
300 +
            }
301 +
          ]
302 +
        }
303 +
      ]
304 +
    },
305 +
    "cast": {
306 +
      "patterns": [
307 +
        {
308 +
          "include": "#jsx"
309 +
        }
310 +
      ]
311 +
    },
312 +
    "class-declaration": {
313 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[*/])",
314 +
      "beginCaptures": {
315 +
        "1": {
316 +
          "name": "keyword.control.export.js"
317 +
        },
318 +
        "2": {
319 +
          "name": "storage.modifier.js"
320 +
        },
321 +
        "3": {
322 +
          "name": "storage.modifier.js"
323 +
        },
324 +
        "4": {
325 +
          "name": "storage.type.class.js"
326 +
        }
327 +
      },
328 +
      "end": "(?<=})",
329 +
      "name": "meta.class.js",
330 +
      "patterns": [
331 +
        {
332 +
          "include": "#class-declaration-or-expression-patterns"
333 +
        }
334 +
      ]
335 +
    },
336 +
    "class-declaration-or-expression-patterns": {
337 +
      "patterns": [
338 +
        {
339 +
          "include": "#comment"
340 +
        },
341 +
        {
342 +
          "include": "#class-or-interface-heritage"
343 +
        },
344 +
        {
345 +
          "captures": {
346 +
            "0": {
347 +
              "name": "entity.name.type.class.js"
348 +
            }
349 +
          },
350 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
351 +
        },
352 +
        {
353 +
          "include": "#type-parameters"
354 +
        },
355 +
        {
356 +
          "include": "#class-or-interface-body"
357 +
        }
358 +
      ]
359 +
    },
360 +
    "class-expression": {
361 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|/[*/])",
362 +
      "beginCaptures": {
363 +
        "1": {
364 +
          "name": "storage.modifier.js"
365 +
        },
366 +
        "2": {
367 +
          "name": "storage.type.class.js"
368 +
        }
369 +
      },
370 +
      "end": "(?<=})",
371 +
      "name": "meta.class.js",
372 +
      "patterns": [
373 +
        {
374 +
          "include": "#class-declaration-or-expression-patterns"
375 +
        }
376 +
      ]
377 +
    },
378 +
    "class-or-interface-body": {
379 +
      "begin": "\\{",
380 +
      "beginCaptures": {
381 +
        "0": {
382 +
          "name": "punctuation.definition.block.js"
383 +
        }
384 +
      },
385 +
      "end": "}",
386 +
      "endCaptures": {
387 +
        "0": {
388 +
          "name": "punctuation.definition.block.js"
389 +
        }
390 +
      },
391 +
      "patterns": [
392 +
        {
393 +
          "include": "#comment"
394 +
        },
395 +
        {
396 +
          "include": "#decorator"
397 +
        },
398 +
        {
399 +
          "begin": "(?<=:)\\s*",
400 +
          "end": "(?=[-\\])+,:;}\\s]|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
401 +
          "patterns": [
402 +
            {
403 +
              "include": "#expression"
404 +
            }
405 +
          ]
406 +
        },
407 +
        {
408 +
          "include": "#method-declaration"
409 +
        },
410 +
        {
411 +
          "include": "#indexer-declaration"
412 +
        },
413 +
        {
414 +
          "include": "#field-declaration"
415 +
        },
416 +
        {
417 +
          "include": "#string"
418 +
        },
419 +
        {
420 +
          "include": "#type-annotation"
421 +
        },
422 +
        {
423 +
          "include": "#variable-initializer"
424 +
        },
425 +
        {
426 +
          "include": "#access-modifier"
427 +
        },
428 +
        {
429 +
          "include": "#property-accessor"
430 +
        },
431 +
        {
432 +
          "include": "#async-modifier"
433 +
        },
434 +
        {
435 +
          "include": "#after-operator-block-as-object-literal"
436 +
        },
437 +
        {
438 +
          "include": "#decl-block"
439 +
        },
440 +
        {
441 +
          "include": "#expression"
442 +
        },
443 +
        {
444 +
          "include": "#punctuation-comma"
445 +
        },
446 +
        {
447 +
          "include": "#punctuation-semicolon"
448 +
        }
449 +
      ]
450 +
    },
451 +
    "class-or-interface-heritage": {
452 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(extends|implements)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
453 +
      "beginCaptures": {
454 +
        "1": {
455 +
          "name": "storage.modifier.js"
456 +
        }
457 +
      },
458 +
      "end": "(?=\\{)",
459 +
      "patterns": [
460 +
        {
461 +
          "include": "#comment"
462 +
        },
463 +
        {
464 +
          "include": "#class-or-interface-heritage"
465 +
        },
466 +
        {
467 +
          "include": "#type-parameters"
468 +
        },
469 +
        {
470 +
          "include": "#expressionWithoutIdentifiers"
471 +
        },
472 +
        {
473 +
          "captures": {
474 +
            "1": {
475 +
              "name": "entity.name.type.module.js"
476 +
            },
477 +
            "2": {
478 +
              "name": "punctuation.accessor.js"
479 +
            },
480 +
            "3": {
481 +
              "name": "punctuation.accessor.optional.js"
482 +
            }
483 +
          },
484 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))(?=\\s*[$_[:alpha:]][$_[:alnum:]]*(\\s*\\??\\.\\s*[$_[:alpha:]][$_[:alnum:]]*)*\\s*)"
485 +
        },
486 +
        {
487 +
          "captures": {
488 +
            "1": {
489 +
              "name": "entity.other.inherited-class.js"
490 +
            }
491 +
          },
492 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)"
493 +
        },
494 +
        {
495 +
          "include": "#expressionPunctuations"
496 +
        }
497 +
      ]
498 +
    },
499 +
    "comment": {
500 +
      "patterns": [
501 +
        {
502 +
          "begin": "/\\*\\*(?!/)",
503 +
          "beginCaptures": {
504 +
            "0": {
505 +
              "name": "punctuation.definition.comment.js"
506 +
            }
507 +
          },
508 +
          "end": "\\*/",
509 +
          "endCaptures": {
510 +
            "0": {
511 +
              "name": "punctuation.definition.comment.js"
512 +
            }
513 +
          },
514 +
          "name": "comment.block.documentation.js",
515 +
          "patterns": [
516 +
            {
517 +
              "include": "#docblock"
518 +
            }
519 +
          ]
520 +
        },
521 +
        {
522 +
          "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
523 +
          "beginCaptures": {
524 +
            "1": {
525 +
              "name": "punctuation.definition.comment.js"
526 +
            },
527 +
            "2": {
528 +
              "name": "storage.type.internaldeclaration.js"
529 +
            },
530 +
            "3": {
531 +
              "name": "punctuation.decorator.internaldeclaration.js"
532 +
            }
533 +
          },
534 +
          "end": "\\*/",
535 +
          "endCaptures": {
536 +
            "0": {
537 +
              "name": "punctuation.definition.comment.js"
538 +
            }
539 +
          },
540 +
          "name": "comment.block.js"
541 +
        },
542 +
        {
543 +
          "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
544 +
          "beginCaptures": {
545 +
            "1": {
546 +
              "name": "punctuation.whitespace.comment.leading.js"
547 +
            },
548 +
            "2": {
549 +
              "name": "comment.line.double-slash.js"
550 +
            },
551 +
            "3": {
552 +
              "name": "punctuation.definition.comment.js"
553 +
            },
554 +
            "4": {
555 +
              "name": "storage.type.internaldeclaration.js"
556 +
            },
557 +
            "5": {
558 +
              "name": "punctuation.decorator.internaldeclaration.js"
559 +
            }
560 +
          },
561 +
          "contentName": "comment.line.double-slash.js",
562 +
          "end": "(?=$)"
563 +
        }
564 +
      ]
565 +
    },
566 +
    "control-statement": {
567 +
      "patterns": [
568 +
        {
569 +
          "include": "#switch-statement"
570 +
        },
571 +
        {
572 +
          "include": "#for-loop"
573 +
        },
574 +
        {
575 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
576 +
          "name": "keyword.control.trycatch.js"
577 +
        },
578 +
        {
579 +
          "captures": {
580 +
            "1": {
581 +
              "name": "keyword.control.loop.js"
582 +
            },
583 +
            "2": {
584 +
              "name": "entity.name.label.js"
585 +
            }
586 +
          },
587 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
588 +
        },
589 +
        {
590 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
591 +
          "name": "keyword.control.loop.js"
592 +
        },
593 +
        {
594 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
595 +
          "beginCaptures": {
596 +
            "0": {
597 +
              "name": "keyword.control.flow.js"
598 +
            }
599 +
          },
600 +
          "end": "(?=[;}]|$|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
601 +
          "patterns": [
602 +
            {
603 +
              "include": "#expression"
604 +
            }
605 +
          ]
606 +
        },
607 +
        {
608 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
609 +
          "name": "keyword.control.switch.js"
610 +
        },
611 +
        {
612 +
          "include": "#if-statement"
613 +
        },
614 +
        {
615 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
616 +
          "name": "keyword.control.conditional.js"
617 +
        },
618 +
        {
619 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
620 +
          "name": "keyword.control.with.js"
621 +
        },
622 +
        {
623 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
624 +
          "name": "keyword.control.js"
625 +
        },
626 +
        {
627 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
628 +
          "name": "keyword.other.debugger.js"
629 +
        }
630 +
      ]
631 +
    },
632 +
    "decl-block": {
633 +
      "begin": "\\{",
634 +
      "beginCaptures": {
635 +
        "0": {
636 +
          "name": "punctuation.definition.block.js"
637 +
        }
638 +
      },
639 +
      "end": "}",
640 +
      "endCaptures": {
641 +
        "0": {
642 +
          "name": "punctuation.definition.block.js"
643 +
        }
644 +
      },
645 +
      "name": "meta.block.js",
646 +
      "patterns": [
647 +
        {
648 +
          "include": "#statements"
649 +
        }
650 +
      ]
651 +
    },
652 +
    "declaration": {
653 +
      "patterns": [
654 +
        {
655 +
          "include": "#decorator"
656 +
        },
657 +
        {
658 +
          "include": "#var-expr"
659 +
        },
660 +
        {
661 +
          "include": "#function-declaration"
662 +
        },
663 +
        {
664 +
          "include": "#class-declaration"
665 +
        },
666 +
        {
667 +
          "include": "#interface-declaration"
668 +
        },
669 +
        {
670 +
          "include": "#enum-declaration"
671 +
        },
672 +
        {
673 +
          "include": "#namespace-declaration"
674 +
        },
675 +
        {
676 +
          "include": "#type-alias-declaration"
677 +
        },
678 +
        {
679 +
          "include": "#import-equals-declaration"
680 +
        },
681 +
        {
682 +
          "include": "#import-declaration"
683 +
        },
684 +
        {
685 +
          "include": "#export-declaration"
686 +
        },
687 +
        {
688 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
689 +
          "name": "storage.modifier.js"
690 +
        }
691 +
      ]
692 +
    },
693 +
    "decorator": {
694 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))@",
695 +
      "beginCaptures": {
696 +
        "0": {
697 +
          "name": "punctuation.decorator.js"
698 +
        }
699 +
      },
700 +
      "end": "(?=\\s)",
701 +
      "name": "meta.decorator.js",
702 +
      "patterns": [
703 +
        {
704 +
          "include": "#expression"
705 +
        }
706 +
      ]
707 +
    },
708 +
    "destructuring-const": {
709 +
      "patterns": [
710 +
        {
711 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
712 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
713 +
          "name": "meta.object-binding-pattern-variable.js",
714 +
          "patterns": [
715 +
            {
716 +
              "include": "#object-binding-pattern-const"
717 +
            },
718 +
            {
719 +
              "include": "#type-annotation"
720 +
            },
721 +
            {
722 +
              "include": "#comment"
723 +
            }
724 +
          ]
725 +
        },
726 +
        {
727 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
728 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
729 +
          "name": "meta.array-binding-pattern-variable.js",
730 +
          "patterns": [
731 +
            {
732 +
              "include": "#array-binding-pattern-const"
733 +
            },
734 +
            {
735 +
              "include": "#type-annotation"
736 +
            },
737 +
            {
738 +
              "include": "#comment"
739 +
            }
740 +
          ]
741 +
        }
742 +
      ]
743 +
    },
744 +
    "destructuring-parameter": {
745 +
      "patterns": [
746 +
        {
747 +
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
748 +
          "beginCaptures": {
749 +
            "1": {
750 +
              "name": "keyword.operator.rest.js"
751 +
            },
752 +
            "2": {
753 +
              "name": "punctuation.definition.binding-pattern.object.js"
754 +
            }
755 +
          },
756 +
          "end": "}",
757 +
          "endCaptures": {
758 +
            "0": {
759 +
              "name": "punctuation.definition.binding-pattern.object.js"
760 +
            }
761 +
          },
762 +
          "name": "meta.parameter.object-binding-pattern.js",
763 +
          "patterns": [
764 +
            {
765 +
              "include": "#parameter-object-binding-element"
766 +
            }
767 +
          ]
768 +
        },
769 +
        {
770 +
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
771 +
          "beginCaptures": {
772 +
            "1": {
773 +
              "name": "keyword.operator.rest.js"
774 +
            },
775 +
            "2": {
776 +
              "name": "punctuation.definition.binding-pattern.array.js"
777 +
            }
778 +
          },
779 +
          "end": "]",
780 +
          "endCaptures": {
781 +
            "0": {
782 +
              "name": "punctuation.definition.binding-pattern.array.js"
783 +
            }
784 +
          },
785 +
          "name": "meta.paramter.array-binding-pattern.js",
786 +
          "patterns": [
787 +
            {
788 +
              "include": "#parameter-binding-element"
789 +
            },
790 +
            {
791 +
              "include": "#punctuation-comma"
792 +
            }
793 +
          ]
794 +
        }
795 +
      ]
796 +
    },
797 +
    "destructuring-parameter-rest": {
798 +
      "captures": {
799 +
        "1": {
800 +
          "name": "keyword.operator.rest.js"
801 +
        },
802 +
        "2": {
803 +
          "name": "variable.parameter.js"
804 +
        }
805 +
      },
806 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
807 +
    },
808 +
    "destructuring-variable": {
809 +
      "patterns": [
810 +
        {
811 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
812 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
813 +
          "name": "meta.object-binding-pattern-variable.js",
814 +
          "patterns": [
815 +
            {
816 +
              "include": "#object-binding-pattern"
817 +
            },
818 +
            {
819 +
              "include": "#type-annotation"
820 +
            },
821 +
            {
822 +
              "include": "#comment"
823 +
            }
824 +
          ]
825 +
        },
826 +
        {
827 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
828 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
829 +
          "name": "meta.array-binding-pattern-variable.js",
830 +
          "patterns": [
831 +
            {
832 +
              "include": "#array-binding-pattern"
833 +
            },
834 +
            {
835 +
              "include": "#type-annotation"
836 +
            },
837 +
            {
838 +
              "include": "#comment"
839 +
            }
840 +
          ]
841 +
        }
842 +
      ]
843 +
    },
844 +
    "destructuring-variable-rest": {
845 +
      "captures": {
846 +
        "1": {
847 +
          "name": "keyword.operator.rest.js"
848 +
        },
849 +
        "2": {
850 +
          "name": "meta.definition.variable.js variable.other.readwrite.js"
851 +
        }
852 +
      },
853 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
854 +
    },
855 +
    "destructuring-variable-rest-const": {
856 +
      "captures": {
857 +
        "1": {
858 +
          "name": "keyword.operator.rest.js"
859 +
        },
860 +
        "2": {
861 +
          "name": "meta.definition.variable.js variable.other.constant.js"
862 +
        }
863 +
      },
864 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
865 +
    },
866 +
    "directives": {
867 +
      "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))+\\s*/>\\s*$)",
868 +
      "beginCaptures": {
869 +
        "1": {
870 +
          "name": "punctuation.definition.comment.js"
871 +
        }
872 +
      },
873 +
      "end": "(?=$)",
874 +
      "name": "comment.line.triple-slash.directive.js",
875 +
      "patterns": [
876 +
        {
877 +
          "begin": "(<)(reference|amd-dependency|amd-module)",
878 +
          "beginCaptures": {
879 +
            "1": {
880 +
              "name": "punctuation.definition.tag.directive.js"
881 +
            },
882 +
            "2": {
883 +
              "name": "entity.name.tag.directive.js"
884 +
            }
885 +
          },
886 +
          "end": "/>",
887 +
          "endCaptures": {
888 +
            "0": {
889 +
              "name": "punctuation.definition.tag.directive.js"
890 +
            }
891 +
          },
892 +
          "name": "meta.tag.js",
893 +
          "patterns": [
894 +
            {
895 +
              "match": "path|types|no-default-lib|lib|name|resolution-mode",
896 +
              "name": "entity.other.attribute-name.directive.js"
897 +
            },
898 +
            {
899 +
              "match": "=",
900 +
              "name": "keyword.operator.assignment.js"
901 +
            },
902 +
            {
903 +
              "include": "#string"
904 +
            }
905 +
          ]
906 +
        }
907 +
      ]
908 +
    },
909 +
    "docblock": {
910 +
      "patterns": [
911 +
        {
912 +
          "captures": {
913 +
            "1": {
914 +
              "name": "storage.type.class.jsdoc"
915 +
            },
916 +
            "2": {
917 +
              "name": "punctuation.definition.block.tag.jsdoc"
918 +
            },
919 +
            "3": {
920 +
              "name": "constant.language.access-type.jsdoc"
921 +
            }
922 +
          },
923 +
          "match": "((@)a(?:ccess|pi))\\s+(p(?:rivate|rotected|ublic))\\b"
924 +
        },
925 +
        {
926 +
          "captures": {
927 +
            "1": {
928 +
              "name": "storage.type.class.jsdoc"
929 +
            },
930 +
            "2": {
931 +
              "name": "punctuation.definition.block.tag.jsdoc"
932 +
            },
933 +
            "3": {
934 +
              "name": "entity.name.type.instance.jsdoc"
935 +
            },
936 +
            "4": {
937 +
              "name": "punctuation.definition.bracket.angle.begin.jsdoc"
938 +
            },
939 +
            "5": {
940 +
              "name": "constant.other.email.link.underline.jsdoc"
941 +
            },
942 +
            "6": {
943 +
              "name": "punctuation.definition.bracket.angle.end.jsdoc"
944 +
            }
945 +
          },
946 +
          "match": "((@)author)\\s+([^*/<>@\\s](?:[^*/<>@]|\\*[^/])*)(?:\\s*(<)([^>\\s]+)(>))?"
947 +
        },
948 +
        {
949 +
          "captures": {
950 +
            "1": {
951 +
              "name": "storage.type.class.jsdoc"
952 +
            },
953 +
            "2": {
954 +
              "name": "punctuation.definition.block.tag.jsdoc"
955 +
            },
956 +
            "3": {
957 +
              "name": "entity.name.type.instance.jsdoc"
958 +
            },
959 +
            "4": {
960 +
              "name": "keyword.operator.control.jsdoc"
961 +
            },
962 +
            "5": {
963 +
              "name": "entity.name.type.instance.jsdoc"
964 +
            }
965 +
          },
966 +
          "match": "((@)borrows)\\s+((?:[^*/@\\s]|\\*[^/])+)\\s+(as)\\s+((?:[^*/@\\s]|\\*[^/])+)"
967 +
        },
968 +
        {
969 +
          "begin": "((@)example)\\s+",
970 +
          "beginCaptures": {
971 +
            "1": {
972 +
              "name": "storage.type.class.jsdoc"
973 +
            },
974 +
            "2": {
975 +
              "name": "punctuation.definition.block.tag.jsdoc"
976 +
            }
977 +
          },
978 +
          "end": "(?=@|\\*/)",
979 +
          "name": "meta.example.jsdoc",
980 +
          "patterns": [
981 +
            {
982 +
              "match": "^\\s\\*\\s+"
983 +
            },
984 +
            {
985 +
              "begin": "\\G(<)caption(>)",
986 +
              "beginCaptures": {
987 +
                "0": {
988 +
                  "name": "entity.name.tag.inline.jsdoc"
989 +
                },
990 +
                "1": {
991 +
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
992 +
                },
993 +
                "2": {
994 +
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
995 +
                }
996 +
              },
997 +
              "contentName": "constant.other.description.jsdoc",
998 +
              "end": "(</)caption(>)|(?=\\*/)",
999 +
              "endCaptures": {
1000 +
                "0": {
1001 +
                  "name": "entity.name.tag.inline.jsdoc"
1002 +
                },
1003 +
                "1": {
1004 +
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
1005 +
                },
1006 +
                "2": {
1007 +
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
1008 +
                }
1009 +
              }
1010 +
            },
1011 +
            {
1012 +
              "captures": {
1013 +
                "0": {
1014 +
                  "name": "source.embedded.js"
1015 +
                }
1016 +
              },
1017 +
              "match": "[^*@\\s](?:[^*]|\\*[^/])*"
1018 +
            }
1019 +
          ]
1020 +
        },
1021 +
        {
1022 +
          "captures": {
1023 +
            "1": {
1024 +
              "name": "storage.type.class.jsdoc"
1025 +
            },
1026 +
            "2": {
1027 +
              "name": "punctuation.definition.block.tag.jsdoc"
1028 +
            },
1029 +
            "3": {
1030 +
              "name": "constant.language.symbol-type.jsdoc"
1031 +
            }
1032 +
          },
1033 +
          "match": "((@)kind)\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\b"
1034 +
        },
1035 +
        {
1036 +
          "captures": {
1037 +
            "1": {
1038 +
              "name": "storage.type.class.jsdoc"
1039 +
            },
1040 +
            "2": {
1041 +
              "name": "punctuation.definition.block.tag.jsdoc"
1042 +
            },
1043 +
            "3": {
1044 +
              "name": "variable.other.link.underline.jsdoc"
1045 +
            },
1046 +
            "4": {
1047 +
              "name": "entity.name.type.instance.jsdoc"
1048 +
            }
1049 +
          },
1050 +
          "match": "((@)see)\\s+(?:((?=https?://)(?:[^*\\s]|\\*[^/])+)|((?!https?://|(?:\\[[^]\\[]*])?\\{@(?:link|linkcode|linkplain|tutorial)\\b)(?:[^*/@\\s]|\\*[^/])+))"
1051 +
        },
1052 +
        {
1053 +
          "captures": {
1054 +
            "1": {
1055 +
              "name": "storage.type.class.jsdoc"
1056 +
            },
1057 +
            "2": {
1058 +
              "name": "punctuation.definition.block.tag.jsdoc"
1059 +
            },
1060 +
            "3": {
1061 +
              "name": "variable.other.jsdoc"
1062 +
            }
1063 +
          },
1064 +
          "match": "((@)template)\\s+([$A-Z_a-z][]$.\\[\\w]*(?:\\s*,\\s*[$A-Z_a-z][]$.\\[\\w]*)*)"
1065 +
        },
1066 +
        {
1067 +
          "begin": "((@)template)\\s+(?=\\{)",
1068 +
          "beginCaptures": {
1069 +
            "1": {
1070 +
              "name": "storage.type.class.jsdoc"
1071 +
            },
1072 +
            "2": {
1073 +
              "name": "punctuation.definition.block.tag.jsdoc"
1074 +
            }
1075 +
          },
1076 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1077 +
          "patterns": [
1078 +
            {
1079 +
              "include": "#jsdoctype"
1080 +
            },
1081 +
            {
1082 +
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1083 +
              "name": "variable.other.jsdoc"
1084 +
            }
1085 +
          ]
1086 +
        },
1087 +
        {
1088 +
          "captures": {
1089 +
            "1": {
1090 +
              "name": "storage.type.class.jsdoc"
1091 +
            },
1092 +
            "2": {
1093 +
              "name": "punctuation.definition.block.tag.jsdoc"
1094 +
            },
1095 +
            "3": {
1096 +
              "name": "variable.other.jsdoc"
1097 +
            }
1098 +
          },
1099 +
          "match": "((@)(?:arg|argument|const|constant|member|namespace|param|var))\\s+([$A-Z_a-z][]$.\\[\\w]*)"
1100 +
        },
1101 +
        {
1102 +
          "begin": "((@)typedef)\\s+(?=\\{)",
1103 +
          "beginCaptures": {
1104 +
            "1": {
1105 +
              "name": "storage.type.class.jsdoc"
1106 +
            },
1107 +
            "2": {
1108 +
              "name": "punctuation.definition.block.tag.jsdoc"
1109 +
            }
1110 +
          },
1111 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1112 +
          "patterns": [
1113 +
            {
1114 +
              "include": "#jsdoctype"
1115 +
            },
1116 +
            {
1117 +
              "match": "(?:[^*/@\\s]|\\*[^/])+",
1118 +
              "name": "entity.name.type.instance.jsdoc"
1119 +
            }
1120 +
          ]
1121 +
        },
1122 +
        {
1123 +
          "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?=\\{)",
1124 +
          "beginCaptures": {
1125 +
            "1": {
1126 +
              "name": "storage.type.class.jsdoc"
1127 +
            },
1128 +
            "2": {
1129 +
              "name": "punctuation.definition.block.tag.jsdoc"
1130 +
            }
1131 +
          },
1132 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1133 +
          "patterns": [
1134 +
            {
1135 +
              "include": "#jsdoctype"
1136 +
            },
1137 +
            {
1138 +
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1139 +
              "name": "variable.other.jsdoc"
1140 +
            },
1141 +
            {
1142 +
              "captures": {
1143 +
                "1": {
1144 +
                  "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
1145 +
                },
1146 +
                "2": {
1147 +
                  "name": "keyword.operator.assignment.jsdoc"
1148 +
                },
1149 +
                "3": {
1150 +
                  "name": "source.embedded.js"
1151 +
                },
1152 +
                "4": {
1153 +
                  "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
1154 +
                },
1155 +
                "5": {
1156 +
                  "name": "invalid.illegal.syntax.jsdoc"
1157 +
                }
1158 +
              },
1159 +
              "match": "(\\[)\\s*[$\\w]+(?:(?:\\[])?\\.[$\\w]+)*(?:\\s*(=)\\s*((?>\"(?:\\*(?!/)|\\\\(?!\")|[^*\\\\])*?\"|'(?:\\*(?!/)|\\\\(?!')|[^*\\\\])*?'|\\[(?:\\*(?!/)|[^*])*?]|(?:\\*(?!/)|\\s(?!\\s*])|\\[.*?(?:]|(?=\\*/))|[^]*\\[\\s])*)*))?\\s*(?:(])((?:[^*\\s]|\\*[^/\\s])+)?|(?=\\*/))",
1160 +
              "name": "variable.other.jsdoc"
1161 +
            }
1162 +
          ]
1163 +
        },
1164 +
        {
1165 +
          "begin": "((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\s+(?=\\{)",
1166 +
          "beginCaptures": {
1167 +
            "1": {
1168 +
              "name": "storage.type.class.jsdoc"
1169 +
            },
1170 +
            "2": {
1171 +
              "name": "punctuation.definition.block.tag.jsdoc"
1172 +
            }
1173 +
          },
1174 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1175 +
          "patterns": [
1176 +
            {
1177 +
              "include": "#jsdoctype"
1178 +
            }
1179 +
          ]
1180 +
        },
1181 +
        {
1182 +
          "captures": {
1183 +
            "1": {
1184 +
              "name": "storage.type.class.jsdoc"
1185 +
            },
1186 +
            "2": {
1187 +
              "name": "punctuation.definition.block.tag.jsdoc"
1188 +
            },
1189 +
            "3": {
1190 +
              "name": "entity.name.type.instance.jsdoc"
1191 +
            }
1192 +
          },
1193 +
          "match": "((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\s+((?:[^*@{}\\s]|\\*[^/])+)"
1194 +
        },
1195 +
        {
1196 +
          "begin": "((@)(?:default(?:value)?|license|version))\\s+(([\"']))",
1197 +
          "beginCaptures": {
1198 +
            "1": {
1199 +
              "name": "storage.type.class.jsdoc"
1200 +
            },
1201 +
            "2": {
1202 +
              "name": "punctuation.definition.block.tag.jsdoc"
1203 +
            },
1204 +
            "3": {
1205 +
              "name": "variable.other.jsdoc"
1206 +
            },
1207 +
            "4": {
1208 +
              "name": "punctuation.definition.string.begin.jsdoc"
1209 +
            }
1210 +
          },
1211 +
          "contentName": "variable.other.jsdoc",
1212 +
          "end": "(\\3)|(?=$|\\*/)",
1213 +
          "endCaptures": {
1214 +
            "0": {
1215 +
              "name": "variable.other.jsdoc"
1216 +
            },
1217 +
            "1": {
1218 +
              "name": "punctuation.definition.string.end.jsdoc"
1219 +
            }
1220 +
          }
1221 +
        },
1222 +
        {
1223 +
          "captures": {
1224 +
            "1": {
1225 +
              "name": "storage.type.class.jsdoc"
1226 +
            },
1227 +
            "2": {
1228 +
              "name": "punctuation.definition.block.tag.jsdoc"
1229 +
            },
1230 +
            "3": {
1231 +
              "name": "variable.other.jsdoc"
1232 +
            }
1233 +
          },
1234 +
          "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^*\\s]+)"
1235 +
        },
1236 +
        {
1237 +
          "captures": {
1238 +
            "1": {
1239 +
              "name": "punctuation.definition.block.tag.jsdoc"
1240 +
            }
1241 +
          },
1242 +
          "match": "(@)(?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception|exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func|function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce|yields?)\\b",
1243 +
          "name": "storage.type.class.jsdoc"
1244 +
        },
1245 +
        {
1246 +
          "include": "#inline-tags"
1247 +
        },
1248 +
        {
1249 +
          "captures": {
1250 +
            "1": {
1251 +
              "name": "storage.type.class.jsdoc"
1252 +
            },
1253 +
            "2": {
1254 +
              "name": "punctuation.definition.block.tag.jsdoc"
1255 +
            }
1256 +
          },
1257 +
          "match": "((@)[$_[:alpha:]][$_[:alnum:]]*)(?=\\s+)"
1258 +
        }
1259 +
      ]
1260 +
    },
1261 +
    "enum-declaration": {
1262 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([$_[:alpha:]][$_[:alnum:]]*)",
1263 +
      "beginCaptures": {
1264 +
        "1": {
1265 +
          "name": "keyword.control.export.js"
1266 +
        },
1267 +
        "2": {
1268 +
          "name": "storage.modifier.js"
1269 +
        },
1270 +
        "3": {
1271 +
          "name": "storage.modifier.js"
1272 +
        },
1273 +
        "4": {
1274 +
          "name": "storage.type.enum.js"
1275 +
        },
1276 +
        "5": {
1277 +
          "name": "entity.name.type.enum.js"
1278 +
        }
1279 +
      },
1280 +
      "end": "(?<=})",
1281 +
      "name": "meta.enum.declaration.js",
1282 +
      "patterns": [
1283 +
        {
1284 +
          "include": "#comment"
1285 +
        },
1286 +
        {
1287 +
          "begin": "\\{",
1288 +
          "beginCaptures": {
1289 +
            "0": {
1290 +
              "name": "punctuation.definition.block.js"
1291 +
            }
1292 +
          },
1293 +
          "end": "}",
1294 +
          "endCaptures": {
1295 +
            "0": {
1296 +
              "name": "punctuation.definition.block.js"
1297 +
            }
1298 +
          },
1299 +
          "patterns": [
1300 +
            {
1301 +
              "include": "#comment"
1302 +
            },
1303 +
            {
1304 +
              "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
1305 +
              "beginCaptures": {
1306 +
                "0": {
1307 +
                  "name": "variable.other.enummember.js"
1308 +
                }
1309 +
              },
1310 +
              "end": "(?=[,}]|$)",
1311 +
              "patterns": [
1312 +
                {
1313 +
                  "include": "#comment"
1314 +
                },
1315 +
                {
1316 +
                  "include": "#variable-initializer"
1317 +
                }
1318 +
              ]
1319 +
            },
1320 +
            {
1321 +
              "begin": "(?=(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+])))",
1322 +
              "end": "(?=[,}]|$)",
1323 +
              "patterns": [
1324 +
                {
1325 +
                  "include": "#string"
1326 +
                },
1327 +
                {
1328 +
                  "include": "#array-literal"
1329 +
                },
1330 +
                {
1331 +
                  "include": "#comment"
1332 +
                },
1333 +
                {
1334 +
                  "include": "#variable-initializer"
1335 +
                }
1336 +
              ]
1337 +
            },
1338 +
            {
1339 +
              "include": "#punctuation-comma"
1340 +
            }
1341 +
          ]
1342 +
        }
1343 +
      ]
1344 +
    },
1345 +
    "export-declaration": {
1346 +
      "patterns": [
1347 +
        {
1348 +
          "captures": {
1349 +
            "1": {
1350 +
              "name": "keyword.control.export.js"
1351 +
            },
1352 +
            "2": {
1353 +
              "name": "keyword.control.as.js"
1354 +
            },
1355 +
            "3": {
1356 +
              "name": "storage.type.namespace.js"
1357 +
            },
1358 +
            "4": {
1359 +
              "name": "entity.name.type.module.js"
1360 +
            }
1361 +
          },
1362 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([$_[:alpha:]][$_[:alnum:]]*)"
1363 +
        },
1364 +
        {
1365 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:\\s*(=)|\\s+(default)(?=\\s+))",
1366 +
          "beginCaptures": {
1367 +
            "1": {
1368 +
              "name": "keyword.control.export.js"
1369 +
            },
1370 +
            "2": {
1371 +
              "name": "keyword.control.type.js"
1372 +
            },
1373 +
            "3": {
1374 +
              "name": "keyword.operator.assignment.js"
1375 +
            },
1376 +
            "4": {
1377 +
              "name": "keyword.control.default.js"
1378 +
            }
1379 +
          },
1380 +
          "end": "(?=$|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
1381 +
          "name": "meta.export.default.js",
1382 +
          "patterns": [
1383 +
            {
1384 +
              "include": "#interface-declaration"
1385 +
            },
1386 +
            {
1387 +
              "include": "#expression"
1388 +
            }
1389 +
          ]
1390 +
        },
1391 +
        {
1392 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[*{])|((?=\\s*[$_[:alpha:]][$_[:alnum:]]*([,\\s]))(?!\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)))",
1393 +
          "beginCaptures": {
1394 +
            "1": {
1395 +
              "name": "keyword.control.export.js"
1396 +
            },
1397 +
            "2": {
1398 +
              "name": "keyword.control.type.js"
1399 +
            }
1400 +
          },
1401 +
          "end": "(?=$|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
1402 +
          "name": "meta.export.js",
1403 +
          "patterns": [
1404 +
            {
1405 +
              "include": "#import-export-declaration"
1406 +
            }
1407 +
          ]
1408 +
        }
1409 +
      ]
1410 +
    },
1411 +
    "expression": {
1412 +
      "patterns": [
1413 +
        {
1414 +
          "include": "#expressionWithoutIdentifiers"
1415 +
        },
1416 +
        {
1417 +
          "include": "#identifiers"
1418 +
        },
1419 +
        {
1420 +
          "include": "#expressionPunctuations"
1421 +
        }
1422 +
      ]
1423 +
    },
1424 +
    "expression-inside-possibly-arrow-parens": {
1425 +
      "patterns": [
1426 +
        {
1427 +
          "include": "#expressionWithoutIdentifiers"
1428 +
        },
1429 +
        {
1430 +
          "include": "#comment"
1431 +
        },
1432 +
        {
1433 +
          "include": "#string"
1434 +
        },
1435 +
        {
1436 +
          "include": "#decorator"
1437 +
        },
1438 +
        {
1439 +
          "include": "#destructuring-parameter"
1440 +
        },
1441 +
        {
1442 +
          "captures": {
1443 +
            "1": {
1444 +
              "name": "storage.modifier.js"
1445 +
            }
1446 +
          },
1447 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
1448 +
        },
1449 +
        {
1450 +
          "captures": {
1451 +
            "1": {
1452 +
              "name": "storage.modifier.js"
1453 +
            },
1454 +
            "2": {
1455 +
              "name": "keyword.operator.rest.js"
1456 +
            },
1457 +
            "3": {
1458 +
              "name": "entity.name.function.js variable.language.this.js"
1459 +
            },
1460 +
            "4": {
1461 +
              "name": "entity.name.function.js"
1462 +
            },
1463 +
            "5": {
1464 +
              "name": "keyword.operator.optional.js"
1465 +
            }
1466 +
          },
1467 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1468 +
        },
1469 +
        {
1470 +
          "captures": {
1471 +
            "1": {
1472 +
              "name": "storage.modifier.js"
1473 +
            },
1474 +
            "2": {
1475 +
              "name": "keyword.operator.rest.js"
1476 +
            },
1477 +
            "3": {
1478 +
              "name": "variable.parameter.js variable.language.this.js"
1479 +
            },
1480 +
            "4": {
1481 +
              "name": "variable.parameter.js"
1482 +
            },
1483 +
            "5": {
1484 +
              "name": "keyword.operator.optional.js"
1485 +
            }
1486 +
          },
1487 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[,:]|$)"
1488 +
        },
1489 +
        {
1490 +
          "include": "#type-annotation"
1491 +
        },
1492 +
        {
1493 +
          "include": "#variable-initializer"
1494 +
        },
1495 +
        {
1496 +
          "match": ",",
1497 +
          "name": "punctuation.separator.parameter.js"
1498 +
        },
1499 +
        {
1500 +
          "include": "#identifiers"
1501 +
        },
1502 +
        {
1503 +
          "include": "#expressionPunctuations"
1504 +
        }
1505 +
      ]
1506 +
    },
1507 +
    "expression-operators": {
1508 +
      "patterns": [
1509 +
        {
1510 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1511 +
          "name": "keyword.control.flow.js"
1512 +
        },
1513 +
        {
1514 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*\\*)",
1515 +
          "beginCaptures": {
1516 +
            "1": {
1517 +
              "name": "keyword.control.flow.js"
1518 +
            }
1519 +
          },
1520 +
          "end": "\\*",
1521 +
          "endCaptures": {
1522 +
            "0": {
1523 +
              "name": "keyword.generator.asterisk.js"
1524 +
            }
1525 +
          },
1526 +
          "patterns": [
1527 +
            {
1528 +
              "include": "#comment"
1529 +
            }
1530 +
          ]
1531 +
        },
1532 +
        {
1533 +
          "captures": {
1534 +
            "1": {
1535 +
              "name": "keyword.control.flow.js"
1536 +
            },
1537 +
            "2": {
1538 +
              "name": "keyword.generator.asterisk.js"
1539 +
            }
1540 +
          },
1541 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?"
1542 +
        },
1543 +
        {
1544 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1545 +
          "name": "keyword.operator.expression.delete.js"
1546 +
        },
1547 +
        {
1548 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1549 +
          "name": "keyword.operator.expression.in.js"
1550 +
        },
1551 +
        {
1552 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1553 +
          "name": "keyword.operator.expression.of.js"
1554 +
        },
1555 +
        {
1556 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1557 +
          "name": "keyword.operator.expression.instanceof.js"
1558 +
        },
1559 +
        {
1560 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1561 +
          "name": "keyword.operator.new.js"
1562 +
        },
1563 +
        {
1564 +
          "include": "#typeof-operator"
1565 +
        },
1566 +
        {
1567 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1568 +
          "name": "keyword.operator.expression.void.js"
1569 +
        },
1570 +
        {
1571 +
          "captures": {
1572 +
            "1": {
1573 +
              "name": "keyword.control.as.js"
1574 +
            },
1575 +
            "2": {
1576 +
              "name": "storage.modifier.js"
1577 +
            }
1578 +
          },
1579 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[]),:;}]))"
1580 +
        },
1581 +
        {
1582 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
1583 +
          "beginCaptures": {
1584 +
            "1": {
1585 +
              "name": "keyword.control.as.js"
1586 +
            },
1587 +
            "2": {
1588 +
              "name": "keyword.control.satisfies.js"
1589 +
            }
1590 +
          },
1591 +
          "end": "(?=^|[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+<))",
1592 +
          "patterns": [
1593 +
            {
1594 +
              "include": "#type"
1595 +
            }
1596 +
          ]
1597 +
        },
1598 +
        {
1599 +
          "match": "\\.\\.\\.",
1600 +
          "name": "keyword.operator.spread.js"
1601 +
        },
1602 +
        {
1603 +
          "match": "(?:\\*|(?<!\\()/|[-%+])=",
1604 +
          "name": "keyword.operator.assignment.compound.js"
1605 +
        },
1606 +
        {
1607 +
          "match": "(?:[\\&^]|<<|>>>??|\\|)=",
1608 +
          "name": "keyword.operator.assignment.compound.bitwise.js"
1609 +
        },
1610 +
        {
1611 +
          "match": "<<|>>>?",
1612 +
          "name": "keyword.operator.bitwise.shift.js"
1613 +
        },
1614 +
        {
1615 +
          "match": "[!=]==?",
1616 +
          "name": "keyword.operator.comparison.js"
1617 +
        },
1618 +
        {
1619 +
          "match": "<=|>=|<>|[<>]",
1620 +
          "name": "keyword.operator.relational.js"
1621 +
        },
1622 +
        {
1623 +
          "captures": {
1624 +
            "1": {
1625 +
              "name": "keyword.operator.logical.js"
1626 +
            },
1627 +
            "2": {
1628 +
              "name": "keyword.operator.assignment.compound.js"
1629 +
            },
1630 +
            "3": {
1631 +
              "name": "keyword.operator.arithmetic.js"
1632 +
            }
1633 +
          },
1634 +
          "match": "(?<=[$_[:alnum:]])(!)\\s*(?:(/=)|(/)(?![*/]))"
1635 +
        },
1636 +
        {
1637 +
          "match": "!|&&|\\|\\||\\?\\?",
1638 +
          "name": "keyword.operator.logical.js"
1639 +
        },
1640 +
        {
1641 +
          "match": "[\\&^|~]",
1642 +
          "name": "keyword.operator.bitwise.js"
1643 +
        },
1644 +
        {
1645 +
          "match": "=",
1646 +
          "name": "keyword.operator.assignment.js"
1647 +
        },
1648 +
        {
1649 +
          "match": "--",
1650 +
          "name": "keyword.operator.decrement.js"
1651 +
        },
1652 +
        {
1653 +
          "match": "\\+\\+",
1654 +
          "name": "keyword.operator.increment.js"
1655 +
        },
1656 +
        {
1657 +
          "match": "[-%*+/]",
1658 +
          "name": "keyword.operator.arithmetic.js"
1659 +
        },
1660 +
        {
1661 +
          "begin": "(?<=[]$)_[:alnum:]])\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)+(?:(/=)|(/)(?![*/])))",
1662 +
          "end": "(/=)|(/)(?!\\*([^*]|(\\*[^/]))*\\*/)",
1663 +
          "endCaptures": {
1664 +
            "1": {
1665 +
              "name": "keyword.operator.assignment.compound.js"
1666 +
            },
1667 +
            "2": {
1668 +
              "name": "keyword.operator.arithmetic.js"
1669 +
            }
1670 +
          },
1671 +
          "patterns": [
1672 +
            {
1673 +
              "include": "#comment"
1674 +
            }
1675 +
          ]
1676 +
        },
1677 +
        {
1678 +
          "captures": {
1679 +
            "1": {
1680 +
              "name": "keyword.operator.assignment.compound.js"
1681 +
            },
1682 +
            "2": {
1683 +
              "name": "keyword.operator.arithmetic.js"
1684 +
            }
1685 +
          },
1686 +
          "match": "(?<=[]$)_[:alnum:]])\\s*(?:(/=)|(/)(?![*/]))"
1687 +
        }
1688 +
      ]
1689 +
    },
1690 +
    "expressionPunctuations": {
1691 +
      "patterns": [
1692 +
        {
1693 +
          "include": "#punctuation-comma"
1694 +
        },
1695 +
        {
1696 +
          "include": "#punctuation-accessor"
1697 +
        }
1698 +
      ]
1699 +
    },
1700 +
    "expressionWithoutIdentifiers": {
1701 +
      "patterns": [
1702 +
        {
1703 +
          "include": "#jsx"
1704 +
        },
1705 +
        {
1706 +
          "include": "#string"
1707 +
        },
1708 +
        {
1709 +
          "include": "#regex"
1710 +
        },
1711 +
        {
1712 +
          "include": "#comment"
1713 +
        },
1714 +
        {
1715 +
          "include": "#function-expression"
1716 +
        },
1717 +
        {
1718 +
          "include": "#class-expression"
1719 +
        },
1720 +
        {
1721 +
          "include": "#arrow-function"
1722 +
        },
1723 +
        {
1724 +
          "include": "#paren-expression-possibly-arrow"
1725 +
        },
1726 +
        {
1727 +
          "include": "#cast"
1728 +
        },
1729 +
        {
1730 +
          "include": "#ternary-expression"
1731 +
        },
1732 +
        {
1733 +
          "include": "#new-expr"
1734 +
        },
1735 +
        {
1736 +
          "include": "#instanceof-expr"
1737 +
        },
1738 +
        {
1739 +
          "include": "#object-literal"
1740 +
        },
1741 +
        {
1742 +
          "include": "#expression-operators"
1743 +
        },
1744 +
        {
1745 +
          "include": "#function-call"
1746 +
        },
1747 +
        {
1748 +
          "include": "#literal"
1749 +
        },
1750 +
        {
1751 +
          "include": "#support-objects"
1752 +
        },
1753 +
        {
1754 +
          "include": "#paren-expression"
1755 +
        }
1756 +
      ]
1757 +
    },
1758 +
    "field-declaration": {
1759 +
      "begin": "(?<!\\()(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|(#?[$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(?:(?:(\\?)|(!))\\s*)?([,:;=}]|$))",
1760 +
      "beginCaptures": {
1761 +
        "1": {
1762 +
          "name": "storage.modifier.js"
1763 +
        }
1764 +
      },
1765 +
      "end": "(?=[,;}]|$|^((?!\\s*(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|(#?[$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(?:(?:(\\?)|(!))\\s*)?([,:;=]|$))))|(?<=})",
1766 +
      "name": "meta.field.declaration.js",
1767 +
      "patterns": [
1768 +
        {
1769 +
          "include": "#variable-initializer"
1770 +
        },
1771 +
        {
1772 +
          "include": "#type-annotation"
1773 +
        },
1774 +
        {
1775 +
          "include": "#string"
1776 +
        },
1777 +
        {
1778 +
          "include": "#array-literal"
1779 +
        },
1780 +
        {
1781 +
          "include": "#numeric-literal"
1782 +
        },
1783 +
        {
1784 +
          "include": "#comment"
1785 +
        },
1786 +
        {
1787 +
          "captures": {
1788 +
            "1": {
1789 +
              "name": "meta.definition.property.js entity.name.function.js"
1790 +
            },
1791 +
            "2": {
1792 +
              "name": "keyword.operator.optional.js"
1793 +
            },
1794 +
            "3": {
1795 +
              "name": "keyword.operator.definiteassignment.js"
1796 +
            }
1797 +
          },
1798 +
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)(?:(\\?)|(!))?(?=\\s*\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1799 +
        },
1800 +
        {
1801 +
          "match": "#?[$_[:alpha:]][$_[:alnum:]]*",
1802 +
          "name": "meta.definition.property.js variable.object.property.js"
1803 +
        },
1804 +
        {
1805 +
          "match": "\\?",
1806 +
          "name": "keyword.operator.optional.js"
1807 +
        },
1808 +
        {
1809 +
          "match": "!",
1810 +
          "name": "keyword.operator.definiteassignment.js"
1811 +
        }
1812 +
      ]
1813 +
    },
1814 +
    "for-loop": {
1815 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*))await)?\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)?(\\())",
1816 +
      "beginCaptures": {
1817 +
        "0": {
1818 +
          "name": "keyword.control.loop.js"
1819 +
        }
1820 +
      },
1821 +
      "end": "(?<=\\))",
1822 +
      "patterns": [
1823 +
        {
1824 +
          "include": "#comment"
1825 +
        },
1826 +
        {
1827 +
          "match": "await",
1828 +
          "name": "keyword.control.loop.js"
1829 +
        },
1830 +
        {
1831 +
          "begin": "\\(",
1832 +
          "beginCaptures": {
1833 +
            "0": {
1834 +
              "name": "meta.brace.round.js"
1835 +
            }
1836 +
          },
1837 +
          "end": "\\)",
1838 +
          "endCaptures": {
1839 +
            "0": {
1840 +
              "name": "meta.brace.round.js"
1841 +
            }
1842 +
          },
1843 +
          "patterns": [
1844 +
            {
1845 +
              "include": "#var-expr"
1846 +
            },
1847 +
            {
1848 +
              "include": "#expression"
1849 +
            },
1850 +
            {
1851 +
              "include": "#punctuation-semicolon"
1852 +
            }
1853 +
          ]
1854 +
        }
1855 +
      ]
1856 +
    },
1857 +
    "function-body": {
1858 +
      "patterns": [
1859 +
        {
1860 +
          "include": "#comment"
1861 +
        },
1862 +
        {
1863 +
          "include": "#type-parameters"
1864 +
        },
1865 +
        {
1866 +
          "include": "#function-parameters"
1867 +
        },
1868 +
        {
1869 +
          "include": "#return-type"
1870 +
        },
1871 +
        {
1872 +
          "include": "#type-function-return-type"
1873 +
        },
1874 +
        {
1875 +
          "include": "#decl-block"
1876 +
        },
1877 +
        {
1878 +
          "match": "\\*",
1879 +
          "name": "keyword.generator.asterisk.js"
1880 +
        }
1881 +
      ]
1882 +
    },
1883 +
    "function-call": {
1884 +
      "patterns": [
1885 +
        {
1886 +
          "begin": "(?=(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))\\s*(?:(\\?\\.\\s*)|(!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)?\\())",
1887 +
          "end": "(?<=\\))(?!(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))\\s*(?:(\\?\\.\\s*)|(!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)?\\())",
1888 +
          "patterns": [
1889 +
            {
1890 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1891 +
              "end": "(?=\\s*(?:(\\?\\.\\s*)|(!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)?\\())",
1892 +
              "name": "meta.function-call.js",
1893 +
              "patterns": [
1894 +
                {
1895 +
                  "include": "#function-call-target"
1896 +
                }
1897 +
              ]
1898 +
            },
1899 +
            {
1900 +
              "include": "#comment"
1901 +
            },
1902 +
            {
1903 +
              "include": "#function-call-optionals"
1904 +
            },
1905 +
            {
1906 +
              "include": "#type-arguments"
1907 +
            },
1908 +
            {
1909 +
              "include": "#paren-expression"
1910 +
            }
1911 +
          ]
1912 +
        },
1913 +
        {
1914 +
          "begin": "(?=(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1915 +
          "end": "(?<=>)(?!(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1916 +
          "patterns": [
1917 +
            {
1918 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1919 +
              "end": "(?=(<\\s*[(\\[{]\\s*)$)",
1920 +
              "name": "meta.function-call.js",
1921 +
              "patterns": [
1922 +
                {
1923 +
                  "include": "#function-call-target"
1924 +
                }
1925 +
              ]
1926 +
            },
1927 +
            {
1928 +
              "include": "#comment"
1929 +
            },
1930 +
            {
1931 +
              "include": "#function-call-optionals"
1932 +
            },
1933 +
            {
1934 +
              "include": "#type-arguments"
1935 +
            }
1936 +
          ]
1937 +
        }
1938 +
      ]
1939 +
    },
1940 +
    "function-call-optionals": {
1941 +
      "patterns": [
1942 +
        {
1943 +
          "match": "\\?\\.",
1944 +
          "name": "meta.function-call.js punctuation.accessor.optional.js"
1945 +
        },
1946 +
        {
1947 +
          "match": "!",
1948 +
          "name": "meta.function-call.js keyword.operator.definiteassignment.js"
1949 +
        }
1950 +
      ]
1951 +
    },
1952 +
    "function-call-target": {
1953 +
      "patterns": [
1954 +
        {
1955 +
          "include": "#support-function-call-identifiers"
1956 +
        },
1957 +
        {
1958 +
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)",
1959 +
          "name": "entity.name.function.js"
1960 +
        }
1961 +
      ]
1962 +
    },
1963 +
    "function-declaration": {
1964 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
1965 +
      "beginCaptures": {
1966 +
        "1": {
1967 +
          "name": "keyword.control.export.js"
1968 +
        },
1969 +
        "2": {
1970 +
          "name": "storage.modifier.js"
1971 +
        },
1972 +
        "3": {
1973 +
          "name": "storage.modifier.async.js"
1974 +
        },
1975 +
        "4": {
1976 +
          "name": "storage.type.function.js"
1977 +
        },
1978 +
        "5": {
1979 +
          "name": "keyword.generator.asterisk.js"
1980 +
        },
1981 +
        "6": {
1982 +
          "name": "meta.definition.function.js entity.name.function.js"
1983 +
        }
1984 +
      },
1985 +
      "end": "(?=;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)|(?<=})",
1986 +
      "name": "meta.function.js",
1987 +
      "patterns": [
1988 +
        {
1989 +
          "include": "#function-name"
1990 +
        },
1991 +
        {
1992 +
          "include": "#function-body"
1993 +
        }
1994 +
      ]
1995 +
    },
1996 +
    "function-expression": {
1997 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
1998 +
      "beginCaptures": {
1999 +
        "1": {
2000 +
          "name": "storage.modifier.async.js"
2001 +
        },
2002 +
        "2": {
2003 +
          "name": "storage.type.function.js"
2004 +
        },
2005 +
        "3": {
2006 +
          "name": "keyword.generator.asterisk.js"
2007 +
        },
2008 +
        "4": {
2009 +
          "name": "meta.definition.function.js entity.name.function.js"
2010 +
        }
2011 +
      },
2012 +
      "end": "(?=;)|(?<=})",
2013 +
      "name": "meta.function.expression.js",
2014 +
      "patterns": [
2015 +
        {
2016 +
          "include": "#function-name"
2017 +
        },
2018 +
        {
2019 +
          "include": "#single-line-comment-consuming-line-ending"
2020 +
        },
2021 +
        {
2022 +
          "include": "#function-body"
2023 +
        }
2024 +
      ]
2025 +
    },
2026 +
    "function-name": {
2027 +
      "match": "[$_[:alpha:]][$_[:alnum:]]*",
2028 +
      "name": "meta.definition.function.js entity.name.function.js"
2029 +
    },
2030 +
    "function-parameters": {
2031 +
      "begin": "\\(",
2032 +
      "beginCaptures": {
2033 +
        "0": {
2034 +
          "name": "punctuation.definition.parameters.begin.js"
2035 +
        }
2036 +
      },
2037 +
      "end": "\\)",
2038 +
      "endCaptures": {
2039 +
        "0": {
2040 +
          "name": "punctuation.definition.parameters.end.js"
2041 +
        }
2042 +
      },
2043 +
      "name": "meta.parameters.js",
2044 +
      "patterns": [
2045 +
        {
2046 +
          "include": "#function-parameters-body"
2047 +
        }
2048 +
      ]
2049 +
    },
2050 +
    "function-parameters-body": {
2051 +
      "patterns": [
2052 +
        {
2053 +
          "include": "#comment"
2054 +
        },
2055 +
        {
2056 +
          "include": "#string"
2057 +
        },
2058 +
        {
2059 +
          "include": "#decorator"
2060 +
        },
2061 +
        {
2062 +
          "include": "#destructuring-parameter"
2063 +
        },
2064 +
        {
2065 +
          "include": "#parameter-name"
2066 +
        },
2067 +
        {
2068 +
          "include": "#parameter-type-annotation"
2069 +
        },
2070 +
        {
2071 +
          "include": "#variable-initializer"
2072 +
        },
2073 +
        {
2074 +
          "match": ",",
2075 +
          "name": "punctuation.separator.parameter.js"
2076 +
        }
2077 +
      ]
2078 +
    },
2079 +
    "identifiers": {
2080 +
      "patterns": [
2081 +
        {
2082 +
          "include": "#object-identifiers"
2083 +
        },
2084 +
        {
2085 +
          "captures": {
2086 +
            "1": {
2087 +
              "name": "punctuation.accessor.js"
2088 +
            },
2089 +
            "2": {
2090 +
              "name": "punctuation.accessor.optional.js"
2091 +
            },
2092 +
            "3": {
2093 +
              "name": "entity.name.function.js"
2094 +
            }
2095 +
          },
2096 +
          "match": "(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))"
2097 +
        },
2098 +
        {
2099 +
          "captures": {
2100 +
            "1": {
2101 +
              "name": "punctuation.accessor.js"
2102 +
            },
2103 +
            "2": {
2104 +
              "name": "punctuation.accessor.optional.js"
2105 +
            },
2106 +
            "3": {
2107 +
              "name": "variable.other.constant.property.js"
2108 +
            }
2109 +
          },
2110 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])"
2111 +
        },
2112 +
        {
2113 +
          "captures": {
2114 +
            "1": {
2115 +
              "name": "punctuation.accessor.js"
2116 +
            },
2117 +
            "2": {
2118 +
              "name": "punctuation.accessor.optional.js"
2119 +
            },
2120 +
            "3": {
2121 +
              "name": "variable.other.property.js"
2122 +
            }
2123 +
          },
2124 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?[$_[:alpha:]][$_[:alnum:]]*)"
2125 +
        },
2126 +
        {
2127 +
          "match": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])",
2128 +
          "name": "variable.other.constant.js"
2129 +
        },
2130 +
        {
2131 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
2132 +
          "name": "variable.other.readwrite.js"
2133 +
        }
2134 +
      ]
2135 +
    },
2136 +
    "if-statement": {
2137 +
      "patterns": [
2138 +
        {
2139 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))\\s*(?!\\{))",
2140 +
          "end": "(?=;|$|})",
2141 +
          "patterns": [
2142 +
            {
2143 +
              "include": "#comment"
2144 +
            },
2145 +
            {
2146 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2147 +
              "beginCaptures": {
2148 +
                "1": {
2149 +
                  "name": "keyword.control.conditional.js"
2150 +
                },
2151 +
                "2": {
2152 +
                  "name": "meta.brace.round.js"
2153 +
                }
2154 +
              },
2155 +
              "end": "\\)",
2156 +
              "endCaptures": {
2157 +
                "0": {
2158 +
                  "name": "meta.brace.round.js"
2159 +
                }
2160 +
              },
2161 +
              "patterns": [
2162 +
                {
2163 +
                  "include": "#expression"
2164 +
                }
2165 +
              ]
2166 +
            },
2167 +
            {
2168 +
              "begin": "(?<=\\))\\s*/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
2169 +
              "beginCaptures": {
2170 +
                "0": {
2171 +
                  "name": "punctuation.definition.string.begin.js"
2172 +
                }
2173 +
              },
2174 +
              "end": "(/)([dgimsuvy]*)",
2175 +
              "endCaptures": {
2176 +
                "1": {
2177 +
                  "name": "punctuation.definition.string.end.js"
2178 +
                },
2179 +
                "2": {
2180 +
                  "name": "keyword.other.js"
2181 +
                }
2182 +
              },
2183 +
              "name": "string.regexp.js",
2184 +
              "patterns": [
2185 +
                {
2186 +
                  "include": "#regexp"
2187 +
                }
2188 +
              ]
2189 +
            },
2190 +
            {
2191 +
              "include": "#statements"
2192 +
            }
2193 +
          ]
2194 +
        }
2195 +
      ]
2196 +
    },
2197 +
    "import-declaration": {
2198 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[(:])(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2199 +
      "beginCaptures": {
2200 +
        "1": {
2201 +
          "name": "keyword.control.export.js"
2202 +
        },
2203 +
        "2": {
2204 +
          "name": "storage.modifier.js"
2205 +
        },
2206 +
        "3": {
2207 +
          "name": "keyword.control.import.js"
2208 +
        },
2209 +
        "4": {
2210 +
          "name": "keyword.control.type.js"
2211 +
        }
2212 +
      },
2213 +
      "end": "(?<!(?:^|[^$._[:alnum:]])import)(?=;|$|^)",
2214 +
      "name": "meta.import.js",
2215 +
      "patterns": [
2216 +
        {
2217 +
          "include": "#single-line-comment-consuming-line-ending"
2218 +
        },
2219 +
        {
2220 +
          "include": "#comment"
2221 +
        },
2222 +
        {
2223 +
          "include": "#string"
2224 +
        },
2225 +
        {
2226 +
          "begin": "(?<=(?:^|[^$._[:alnum:]])import)(?!\\s*[\"'])",
2227 +
          "end": "\\bfrom\\b",
2228 +
          "endCaptures": {
2229 +
            "0": {
2230 +
              "name": "keyword.control.from.js"
2231 +
            }
2232 +
          },
2233 +
          "patterns": [
2234 +
            {
2235 +
              "include": "#import-export-declaration"
2236 +
            }
2237 +
          ]
2238 +
        },
2239 +
        {
2240 +
          "include": "#import-export-declaration"
2241 +
        }
2242 +
      ]
2243 +
    },
2244 +
    "import-equals-declaration": {
2245 +
      "patterns": [
2246 +
        {
2247 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2248 +
          "beginCaptures": {
2249 +
            "1": {
2250 +
              "name": "keyword.control.export.js"
2251 +
            },
2252 +
            "2": {
2253 +
              "name": "storage.modifier.js"
2254 +
            },
2255 +
            "3": {
2256 +
              "name": "keyword.control.import.js"
2257 +
            },
2258 +
            "4": {
2259 +
              "name": "keyword.control.type.js"
2260 +
            },
2261 +
            "5": {
2262 +
              "name": "variable.other.readwrite.alias.js"
2263 +
            },
2264 +
            "6": {
2265 +
              "name": "keyword.operator.assignment.js"
2266 +
            },
2267 +
            "7": {
2268 +
              "name": "keyword.control.require.js"
2269 +
            },
2270 +
            "8": {
2271 +
              "name": "meta.brace.round.js"
2272 +
            }
2273 +
          },
2274 +
          "end": "\\)",
2275 +
          "endCaptures": {
2276 +
            "0": {
2277 +
              "name": "meta.brace.round.js"
2278 +
            }
2279 +
          },
2280 +
          "name": "meta.import-equals.external.js",
2281 +
          "patterns": [
2282 +
            {
2283 +
              "include": "#comment"
2284 +
            },
2285 +
            {
2286 +
              "include": "#string"
2287 +
            }
2288 +
          ]
2289 +
        },
2290 +
        {
2291 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2292 +
          "beginCaptures": {
2293 +
            "1": {
2294 +
              "name": "keyword.control.export.js"
2295 +
            },
2296 +
            "2": {
2297 +
              "name": "storage.modifier.js"
2298 +
            },
2299 +
            "3": {
2300 +
              "name": "keyword.control.import.js"
2301 +
            },
2302 +
            "4": {
2303 +
              "name": "keyword.control.type.js"
2304 +
            },
2305 +
            "5": {
2306 +
              "name": "variable.other.readwrite.alias.js"
2307 +
            },
2308 +
            "6": {
2309 +
              "name": "keyword.operator.assignment.js"
2310 +
            }
2311 +
          },
2312 +
          "end": "(?=;|$|^)",
2313 +
          "name": "meta.import-equals.internal.js",
2314 +
          "patterns": [
2315 +
            {
2316 +
              "include": "#single-line-comment-consuming-line-ending"
2317 +
            },
2318 +
            {
2319 +
              "include": "#comment"
2320 +
            },
2321 +
            {
2322 +
              "captures": {
2323 +
                "1": {
2324 +
                  "name": "entity.name.type.module.js"
2325 +
                },
2326 +
                "2": {
2327 +
                  "name": "punctuation.accessor.js"
2328 +
                },
2329 +
                "3": {
2330 +
                  "name": "punctuation.accessor.optional.js"
2331 +
                }
2332 +
              },
2333 +
              "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
2334 +
            },
2335 +
            {
2336 +
              "match": "([$_[:alpha:]][$_[:alnum:]]*)",
2337 +
              "name": "variable.other.readwrite.js"
2338 +
            }
2339 +
          ]
2340 +
        }
2341 +
      ]
2342 +
    },
2343 +
    "import-export-assert-clause": {
2344 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(with)|(assert))\\s*(\\{)",
2345 +
      "beginCaptures": {
2346 +
        "1": {
2347 +
          "name": "keyword.control.with.js"
2348 +
        },
2349 +
        "2": {
2350 +
          "name": "keyword.control.assert.js"
2351 +
        },
2352 +
        "3": {
2353 +
          "name": "punctuation.definition.block.js"
2354 +
        }
2355 +
      },
2356 +
      "end": "}",
2357 +
      "endCaptures": {
2358 +
        "0": {
2359 +
          "name": "punctuation.definition.block.js"
2360 +
        }
2361 +
      },
2362 +
      "patterns": [
2363 +
        {
2364 +
          "include": "#comment"
2365 +
        },
2366 +
        {
2367 +
          "include": "#string"
2368 +
        },
2369 +
        {
2370 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
2371 +
          "name": "meta.object-literal.key.js"
2372 +
        },
2373 +
        {
2374 +
          "match": ":",
2375 +
          "name": "punctuation.separator.key-value.js"
2376 +
        }
2377 +
      ]
2378 +
    },
2379 +
    "import-export-block": {
2380 +
      "begin": "\\{",
2381 +
      "beginCaptures": {
2382 +
        "0": {
2383 +
          "name": "punctuation.definition.block.js"
2384 +
        }
2385 +
      },
2386 +
      "end": "}",
2387 +
      "endCaptures": {
2388 +
        "0": {
2389 +
          "name": "punctuation.definition.block.js"
2390 +
        }
2391 +
      },
2392 +
      "name": "meta.block.js",
2393 +
      "patterns": [
2394 +
        {
2395 +
          "include": "#import-export-clause"
2396 +
        }
2397 +
      ]
2398 +
    },
2399 +
    "import-export-clause": {
2400 +
      "patterns": [
2401 +
        {
2402 +
          "include": "#comment"
2403 +
        },
2404 +
        {
2405 +
          "captures": {
2406 +
            "1": {
2407 +
              "name": "keyword.control.type.js"
2408 +
            },
2409 +
            "12": {
2410 +
              "name": "keyword.control.as.js"
2411 +
            },
2412 +
            "13": {
2413 +
              "name": "keyword.control.default.js"
2414 +
            },
2415 +
            "14": {
2416 +
              "name": "variable.other.readwrite.alias.js"
2417 +
            },
2418 +
            "15": {
2419 +
              "name": "string.quoted.alias.js"
2420 +
            },
2421 +
            "2": {
2422 +
              "name": "keyword.control.default.js"
2423 +
            },
2424 +
            "3": {
2425 +
              "name": "constant.language.import-export-all.js"
2426 +
            },
2427 +
            "4": {
2428 +
              "name": "variable.other.readwrite.js"
2429 +
            },
2430 +
            "5": {
2431 +
              "name": "string.quoted.alias.js"
2432 +
            }
2433 +
          },
2434 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(type)\\s+)?(?:\\b(default)|(\\*)|\\b([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))\\s+(as)\\s+(?:(default(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2435 +
        },
2436 +
        {
2437 +
          "include": "#punctuation-comma"
2438 +
        },
2439 +
        {
2440 +
          "match": "\\*",
2441 +
          "name": "constant.language.import-export-all.js"
2442 +
        },
2443 +
        {
2444 +
          "match": "\\b(default)\\b",
2445 +
          "name": "keyword.control.default.js"
2446 +
        },
2447 +
        {
2448 +
          "captures": {
2449 +
            "1": {
2450 +
              "name": "keyword.control.type.js"
2451 +
            },
2452 +
            "2": {
2453 +
              "name": "variable.other.readwrite.alias.js"
2454 +
            },
2455 +
            "3": {
2456 +
              "name": "string.quoted.alias.js"
2457 +
            }
2458 +
          },
2459 +
          "match": "(?:\\b(type)\\s+)?(?:([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2460 +
        }
2461 +
      ]
2462 +
    },
2463 +
    "import-export-declaration": {
2464 +
      "patterns": [
2465 +
        {
2466 +
          "include": "#comment"
2467 +
        },
2468 +
        {
2469 +
          "include": "#string"
2470 +
        },
2471 +
        {
2472 +
          "include": "#import-export-block"
2473 +
        },
2474 +
        {
2475 +
          "match": "\\bfrom\\b",
2476 +
          "name": "keyword.control.from.js"
2477 +
        },
2478 +
        {
2479 +
          "include": "#import-export-assert-clause"
2480 +
        },
2481 +
        {
2482 +
          "include": "#import-export-clause"
2483 +
        }
2484 +
      ]
2485 +
    },
2486 +
    "indexer-declaration": {
2487 +
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=:)",
2488 +
      "beginCaptures": {
2489 +
        "1": {
2490 +
          "name": "storage.modifier.js"
2491 +
        },
2492 +
        "2": {
2493 +
          "name": "meta.brace.square.js"
2494 +
        },
2495 +
        "3": {
2496 +
          "name": "variable.parameter.js"
2497 +
        }
2498 +
      },
2499 +
      "end": "(])\\s*(\\?\\s*)?|$",
2500 +
      "endCaptures": {
2501 +
        "1": {
2502 +
          "name": "meta.brace.square.js"
2503 +
        },
2504 +
        "2": {
2505 +
          "name": "keyword.operator.optional.js"
2506 +
        }
2507 +
      },
2508 +
      "name": "meta.indexer.declaration.js",
2509 +
      "patterns": [
2510 +
        {
2511 +
          "include": "#type-annotation"
2512 +
        }
2513 +
      ]
2514 +
    },
2515 +
    "indexer-mapped-type-declaration": {
2516 +
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([-+])?(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s+(in)\\s+",
2517 +
      "beginCaptures": {
2518 +
        "1": {
2519 +
          "name": "keyword.operator.type.modifier.js"
2520 +
        },
2521 +
        "2": {
2522 +
          "name": "storage.modifier.js"
2523 +
        },
2524 +
        "3": {
2525 +
          "name": "meta.brace.square.js"
2526 +
        },
2527 +
        "4": {
2528 +
          "name": "entity.name.type.js"
2529 +
        },
2530 +
        "5": {
2531 +
          "name": "keyword.operator.expression.in.js"
2532 +
        }
2533 +
      },
2534 +
      "end": "(])([-+])?\\s*(\\?\\s*)?|$",
2535 +
      "endCaptures": {
2536 +
        "1": {
2537 +
          "name": "meta.brace.square.js"
2538 +
        },
2539 +
        "2": {
2540 +
          "name": "keyword.operator.type.modifier.js"
2541 +
        },
2542 +
        "3": {
2543 +
          "name": "keyword.operator.optional.js"
2544 +
        }
2545 +
      },
2546 +
      "name": "meta.indexer.mappedtype.declaration.js",
2547 +
      "patterns": [
2548 +
        {
2549 +
          "captures": {
2550 +
            "1": {
2551 +
              "name": "keyword.control.as.js"
2552 +
            }
2553 +
          },
2554 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+"
2555 +
        },
2556 +
        {
2557 +
          "include": "#type"
2558 +
        }
2559 +
      ]
2560 +
    },
2561 +
    "inline-tags": {
2562 +
      "patterns": [
2563 +
        {
2564 +
          "captures": {
2565 +
            "1": {
2566 +
              "name": "punctuation.definition.bracket.square.begin.jsdoc"
2567 +
            },
2568 +
            "2": {
2569 +
              "name": "punctuation.definition.bracket.square.end.jsdoc"
2570 +
            }
2571 +
          },
2572 +
          "match": "(\\[)[^]]+(])(?=\\{@(?:link|linkcode|linkplain|tutorial))",
2573 +
          "name": "constant.other.description.jsdoc"
2574 +
        },
2575 +
        {
2576 +
          "begin": "(\\{)((@)(?:link(?:code|plain)?|tutorial))\\s*",
2577 +
          "beginCaptures": {
2578 +
            "1": {
2579 +
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2580 +
            },
2581 +
            "2": {
2582 +
              "name": "storage.type.class.jsdoc"
2583 +
            },
2584 +
            "3": {
2585 +
              "name": "punctuation.definition.inline.tag.jsdoc"
2586 +
            }
2587 +
          },
2588 +
          "end": "}|(?=\\*/)",
2589 +
          "endCaptures": {
2590 +
            "0": {
2591 +
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2592 +
            }
2593 +
          },
2594 +
          "name": "entity.name.type.instance.jsdoc",
2595 +
          "patterns": [
2596 +
            {
2597 +
              "captures": {
2598 +
                "1": {
2599 +
                  "name": "variable.other.link.underline.jsdoc"
2600 +
                },
2601 +
                "2": {
2602 +
                  "name": "punctuation.separator.pipe.jsdoc"
2603 +
                }
2604 +
              },
2605 +
              "match": "\\G((?=https?://)(?:[^*|}\\s]|\\*/)+)(\\|)?"
2606 +
            },
2607 +
            {
2608 +
              "captures": {
2609 +
                "1": {
2610 +
                  "name": "variable.other.description.jsdoc"
2611 +
                },
2612 +
                "2": {
2613 +
                  "name": "punctuation.separator.pipe.jsdoc"
2614 +
                }
2615 +
              },
2616 +
              "match": "\\G((?:[^*@{|}\\s]|\\*[^/])+)(\\|)?"
2617 +
            }
2618 +
          ]
2619 +
        }
2620 +
      ]
2621 +
    },
2622 +
    "instanceof-expr": {
2623 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2624 +
      "beginCaptures": {
2625 +
        "1": {
2626 +
          "name": "keyword.operator.expression.instanceof.js"
2627 +
        }
2628 +
      },
2629 +
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|([!=]==?)|(([\\&^|~]\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s+instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
2630 +
      "patterns": [
2631 +
        {
2632 +
          "include": "#type"
2633 +
        }
2634 +
      ]
2635 +
    },
2636 +
    "interface-declaration": {
2637 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[*/])",
2638 +
      "beginCaptures": {
2639 +
        "1": {
2640 +
          "name": "keyword.control.export.js"
2641 +
        },
2642 +
        "2": {
2643 +
          "name": "storage.modifier.js"
2644 +
        },
2645 +
        "3": {
2646 +
          "name": "storage.modifier.js"
2647 +
        },
2648 +
        "4": {
2649 +
          "name": "storage.type.interface.js"
2650 +
        }
2651 +
      },
2652 +
      "end": "(?<=})",
2653 +
      "name": "meta.interface.js",
2654 +
      "patterns": [
2655 +
        {
2656 +
          "include": "#comment"
2657 +
        },
2658 +
        {
2659 +
          "include": "#class-or-interface-heritage"
2660 +
        },
2661 +
        {
2662 +
          "captures": {
2663 +
            "0": {
2664 +
              "name": "entity.name.type.interface.js"
2665 +
            }
2666 +
          },
2667 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
2668 +
        },
2669 +
        {
2670 +
          "include": "#type-parameters"
2671 +
        },
2672 +
        {
2673 +
          "include": "#class-or-interface-body"
2674 +
        }
2675 +
      ]
2676 +
    },
2677 +
    "jsdoctype": {
2678 +
      "patterns": [
2679 +
        {
2680 +
          "begin": "\\G(\\{)",
2681 +
          "beginCaptures": {
2682 +
            "0": {
2683 +
              "name": "entity.name.type.instance.jsdoc"
2684 +
            },
2685 +
            "1": {
2686 +
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2687 +
            }
2688 +
          },
2689 +
          "contentName": "entity.name.type.instance.jsdoc",
2690 +
          "end": "((}))\\s*|(?=\\*/)",
2691 +
          "endCaptures": {
2692 +
            "1": {
2693 +
              "name": "entity.name.type.instance.jsdoc"
2694 +
            },
2695 +
            "2": {
2696 +
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2697 +
            }
2698 +
          },
2699 +
          "patterns": [
2700 +
            {
2701 +
              "include": "#brackets"
2702 +
            }
2703 +
          ]
2704 +
        }
2705 +
      ]
2706 +
    },
2707 +
    "jsx": {
2708 +
      "patterns": [
2709 +
        {
2710 +
          "include": "#jsx-tag-without-attributes-in-expression"
2711 +
        },
2712 +
        {
2713 +
          "include": "#jsx-tag-in-expression"
2714 +
        }
2715 +
      ]
2716 +
    },
2717 +
    "jsx-children": {
2718 +
      "patterns": [
2719 +
        {
2720 +
          "include": "#jsx-tag-without-attributes"
2721 +
        },
2722 +
        {
2723 +
          "include": "#jsx-tag"
2724 +
        },
2725 +
        {
2726 +
          "include": "#jsx-evaluated-code"
2727 +
        },
2728 +
        {
2729 +
          "include": "#jsx-entities"
2730 +
        }
2731 +
      ]
2732 +
    },
2733 +
    "jsx-entities": {
2734 +
      "patterns": [
2735 +
        {
2736 +
          "captures": {
2737 +
            "1": {
2738 +
              "name": "punctuation.definition.entity.js"
2739 +
            },
2740 +
            "3": {
2741 +
              "name": "punctuation.definition.entity.js"
2742 +
            }
2743 +
          },
2744 +
          "match": "(&)([0-9A-Za-z]+|#[0-9]+|#x\\h+)(;)",
2745 +
          "name": "constant.character.entity.js"
2746 +
        }
2747 +
      ]
2748 +
    },
2749 +
    "jsx-evaluated-code": {
2750 +
      "begin": "\\{",
2751 +
      "beginCaptures": {
2752 +
        "0": {
2753 +
          "name": "punctuation.section.embedded.begin.js"
2754 +
        }
2755 +
      },
2756 +
      "contentName": "meta.embedded.expression.js",
2757 +
      "end": "}",
2758 +
      "endCaptures": {
2759 +
        "0": {
2760 +
          "name": "punctuation.section.embedded.end.js"
2761 +
        }
2762 +
      },
2763 +
      "patterns": [
2764 +
        {
2765 +
          "include": "#expression"
2766 +
        }
2767 +
      ]
2768 +
    },
2769 +
    "jsx-string-double-quoted": {
2770 +
      "begin": "\"",
2771 +
      "beginCaptures": {
2772 +
        "0": {
2773 +
          "name": "punctuation.definition.string.begin.js"
2774 +
        }
2775 +
      },
2776 +
      "end": "\"",
2777 +
      "endCaptures": {
2778 +
        "0": {
2779 +
          "name": "punctuation.definition.string.end.js"
2780 +
        }
2781 +
      },
2782 +
      "name": "string.quoted.double.js",
2783 +
      "patterns": [
2784 +
        {
2785 +
          "include": "#jsx-entities"
2786 +
        }
2787 +
      ]
2788 +
    },
2789 +
    "jsx-string-single-quoted": {
2790 +
      "begin": "'",
2791 +
      "beginCaptures": {
2792 +
        "0": {
2793 +
          "name": "punctuation.definition.string.begin.js"
2794 +
        }
2795 +
      },
2796 +
      "end": "'",
2797 +
      "endCaptures": {
2798 +
        "0": {
2799 +
          "name": "punctuation.definition.string.end.js"
2800 +
        }
2801 +
      },
2802 +
      "name": "string.quoted.single.js",
2803 +
      "patterns": [
2804 +
        {
2805 +
          "include": "#jsx-entities"
2806 +
        }
2807 +
      ]
2808 +
    },
2809 +
    "jsx-tag": {
2810 +
      "begin": "(?=(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))(?=((<\\s*)|(\\s+))(?!\\?)|/?>))",
2811 +
      "end": "(/>)|(</)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))?\\s*(>)",
2812 +
      "endCaptures": {
2813 +
        "1": {
2814 +
          "name": "punctuation.definition.tag.end.js"
2815 +
        },
2816 +
        "2": {
2817 +
          "name": "punctuation.definition.tag.begin.js"
2818 +
        },
2819 +
        "3": {
2820 +
          "name": "entity.name.tag.namespace.js"
2821 +
        },
2822 +
        "4": {
2823 +
          "name": "punctuation.separator.namespace.js"
2824 +
        },
2825 +
        "5": {
2826 +
          "name": "entity.name.tag.js"
2827 +
        },
2828 +
        "6": {
2829 +
          "name": "support.class.component.js"
2830 +
        },
2831 +
        "7": {
2832 +
          "name": "punctuation.definition.tag.end.js"
2833 +
        }
2834 +
      },
2835 +
      "name": "meta.tag.js",
2836 +
      "patterns": [
2837 +
        {
2838 +
          "begin": "(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))(?=((<\\s*)|(\\s+))(?!\\?)|/?>)",
2839 +
          "beginCaptures": {
2840 +
            "1": {
2841 +
              "name": "punctuation.definition.tag.begin.js"
2842 +
            },
2843 +
            "2": {
2844 +
              "name": "entity.name.tag.namespace.js"
2845 +
            },
2846 +
            "3": {
2847 +
              "name": "punctuation.separator.namespace.js"
2848 +
            },
2849 +
            "4": {
2850 +
              "name": "entity.name.tag.js"
2851 +
            },
2852 +
            "5": {
2853 +
              "name": "support.class.component.js"
2854 +
            }
2855 +
          },
2856 +
          "end": "(?=/?>)",
2857 +
          "patterns": [
2858 +
            {
2859 +
              "include": "#comment"
2860 +
            },
2861 +
            {
2862 +
              "include": "#type-arguments"
2863 +
            },
2864 +
            {
2865 +
              "include": "#jsx-tag-attributes"
2866 +
            }
2867 +
          ]
2868 +
        },
2869 +
        {
2870 +
          "begin": "(>)",
2871 +
          "beginCaptures": {
2872 +
            "1": {
2873 +
              "name": "punctuation.definition.tag.end.js"
2874 +
            }
2875 +
          },
2876 +
          "contentName": "meta.jsx.children.js",
2877 +
          "end": "(?=</)",
2878 +
          "patterns": [
2879 +
            {
2880 +
              "include": "#jsx-children"
2881 +
            }
2882 +
          ]
2883 +
        }
2884 +
      ]
2885 +
    },
2886 +
    "jsx-tag-attribute-assignment": {
2887 +
      "match": "=(?=\\s*(?:[\"'{]|/\\*|//|\\n))",
2888 +
      "name": "keyword.operator.assignment.js"
2889 +
    },
2890 +
    "jsx-tag-attribute-name": {
2891 +
      "captures": {
2892 +
        "1": {
2893 +
          "name": "entity.other.attribute-name.namespace.js"
2894 +
        },
2895 +
        "2": {
2896 +
          "name": "punctuation.separator.namespace.js"
2897 +
        },
2898 +
        "3": {
2899 +
          "name": "entity.other.attribute-name.js"
2900 +
        }
2901 +
      },
2902 +
      "match": "\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(:))?([$_[:alpha:]][-$_[:alnum:]]*)(?=[=\\s]|/?>|/\\*|//)"
2903 +
    },
2904 +
    "jsx-tag-attributes": {
2905 +
      "begin": "\\s+",
2906 +
      "end": "(?=/?>)",
2907 +
      "name": "meta.tag.attributes.js",
2908 +
      "patterns": [
2909 +
        {
2910 +
          "include": "#comment"
2911 +
        },
2912 +
        {
2913 +
          "include": "#jsx-tag-attribute-name"
2914 +
        },
2915 +
        {
2916 +
          "include": "#jsx-tag-attribute-assignment"
2917 +
        },
2918 +
        {
2919 +
          "include": "#jsx-string-double-quoted"
2920 +
        },
2921 +
        {
2922 +
          "include": "#jsx-string-single-quoted"
2923 +
        },
2924 +
        {
2925 +
          "include": "#jsx-evaluated-code"
2926 +
        },
2927 +
        {
2928 +
          "include": "#jsx-tag-attributes-illegal"
2929 +
        }
2930 +
      ]
2931 +
    },
2932 +
    "jsx-tag-attributes-illegal": {
2933 +
      "match": "\\S+",
2934 +
      "name": "invalid.illegal.attribute.js"
2935 +
    },
2936 +
    "jsx-tag-in-expression": {
2937 +
      "begin": "(?<!\\+\\+|--)(?<=[(*,:=>?\\[{]|&&|\\|\\||\\?|\\*/|^await|[^$._[:alnum:]]await|^return|[^$._[:alnum:]]return|^default|[^$._[:alnum:]]default|^yield|[^$._[:alnum:]]yield|^)\\s*(?!<\\s*[$_[:alpha:]][$_[:alnum:]]*((\\s+extends\\s+[^=>])|,))(?=(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))(?=((<\\s*)|(\\s+))(?!\\?)|/?>))",
2938 +
      "end": "(?!(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))(?=((<\\s*)|(\\s+))(?!\\?)|/?>))",
2939 +
      "patterns": [
2940 +
        {
2941 +
          "include": "#jsx-tag"
2942 +
        }
2943 +
      ]
2944 +
    },
2945 +
    "jsx-tag-without-attributes": {
2946 +
      "begin": "(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))?\\s*(>)",
2947 +
      "beginCaptures": {
2948 +
        "1": {
2949 +
          "name": "punctuation.definition.tag.begin.js"
2950 +
        },
2951 +
        "2": {
2952 +
          "name": "entity.name.tag.namespace.js"
2953 +
        },
2954 +
        "3": {
2955 +
          "name": "punctuation.separator.namespace.js"
2956 +
        },
2957 +
        "4": {
2958 +
          "name": "entity.name.tag.js"
2959 +
        },
2960 +
        "5": {
2961 +
          "name": "support.class.component.js"
2962 +
        },
2963 +
        "6": {
2964 +
          "name": "punctuation.definition.tag.end.js"
2965 +
        }
2966 +
      },
2967 +
      "contentName": "meta.jsx.children.js",
2968 +
      "end": "(</)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))?\\s*(>)",
2969 +
      "endCaptures": {
2970 +
        "1": {
2971 +
          "name": "punctuation.definition.tag.begin.js"
2972 +
        },
2973 +
        "2": {
2974 +
          "name": "entity.name.tag.namespace.js"
2975 +
        },
2976 +
        "3": {
2977 +
          "name": "punctuation.separator.namespace.js"
2978 +
        },
2979 +
        "4": {
2980 +
          "name": "entity.name.tag.js"
2981 +
        },
2982 +
        "5": {
2983 +
          "name": "support.class.component.js"
2984 +
        },
2985 +
        "6": {
2986 +
          "name": "punctuation.definition.tag.end.js"
2987 +
        }
2988 +
      },
2989 +
      "name": "meta.tag.without-attributes.js",
2990 +
      "patterns": [
2991 +
        {
2992 +
          "include": "#jsx-children"
2993 +
        }
2994 +
      ]
2995 +
    },
2996 +
    "jsx-tag-without-attributes-in-expression": {
2997 +
      "begin": "(?<!\\+\\+|--)(?<=[(*,:=>?\\[{]|&&|\\|\\||\\?|\\*/|^await|[^$._[:alnum:]]await|^return|[^$._[:alnum:]]return|^default|[^$._[:alnum:]]default|^yield|[^$._[:alnum:]]yield|^)\\s*(?=(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))?\\s*(>))",
2998 +
      "end": "(?!(<)\\s*(?:([$_[:alpha:]][-$._[:alnum:]]*)(?<![-.])(:))?((?:[a-z][0-9a-z]*|([$_[:alpha:]][-$._[:alnum:]]*))(?<![-.]))?\\s*(>))",
2999 +
      "patterns": [
3000 +
        {
3001 +
          "include": "#jsx-tag-without-attributes"
3002 +
        }
3003 +
      ]
3004 +
    },
3005 +
    "label": {
3006 +
      "patterns": [
3007 +
        {
3008 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
3009 +
          "beginCaptures": {
3010 +
            "1": {
3011 +
              "name": "entity.name.label.js"
3012 +
            },
3013 +
            "2": {
3014 +
              "name": "punctuation.separator.label.js"
3015 +
            }
3016 +
          },
3017 +
          "end": "(?<=})",
3018 +
          "patterns": [
3019 +
            {
3020 +
              "include": "#decl-block"
3021 +
            }
3022 +
          ]
3023 +
        },
3024 +
        {
3025 +
          "captures": {
3026 +
            "1": {
3027 +
              "name": "entity.name.label.js"
3028 +
            },
3029 +
            "2": {
3030 +
              "name": "punctuation.separator.label.js"
3031 +
            }
3032 +
          },
3033 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)"
3034 +
        }
3035 +
      ]
3036 +
    },
3037 +
    "literal": {
3038 +
      "patterns": [
3039 +
        {
3040 +
          "include": "#numeric-literal"
3041 +
        },
3042 +
        {
3043 +
          "include": "#boolean-literal"
3044 +
        },
3045 +
        {
3046 +
          "include": "#null-literal"
3047 +
        },
3048 +
        {
3049 +
          "include": "#undefined-literal"
3050 +
        },
3051 +
        {
3052 +
          "include": "#numericConstant-literal"
3053 +
        },
3054 +
        {
3055 +
          "include": "#array-literal"
3056 +
        },
3057 +
        {
3058 +
          "include": "#this-literal"
3059 +
        },
3060 +
        {
3061 +
          "include": "#super-literal"
3062 +
        }
3063 +
      ]
3064 +
    },
3065 +
    "method-declaration": {
3066 +
      "patterns": [
3067 +
        {
3068 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3069 +
          "beginCaptures": {
3070 +
            "1": {
3071 +
              "name": "storage.modifier.js"
3072 +
            },
3073 +
            "2": {
3074 +
              "name": "storage.modifier.js"
3075 +
            },
3076 +
            "3": {
3077 +
              "name": "storage.modifier.js"
3078 +
            },
3079 +
            "4": {
3080 +
              "name": "storage.modifier.async.js"
3081 +
            },
3082 +
            "5": {
3083 +
              "name": "storage.type.js"
3084 +
            }
3085 +
          },
3086 +
          "end": "(?=[,;}]|$)|(?<=})",
3087 +
          "name": "meta.method.declaration.js",
3088 +
          "patterns": [
3089 +
            {
3090 +
              "include": "#method-declaration-name"
3091 +
            },
3092 +
            {
3093 +
              "include": "#function-body"
3094 +
            }
3095 +
          ]
3096 +
        },
3097 +
        {
3098 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\s*\\b(new)\\b(?!:)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3099 +
          "beginCaptures": {
3100 +
            "1": {
3101 +
              "name": "storage.modifier.js"
3102 +
            },
3103 +
            "2": {
3104 +
              "name": "storage.modifier.js"
3105 +
            },
3106 +
            "3": {
3107 +
              "name": "storage.modifier.js"
3108 +
            },
3109 +
            "4": {
3110 +
              "name": "storage.modifier.async.js"
3111 +
            },
3112 +
            "5": {
3113 +
              "name": "keyword.operator.new.js"
3114 +
            },
3115 +
            "6": {
3116 +
              "name": "keyword.generator.asterisk.js"
3117 +
            }
3118 +
          },
3119 +
          "end": "(?=[,;}]|$)|(?<=})",
3120 +
          "name": "meta.method.declaration.js",
3121 +
          "patterns": [
3122 +
            {
3123 +
              "include": "#method-declaration-name"
3124 +
            },
3125 +
            {
3126 +
              "include": "#function-body"
3127 +
            }
3128 +
          ]
3129 +
        },
3130 +
        {
3131 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3132 +
          "beginCaptures": {
3133 +
            "1": {
3134 +
              "name": "storage.modifier.js"
3135 +
            },
3136 +
            "2": {
3137 +
              "name": "storage.modifier.js"
3138 +
            },
3139 +
            "3": {
3140 +
              "name": "storage.modifier.js"
3141 +
            },
3142 +
            "4": {
3143 +
              "name": "storage.modifier.async.js"
3144 +
            },
3145 +
            "5": {
3146 +
              "name": "storage.type.property.js"
3147 +
            },
3148 +
            "6": {
3149 +
              "name": "keyword.generator.asterisk.js"
3150 +
            }
3151 +
          },
3152 +
          "end": "(?=[,;}]|$)|(?<=})",
3153 +
          "name": "meta.method.declaration.js",
3154 +
          "patterns": [
3155 +
            {
3156 +
              "include": "#method-declaration-name"
3157 +
            },
3158 +
            {
3159 +
              "include": "#function-body"
3160 +
            }
3161 +
          ]
3162 +
        }
3163 +
      ]
3164 +
    },
3165 +
    "method-declaration-name": {
3166 +
      "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??)\\s*[(<])",
3167 +
      "end": "(?=[(<])",
3168 +
      "patterns": [
3169 +
        {
3170 +
          "include": "#string"
3171 +
        },
3172 +
        {
3173 +
          "include": "#array-literal"
3174 +
        },
3175 +
        {
3176 +
          "include": "#numeric-literal"
3177 +
        },
3178 +
        {
3179 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
3180 +
          "name": "meta.definition.method.js entity.name.function.js"
3181 +
        },
3182 +
        {
3183 +
          "match": "\\?",
3184 +
          "name": "keyword.operator.optional.js"
3185 +
        }
3186 +
      ]
3187 +
    },
3188 +
    "namespace-declaration": {
3189 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(namespace|module)\\s+(?=[\"$'_`[:alpha:]])",
3190 +
      "beginCaptures": {
3191 +
        "1": {
3192 +
          "name": "keyword.control.export.js"
3193 +
        },
3194 +
        "2": {
3195 +
          "name": "storage.modifier.js"
3196 +
        },
3197 +
        "3": {
3198 +
          "name": "storage.type.namespace.js"
3199 +
        }
3200 +
      },
3201 +
      "end": "(?<=})|(?=;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
3202 +
      "name": "meta.namespace.declaration.js",
3203 +
      "patterns": [
3204 +
        {
3205 +
          "include": "#comment"
3206 +
        },
3207 +
        {
3208 +
          "include": "#string"
3209 +
        },
3210 +
        {
3211 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
3212 +
          "name": "entity.name.type.module.js"
3213 +
        },
3214 +
        {
3215 +
          "include": "#punctuation-accessor"
3216 +
        },
3217 +
        {
3218 +
          "include": "#decl-block"
3219 +
        }
3220 +
      ]
3221 +
    },
3222 +
    "new-expr": {
3223 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3224 +
      "beginCaptures": {
3225 +
        "1": {
3226 +
          "name": "keyword.operator.new.js"
3227 +
        }
3228 +
      },
3229 +
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
3230 +
      "name": "new.expr.js",
3231 +
      "patterns": [
3232 +
        {
3233 +
          "include": "#expression"
3234 +
        }
3235 +
      ]
3236 +
    },
3237 +
    "null-literal": {
3238 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3239 +
      "name": "constant.language.null.js"
3240 +
    },
3241 +
    "numeric-literal": {
3242 +
      "patterns": [
3243 +
        {
3244 +
          "captures": {
3245 +
            "1": {
3246 +
              "name": "storage.type.numeric.bigint.js"
3247 +
            }
3248 +
          },
3249 +
          "match": "\\b(?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$)",
3250 +
          "name": "constant.numeric.hex.js"
3251 +
        },
3252 +
        {
3253 +
          "captures": {
3254 +
            "1": {
3255 +
              "name": "storage.type.numeric.bigint.js"
3256 +
            }
3257 +
          },
3258 +
          "match": "\\b(?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$)",
3259 +
          "name": "constant.numeric.binary.js"
3260 +
        },
3261 +
        {
3262 +
          "captures": {
3263 +
            "1": {
3264 +
              "name": "storage.type.numeric.bigint.js"
3265 +
            }
3266 +
          },
3267 +
          "match": "\\b(?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$)",
3268 +
          "name": "constant.numeric.octal.js"
3269 +
        },
3270 +
        {
3271 +
          "captures": {
3272 +
            "0": {
3273 +
              "name": "constant.numeric.decimal.js"
3274 +
            },
3275 +
            "1": {
3276 +
              "name": "meta.delimiter.decimal.period.js"
3277 +
            },
3278 +
            "10": {
3279 +
              "name": "meta.delimiter.decimal.period.js"
3280 +
            },
3281 +
            "11": {
3282 +
              "name": "storage.type.numeric.bigint.js"
3283 +
            },
3284 +
            "12": {
3285 +
              "name": "meta.delimiter.decimal.period.js"
3286 +
            },
3287 +
            "13": {
3288 +
              "name": "storage.type.numeric.bigint.js"
3289 +
            },
3290 +
            "14": {
3291 +
              "name": "storage.type.numeric.bigint.js"
3292 +
            },
3293 +
            "2": {
3294 +
              "name": "storage.type.numeric.bigint.js"
3295 +
            },
3296 +
            "3": {
3297 +
              "name": "meta.delimiter.decimal.period.js"
3298 +
            },
3299 +
            "4": {
3300 +
              "name": "storage.type.numeric.bigint.js"
3301 +
            },
3302 +
            "5": {
3303 +
              "name": "meta.delimiter.decimal.period.js"
3304 +
            },
3305 +
            "6": {
3306 +
              "name": "storage.type.numeric.bigint.js"
3307 +
            },
3308 +
            "7": {
3309 +
              "name": "storage.type.numeric.bigint.js"
3310 +
            },
3311 +
            "8": {
3312 +
              "name": "meta.delimiter.decimal.period.js"
3313 +
            },
3314 +
            "9": {
3315 +
              "name": "storage.type.numeric.bigint.js"
3316 +
            }
3317 +
          },
3318 +
          "match": "(?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$)"
3319 +
        }
3320 +
      ]
3321 +
    },
3322 +
    "numericConstant-literal": {
3323 +
      "patterns": [
3324 +
        {
3325 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3326 +
          "name": "constant.language.nan.js"
3327 +
        },
3328 +
        {
3329 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3330 +
          "name": "constant.language.infinity.js"
3331 +
        }
3332 +
      ]
3333 +
    },
3334 +
    "object-binding-element": {
3335 +
      "patterns": [
3336 +
        {
3337 +
          "include": "#comment"
3338 +
        },
3339 +
        {
3340 +
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3341 +
          "end": "(?=[,}])",
3342 +
          "patterns": [
3343 +
            {
3344 +
              "include": "#object-binding-element-propertyName"
3345 +
            },
3346 +
            {
3347 +
              "include": "#binding-element"
3348 +
            }
3349 +
          ]
3350 +
        },
3351 +
        {
3352 +
          "include": "#object-binding-pattern"
3353 +
        },
3354 +
        {
3355 +
          "include": "#destructuring-variable-rest"
3356 +
        },
3357 +
        {
3358 +
          "include": "#variable-initializer"
3359 +
        },
3360 +
        {
3361 +
          "include": "#punctuation-comma"
3362 +
        }
3363 +
      ]
3364 +
    },
3365 +
    "object-binding-element-const": {
3366 +
      "patterns": [
3367 +
        {
3368 +
          "include": "#comment"
3369 +
        },
3370 +
        {
3371 +
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3372 +
          "end": "(?=[,}])",
3373 +
          "patterns": [
3374 +
            {
3375 +
              "include": "#object-binding-element-propertyName"
3376 +
            },
3377 +
            {
3378 +
              "include": "#binding-element-const"
3379 +
            }
3380 +
          ]
3381 +
        },
3382 +
        {
3383 +
          "include": "#object-binding-pattern-const"
3384 +
        },
3385 +
        {
3386 +
          "include": "#destructuring-variable-rest-const"
3387 +
        },
3388 +
        {
3389 +
          "include": "#variable-initializer"
3390 +
        },
3391 +
        {
3392 +
          "include": "#punctuation-comma"
3393 +
        }
3394 +
      ]
3395 +
    },
3396 +
    "object-binding-element-propertyName": {
3397 +
      "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3398 +
      "end": "(:)",
3399 +
      "endCaptures": {
3400 +
        "0": {
3401 +
          "name": "punctuation.destructuring.js"
3402 +
        }
3403 +
      },
3404 +
      "patterns": [
3405 +
        {
3406 +
          "include": "#string"
3407 +
        },
3408 +
        {
3409 +
          "include": "#array-literal"
3410 +
        },
3411 +
        {
3412 +
          "include": "#numeric-literal"
3413 +
        },
3414 +
        {
3415 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
3416 +
          "name": "variable.object.property.js"
3417 +
        }
3418 +
      ]
3419 +
    },
3420 +
    "object-binding-pattern": {
3421 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3422 +
      "beginCaptures": {
3423 +
        "1": {
3424 +
          "name": "keyword.operator.rest.js"
3425 +
        },
3426 +
        "2": {
3427 +
          "name": "punctuation.definition.binding-pattern.object.js"
3428 +
        }
3429 +
      },
3430 +
      "end": "}",
3431 +
      "endCaptures": {
3432 +
        "0": {
3433 +
          "name": "punctuation.definition.binding-pattern.object.js"
3434 +
        }
3435 +
      },
3436 +
      "patterns": [
3437 +
        {
3438 +
          "include": "#object-binding-element"
3439 +
        }
3440 +
      ]
3441 +
    },
3442 +
    "object-binding-pattern-const": {
3443 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3444 +
      "beginCaptures": {
3445 +
        "1": {
3446 +
          "name": "keyword.operator.rest.js"
3447 +
        },
3448 +
        "2": {
3449 +
          "name": "punctuation.definition.binding-pattern.object.js"
3450 +
        }
3451 +
      },
3452 +
      "end": "}",
3453 +
      "endCaptures": {
3454 +
        "0": {
3455 +
          "name": "punctuation.definition.binding-pattern.object.js"
3456 +
        }
3457 +
      },
3458 +
      "patterns": [
3459 +
        {
3460 +
          "include": "#object-binding-element-const"
3461 +
        }
3462 +
      ]
3463 +
    },
3464 +
    "object-identifiers": {
3465 +
      "patterns": [
3466 +
        {
3467 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))",
3468 +
          "name": "support.class.js"
3469 +
        },
3470 +
        {
3471 +
          "captures": {
3472 +
            "1": {
3473 +
              "name": "punctuation.accessor.js"
3474 +
            },
3475 +
            "2": {
3476 +
              "name": "punctuation.accessor.optional.js"
3477 +
            },
3478 +
            "3": {
3479 +
              "name": "variable.other.constant.object.property.js"
3480 +
            },
3481 +
            "4": {
3482 +
              "name": "variable.other.object.property.js"
3483 +
            }
3484 +
          },
3485 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(?:(#?\\p{upper}[$_\\d[:upper:]]*)|(#?[$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3486 +
        },
3487 +
        {
3488 +
          "captures": {
3489 +
            "1": {
3490 +
              "name": "variable.other.constant.object.js"
3491 +
            },
3492 +
            "2": {
3493 +
              "name": "variable.other.object.js"
3494 +
            }
3495 +
          },
3496 +
          "match": "(?:(\\p{upper}[$_\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3497 +
        }
3498 +
      ]
3499 +
    },
3500 +
    "object-literal": {
3501 +
      "begin": "\\{",
3502 +
      "beginCaptures": {
3503 +
        "0": {
3504 +
          "name": "punctuation.definition.block.js"
3505 +
        }
3506 +
      },
3507 +
      "end": "}",
3508 +
      "endCaptures": {
3509 +
        "0": {
3510 +
          "name": "punctuation.definition.block.js"
3511 +
        }
3512 +
      },
3513 +
      "name": "meta.objectliteral.js",
3514 +
      "patterns": [
3515 +
        {
3516 +
          "include": "#object-member"
3517 +
        }
3518 +
      ]
3519 +
    },
3520 +
    "object-literal-method-declaration": {
3521 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3522 +
      "beginCaptures": {
3523 +
        "1": {
3524 +
          "name": "storage.modifier.async.js"
3525 +
        },
3526 +
        "2": {
3527 +
          "name": "storage.type.property.js"
3528 +
        },
3529 +
        "3": {
3530 +
          "name": "keyword.generator.asterisk.js"
3531 +
        }
3532 +
      },
3533 +
      "end": "(?=[,;}])|(?<=})",
3534 +
      "name": "meta.method.declaration.js",
3535 +
      "patterns": [
3536 +
        {
3537 +
          "include": "#method-declaration-name"
3538 +
        },
3539 +
        {
3540 +
          "include": "#function-body"
3541 +
        },
3542 +
        {
3543 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3544 +
          "beginCaptures": {
3545 +
            "1": {
3546 +
              "name": "storage.modifier.async.js"
3547 +
            },
3548 +
            "2": {
3549 +
              "name": "storage.type.property.js"
3550 +
            },
3551 +
            "3": {
3552 +
              "name": "keyword.generator.asterisk.js"
3553 +
            }
3554 +
          },
3555 +
          "end": "(?=[(<])",
3556 +
          "patterns": [
3557 +
            {
3558 +
              "include": "#method-declaration-name"
3559 +
            }
3560 +
          ]
3561 +
        }
3562 +
      ]
3563 +
    },
3564 +
    "object-member": {
3565 +
      "patterns": [
3566 +
        {
3567 +
          "include": "#comment"
3568 +
        },
3569 +
        {
3570 +
          "include": "#object-literal-method-declaration"
3571 +
        },
3572 +
        {
3573 +
          "begin": "(?=\\[)",
3574 +
          "end": "(?=:)|((?<=])(?=\\s*[(<]))",
3575 +
          "name": "meta.object.member.js meta.object-literal.key.js",
3576 +
          "patterns": [
3577 +
            {
3578 +
              "include": "#comment"
3579 +
            },
3580 +
            {
3581 +
              "include": "#array-literal"
3582 +
            }
3583 +
          ]
3584 +
        },
3585 +
        {
3586 +
          "begin": "(?=[\"'`])",
3587 +
          "end": "(?=:)|((?<=[\"'`])(?=((\\s*[(,<}])|(\\s+(as|satisifies)\\s+))))",
3588 +
          "name": "meta.object.member.js meta.object-literal.key.js",
3589 +
          "patterns": [
3590 +
            {
3591 +
              "include": "#comment"
3592 +
            },
3593 +
            {
3594 +
              "include": "#string"
3595 +
            }
3596 +
          ]
3597 +
        },
3598 +
        {
3599 +
          "begin": "(?=\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$)))",
3600 +
          "end": "(?=:)|(?=\\s*([(,<}])|(\\s+as|satisifies\\s+))",
3601 +
          "name": "meta.object.member.js meta.object-literal.key.js",
3602 +
          "patterns": [
3603 +
            {
3604 +
              "include": "#comment"
3605 +
            },
3606 +
            {
3607 +
              "include": "#numeric-literal"
3608 +
            }
3609 +
          ]
3610 +
        },
3611 +
        {
3612 +
          "begin": "(?<=[]\"'`])(?=\\s*[(<])",
3613 +
          "end": "(?=[,;}])|(?<=})",
3614 +
          "name": "meta.method.declaration.js",
3615 +
          "patterns": [
3616 +
            {
3617 +
              "include": "#function-body"
3618 +
            }
3619 +
          ]
3620 +
        },
3621 +
        {
3622 +
          "captures": {
3623 +
            "0": {
3624 +
              "name": "meta.object-literal.key.js"
3625 +
            },
3626 +
            "1": {
3627 +
              "name": "constant.numeric.decimal.js"
3628 +
            }
3629 +
          },
3630 +
          "match": "(?![$_[:alpha:]])(\\d+)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3631 +
          "name": "meta.object.member.js"
3632 +
        },
3633 +
        {
3634 +
          "captures": {
3635 +
            "0": {
3636 +
              "name": "meta.object-literal.key.js"
3637 +
            },
3638 +
            "1": {
3639 +
              "name": "entity.name.function.js"
3640 +
            }
3641 +
          },
3642 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:(\\s*/\\*([^*]|(\\*[^/]))*\\*/)*\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))",
3643 +
          "name": "meta.object.member.js"
3644 +
        },
3645 +
        {
3646 +
          "captures": {
3647 +
            "0": {
3648 +
              "name": "meta.object-literal.key.js"
3649 +
            }
3650 +
          },
3651 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3652 +
          "name": "meta.object.member.js"
3653 +
        },
3654 +
        {
3655 +
          "begin": "\\.\\.\\.",
3656 +
          "beginCaptures": {
3657 +
            "0": {
3658 +
              "name": "keyword.operator.spread.js"
3659 +
            }
3660 +
          },
3661 +
          "end": "(?=[,}])",
3662 +
          "name": "meta.object.member.js",
3663 +
          "patterns": [
3664 +
            {
3665 +
              "include": "#expression"
3666 +
            }
3667 +
          ]
3668 +
        },
3669 +
        {
3670 +
          "captures": {
3671 +
            "1": {
3672 +
              "name": "variable.other.readwrite.js"
3673 +
            }
3674 +
          },
3675 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=[,}]|$|//|/\\*)",
3676 +
          "name": "meta.object.member.js"
3677 +
        },
3678 +
        {
3679 +
          "captures": {
3680 +
            "1": {
3681 +
              "name": "keyword.control.as.js"
3682 +
            },
3683 +
            "2": {
3684 +
              "name": "storage.modifier.js"
3685 +
            }
3686 +
          },
3687 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
3688 +
          "name": "meta.object.member.js"
3689 +
        },
3690 +
        {
3691 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3692 +
          "beginCaptures": {
3693 +
            "1": {
3694 +
              "name": "keyword.control.as.js"
3695 +
            },
3696 +
            "2": {
3697 +
              "name": "keyword.control.satisfies.js"
3698 +
            }
3699 +
          },
3700 +
          "end": "(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|^|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
3701 +
          "name": "meta.object.member.js",
3702 +
          "patterns": [
3703 +
            {
3704 +
              "include": "#type"
3705 +
            }
3706 +
          ]
3707 +
        },
3708 +
        {
3709 +
          "begin": "(?=[$_[:alpha:]][$_[:alnum:]]*\\s*=)",
3710 +
          "end": "(?=[,}]|$|//|/\\*)",
3711 +
          "name": "meta.object.member.js",
3712 +
          "patterns": [
3713 +
            {
3714 +
              "include": "#expression"
3715 +
            }
3716 +
          ]
3717 +
        },
3718 +
        {
3719 +
          "begin": ":",
3720 +
          "beginCaptures": {
3721 +
            "0": {
3722 +
              "name": "meta.object-literal.key.js punctuation.separator.key-value.js"
3723 +
            }
3724 +
          },
3725 +
          "end": "(?=[,}])",
3726 +
          "name": "meta.object.member.js",
3727 +
          "patterns": [
3728 +
            {
3729 +
              "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3730 +
              "beginCaptures": {
3731 +
                "1": {
3732 +
                  "name": "storage.modifier.async.js"
3733 +
                }
3734 +
              },
3735 +
              "end": "(?<=\\))",
3736 +
              "patterns": [
3737 +
                {
3738 +
                  "include": "#type-parameters"
3739 +
                },
3740 +
                {
3741 +
                  "begin": "\\(",
3742 +
                  "beginCaptures": {
3743 +
                    "0": {
3744 +
                      "name": "meta.brace.round.js"
3745 +
                    }
3746 +
                  },
3747 +
                  "end": "\\)",
3748 +
                  "endCaptures": {
3749 +
                    "0": {
3750 +
                      "name": "meta.brace.round.js"
3751 +
                    }
3752 +
                  },
3753 +
                  "patterns": [
3754 +
                    {
3755 +
                      "include": "#expression-inside-possibly-arrow-parens"
3756 +
                    }
3757 +
                  ]
3758 +
                }
3759 +
              ]
3760 +
            },
3761 +
            {
3762 +
              "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3763 +
              "beginCaptures": {
3764 +
                "1": {
3765 +
                  "name": "storage.modifier.async.js"
3766 +
                },
3767 +
                "2": {
3768 +
                  "name": "meta.brace.round.js"
3769 +
                }
3770 +
              },
3771 +
              "end": "\\)",
3772 +
              "endCaptures": {
3773 +
                "0": {
3774 +
                  "name": "meta.brace.round.js"
3775 +
                }
3776 +
              },
3777 +
              "patterns": [
3778 +
                {
3779 +
                  "include": "#expression-inside-possibly-arrow-parens"
3780 +
                }
3781 +
              ]
3782 +
            },
3783 +
            {
3784 +
              "begin": "(?<=:)\\s*(async)?\\s*(?=<\\s*$)",
3785 +
              "beginCaptures": {
3786 +
                "1": {
3787 +
                  "name": "storage.modifier.async.js"
3788 +
                }
3789 +
              },
3790 +
              "end": "(?<=>)",
3791 +
              "patterns": [
3792 +
                {
3793 +
                  "include": "#type-parameters"
3794 +
                }
3795 +
              ]
3796 +
            },
3797 +
            {
3798 +
              "begin": "(?<=>)\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3799 +
              "beginCaptures": {
3800 +
                "1": {
3801 +
                  "name": "meta.brace.round.js"
3802 +
                }
3803 +
              },
3804 +
              "end": "\\)",
3805 +
              "endCaptures": {
3806 +
                "0": {
3807 +
                  "name": "meta.brace.round.js"
3808 +
                }
3809 +
              },
3810 +
              "patterns": [
3811 +
                {
3812 +
                  "include": "#expression-inside-possibly-arrow-parens"
3813 +
                }
3814 +
              ]
3815 +
            },
3816 +
            {
3817 +
              "include": "#possibly-arrow-return-type"
3818 +
            },
3819 +
            {
3820 +
              "include": "#expression"
3821 +
            }
3822 +
          ]
3823 +
        },
3824 +
        {
3825 +
          "include": "#punctuation-comma"
3826 +
        },
3827 +
        {
3828 +
          "include": "#decl-block"
3829 +
        }
3830 +
      ]
3831 +
    },
3832 +
    "parameter-array-binding-pattern": {
3833 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
3834 +
      "beginCaptures": {
3835 +
        "1": {
3836 +
          "name": "keyword.operator.rest.js"
3837 +
        },
3838 +
        "2": {
3839 +
          "name": "punctuation.definition.binding-pattern.array.js"
3840 +
        }
3841 +
      },
3842 +
      "end": "]",
3843 +
      "endCaptures": {
3844 +
        "0": {
3845 +
          "name": "punctuation.definition.binding-pattern.array.js"
3846 +
        }
3847 +
      },
3848 +
      "patterns": [
3849 +
        {
3850 +
          "include": "#parameter-binding-element"
3851 +
        },
3852 +
        {
3853 +
          "include": "#punctuation-comma"
3854 +
        }
3855 +
      ]
3856 +
    },
3857 +
    "parameter-binding-element": {
3858 +
      "patterns": [
3859 +
        {
3860 +
          "include": "#comment"
3861 +
        },
3862 +
        {
3863 +
          "include": "#string"
3864 +
        },
3865 +
        {
3866 +
          "include": "#numeric-literal"
3867 +
        },
3868 +
        {
3869 +
          "include": "#regex"
3870 +
        },
3871 +
        {
3872 +
          "include": "#parameter-object-binding-pattern"
3873 +
        },
3874 +
        {
3875 +
          "include": "#parameter-array-binding-pattern"
3876 +
        },
3877 +
        {
3878 +
          "include": "#destructuring-parameter-rest"
3879 +
        },
3880 +
        {
3881 +
          "include": "#variable-initializer"
3882 +
        }
3883 +
      ]
3884 +
    },
3885 +
    "parameter-name": {
3886 +
      "patterns": [
3887 +
        {
3888 +
          "captures": {
3889 +
            "1": {
3890 +
              "name": "storage.modifier.js"
3891 +
            }
3892 +
          },
3893 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
3894 +
        },
3895 +
        {
3896 +
          "captures": {
3897 +
            "1": {
3898 +
              "name": "storage.modifier.js"
3899 +
            },
3900 +
            "2": {
3901 +
              "name": "keyword.operator.rest.js"
3902 +
            },
3903 +
            "3": {
3904 +
              "name": "entity.name.function.js variable.language.this.js"
3905 +
            },
3906 +
            "4": {
3907 +
              "name": "entity.name.function.js"
3908 +
            },
3909 +
            "5": {
3910 +
              "name": "keyword.operator.optional.js"
3911 +
            }
3912 +
          },
3913 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
3914 +
        },
3915 +
        {
3916 +
          "captures": {
3917 +
            "1": {
3918 +
              "name": "storage.modifier.js"
3919 +
            },
3920 +
            "2": {
3921 +
              "name": "keyword.operator.rest.js"
3922 +
            },
3923 +
            "3": {
3924 +
              "name": "variable.parameter.js variable.language.this.js"
3925 +
            },
3926 +
            "4": {
3927 +
              "name": "variable.parameter.js"
3928 +
            },
3929 +
            "5": {
3930 +
              "name": "keyword.operator.optional.js"
3931 +
            }
3932 +
          },
3933 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)"
3934 +
        }
3935 +
      ]
3936 +
    },
3937 +
    "parameter-object-binding-element": {
3938 +
      "patterns": [
3939 +
        {
3940 +
          "include": "#comment"
3941 +
        },
3942 +
        {
3943 +
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3944 +
          "end": "(?=[,}])",
3945 +
          "patterns": [
3946 +
            {
3947 +
              "include": "#object-binding-element-propertyName"
3948 +
            },
3949 +
            {
3950 +
              "include": "#parameter-binding-element"
3951 +
            },
3952 +
            {
3953 +
              "include": "#paren-expression"
3954 +
            }
3955 +
          ]
3956 +
        },
3957 +
        {
3958 +
          "include": "#parameter-object-binding-pattern"
3959 +
        },
3960 +
        {
3961 +
          "include": "#destructuring-parameter-rest"
3962 +
        },
3963 +
        {
3964 +
          "include": "#variable-initializer"
3965 +
        },
3966 +
        {
3967 +
          "include": "#punctuation-comma"
3968 +
        }
3969 +
      ]
3970 +
    },
3971 +
    "parameter-object-binding-pattern": {
3972 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3973 +
      "beginCaptures": {
3974 +
        "1": {
3975 +
          "name": "keyword.operator.rest.js"
3976 +
        },
3977 +
        "2": {
3978 +
          "name": "punctuation.definition.binding-pattern.object.js"
3979 +
        }
3980 +
      },
3981 +
      "end": "}",
3982 +
      "endCaptures": {
3983 +
        "0": {
3984 +
          "name": "punctuation.definition.binding-pattern.object.js"
3985 +
        }
3986 +
      },
3987 +
      "patterns": [
3988 +
        {
3989 +
          "include": "#parameter-object-binding-element"
3990 +
        }
3991 +
      ]
3992 +
    },
3993 +
    "parameter-type-annotation": {
3994 +
      "patterns": [
3995 +
        {
3996 +
          "begin": "(:)",
3997 +
          "beginCaptures": {
3998 +
            "1": {
3999 +
              "name": "keyword.operator.type.annotation.js"
4000 +
            }
4001 +
          },
4002 +
          "end": "(?=[),])|(?==[^>])",
4003 +
          "name": "meta.type.annotation.js",
4004 +
          "patterns": [
4005 +
            {
4006 +
              "include": "#type"
4007 +
            }
4008 +
          ]
4009 +
        }
4010 +
      ]
4011 +
    },
4012 +
    "paren-expression": {
4013 +
      "begin": "\\(",
4014 +
      "beginCaptures": {
4015 +
        "0": {
4016 +
          "name": "meta.brace.round.js"
4017 +
        }
4018 +
      },
4019 +
      "end": "\\)",
4020 +
      "endCaptures": {
4021 +
        "0": {
4022 +
          "name": "meta.brace.round.js"
4023 +
        }
4024 +
      },
4025 +
      "patterns": [
4026 +
        {
4027 +
          "include": "#expression"
4028 +
        }
4029 +
      ]
4030 +
    },
4031 +
    "paren-expression-possibly-arrow": {
4032 +
      "patterns": [
4033 +
        {
4034 +
          "begin": "(?<=[(,=])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
4035 +
          "beginCaptures": {
4036 +
            "1": {
4037 +
              "name": "storage.modifier.async.js"
4038 +
            }
4039 +
          },
4040 +
          "end": "(?<=\\))",
4041 +
          "patterns": [
4042 +
            {
4043 +
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
4044 +
            }
4045 +
          ]
4046 +
        },
4047 +
        {
4048 +
          "begin": "(?<=[(,=]|=>|^return|[^$._[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)))\\s*$)",
4049 +
          "beginCaptures": {
4050 +
            "1": {
4051 +
              "name": "storage.modifier.async.js"
4052 +
            }
4053 +
          },
4054 +
          "end": "(?<=\\))",
4055 +
          "patterns": [
4056 +
            {
4057 +
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
4058 +
            }
4059 +
          ]
4060 +
        },
4061 +
        {
4062 +
          "include": "#possibly-arrow-return-type"
4063 +
        }
4064 +
      ]
4065 +
    },
4066 +
    "paren-expression-possibly-arrow-with-typeparameters": {
4067 +
      "patterns": [
4068 +
        {
4069 +
          "include": "#type-parameters"
4070 +
        },
4071 +
        {
4072 +
          "begin": "\\(",
4073 +
          "beginCaptures": {
4074 +
            "0": {
4075 +
              "name": "meta.brace.round.js"
4076 +
            }
4077 +
          },
4078 +
          "end": "\\)",
4079 +
          "endCaptures": {
4080 +
            "0": {
4081 +
              "name": "meta.brace.round.js"
4082 +
            }
4083 +
          },
4084 +
          "patterns": [
4085 +
            {
4086 +
              "include": "#expression-inside-possibly-arrow-parens"
4087 +
            }
4088 +
          ]
4089 +
        }
4090 +
      ]
4091 +
    },
4092 +
    "possibly-arrow-return-type": {
4093 +
      "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*=>)",
4094 +
      "beginCaptures": {
4095 +
        "1": {
4096 +
          "name": "meta.arrow.js meta.return.type.arrow.js keyword.operator.type.annotation.js"
4097 +
        }
4098 +
      },
4099 +
      "contentName": "meta.arrow.js meta.return.type.arrow.js",
4100 +
      "end": "(?==>|\\{|^(\\s*(export|function|class|interface|let|var|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
4101 +
      "patterns": [
4102 +
        {
4103 +
          "include": "#arrow-return-type-body"
4104 +
        }
4105 +
      ]
4106 +
    },
4107 +
    "property-accessor": {
4108 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4109 +
      "name": "storage.type.property.js"
4110 +
    },
4111 +
    "punctuation-accessor": {
4112 +
      "captures": {
4113 +
        "1": {
4114 +
          "name": "punctuation.accessor.js"
4115 +
        },
4116 +
        "2": {
4117 +
          "name": "punctuation.accessor.optional.js"
4118 +
        }
4119 +
      },
4120 +
      "match": "(\\.)|(\\?\\.(?!\\s*\\d))"
4121 +
    },
4122 +
    "punctuation-comma": {
4123 +
      "match": ",",
4124 +
      "name": "punctuation.separator.comma.js"
4125 +
    },
4126 +
    "punctuation-semicolon": {
4127 +
      "match": ";",
4128 +
      "name": "punctuation.terminator.statement.js"
4129 +
    },
4130 +
    "qstring-double": {
4131 +
      "begin": "\"",
4132 +
      "beginCaptures": {
4133 +
        "0": {
4134 +
          "name": "punctuation.definition.string.begin.js"
4135 +
        }
4136 +
      },
4137 +
      "end": "(\")|([^\\n\\\\])$",
4138 +
      "endCaptures": {
4139 +
        "1": {
4140 +
          "name": "punctuation.definition.string.end.js"
4141 +
        },
4142 +
        "2": {
4143 +
          "name": "invalid.illegal.newline.js"
4144 +
        }
4145 +
      },
4146 +
      "name": "string.quoted.double.js",
4147 +
      "patterns": [
4148 +
        {
4149 +
          "include": "#string-character-escape"
4150 +
        }
4151 +
      ]
4152 +
    },
4153 +
    "qstring-single": {
4154 +
      "begin": "'",
4155 +
      "beginCaptures": {
4156 +
        "0": {
4157 +
          "name": "punctuation.definition.string.begin.js"
4158 +
        }
4159 +
      },
4160 +
      "end": "(')|([^\\n\\\\])$",
4161 +
      "endCaptures": {
4162 +
        "1": {
4163 +
          "name": "punctuation.definition.string.end.js"
4164 +
        },
4165 +
        "2": {
4166 +
          "name": "invalid.illegal.newline.js"
4167 +
        }
4168 +
      },
4169 +
      "name": "string.quoted.single.js",
4170 +
      "patterns": [
4171 +
        {
4172 +
          "include": "#string-character-escape"
4173 +
        }
4174 +
      ]
4175 +
    },
4176 +
    "regex": {
4177 +
      "patterns": [
4178 +
        {
4179 +
          "begin": "(?<!\\+\\+|--|})(?<=[!(+,:=?\\[]|^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case|=>|&&|\\|\\||\\*/)\\s*(/)(?![*/])(?=(?:[^()/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)+]|\\(([^)\\\\]|\\\\.)+\\))+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
4180 +
          "beginCaptures": {
4181 +
            "1": {
4182 +
              "name": "punctuation.definition.string.begin.js"
4183 +
            }
4184 +
          },
4185 +
          "end": "(/)([dgimsuvy]*)",
4186 +
          "endCaptures": {
4187 +
            "1": {
4188 +
              "name": "punctuation.definition.string.end.js"
4189 +
            },
4190 +
            "2": {
4191 +
              "name": "keyword.other.js"
4192 +
            }
4193 +
          },
4194 +
          "name": "string.regexp.js",
4195 +
          "patterns": [
4196 +
            {
4197 +
              "include": "#regexp"
4198 +
            }
4199 +
          ]
4200 +
        },
4201 +
        {
4202 +
          "begin": "((?<![]$)_[:alnum:]]|\\+\\+|--|}|\\*/)|((?<=^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case))\\s*)/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
4203 +
          "beginCaptures": {
4204 +
            "0": {
4205 +
              "name": "punctuation.definition.string.begin.js"
4206 +
            }
4207 +
          },
4208 +
          "end": "(/)([dgimsuvy]*)",
4209 +
          "endCaptures": {
4210 +
            "1": {
4211 +
              "name": "punctuation.definition.string.end.js"
4212 +
            },
4213 +
            "2": {
4214 +
              "name": "keyword.other.js"
4215 +
            }
4216 +
          },
4217 +
          "name": "string.regexp.js",
4218 +
          "patterns": [
4219 +
            {
4220 +
              "include": "#regexp"
4221 +
            }
4222 +
          ]
4223 +
        }
4224 +
      ]
4225 +
    },
4226 +
    "regex-character-class": {
4227 +
      "patterns": [
4228 +
        {
4229 +
          "match": "\\\\[DSWdfnrstvw]|\\.",
4230 +
          "name": "constant.other.character-class.regexp"
4231 +
        },
4232 +
        {
4233 +
          "match": "\\\\([0-7]{3}|x\\h{2}|u\\h{4})",
4234 +
          "name": "constant.character.numeric.regexp"
4235 +
        },
4236 +
        {
4237 +
          "match": "\\\\c[A-Z]",
4238 +
          "name": "constant.character.control.regexp"
4239 +
        },
4240 +
        {
4241 +
          "match": "\\\\.",
4242 +
          "name": "constant.character.escape.backslash.regexp"
4243 +
        }
4244 +
      ]
4245 +
    },
4246 +
    "regexp": {
4247 +
      "patterns": [
4248 +
        {
4249 +
          "match": "\\\\[Bb]|[$^]",
4250 +
          "name": "keyword.control.anchor.regexp"
4251 +
        },
4252 +
        {
4253 +
          "captures": {
4254 +
            "0": {
4255 +
              "name": "keyword.other.back-reference.regexp"
4256 +
            },
4257 +
            "1": {
4258 +
              "name": "variable.other.regexp"
4259 +
            }
4260 +
          },
4261 +
          "match": "\\\\(?:[1-9]\\d*|k<([$A-Z_a-z][$\\w]*)>)"
4262 +
        },
4263 +
        {
4264 +
          "match": "[*+?]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)}\\??",
4265 +
          "name": "keyword.operator.quantifier.regexp"
4266 +
        },
4267 +
        {
4268 +
          "match": "\\|",
4269 +
          "name": "keyword.operator.or.regexp"
4270 +
        },
4271 +
        {
4272 +
          "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4273 +
          "beginCaptures": {
4274 +
            "1": {
4275 +
              "name": "punctuation.definition.group.regexp"
4276 +
            },
4277 +
            "2": {
4278 +
              "name": "punctuation.definition.group.assertion.regexp"
4279 +
            },
4280 +
            "3": {
4281 +
              "name": "meta.assertion.look-ahead.regexp"
4282 +
            },
4283 +
            "4": {
4284 +
              "name": "meta.assertion.negative-look-ahead.regexp"
4285 +
            },
4286 +
            "5": {
4287 +
              "name": "meta.assertion.look-behind.regexp"
4288 +
            },
4289 +
            "6": {
4290 +
              "name": "meta.assertion.negative-look-behind.regexp"
4291 +
            }
4292 +
          },
4293 +
          "end": "(\\))",
4294 +
          "endCaptures": {
4295 +
            "1": {
4296 +
              "name": "punctuation.definition.group.regexp"
4297 +
            }
4298 +
          },
4299 +
          "name": "meta.group.assertion.regexp",
4300 +
          "patterns": [
4301 +
            {
4302 +
              "include": "#regexp"
4303 +
            }
4304 +
          ]
4305 +
        },
4306 +
        {
4307 +
          "begin": "\\((?:(\\?:)|\\?<([$A-Z_a-z][$\\w]*)>)?",
4308 +
          "beginCaptures": {
4309 +
            "0": {
4310 +
              "name": "punctuation.definition.group.regexp"
4311 +
            },
4312 +
            "1": {
4313 +
              "name": "punctuation.definition.group.no-capture.regexp"
4314 +
            },
4315 +
            "2": {
4316 +
              "name": "variable.other.regexp"
4317 +
            }
4318 +
          },
4319 +
          "end": "\\)",
4320 +
          "endCaptures": {
4321 +
            "0": {
4322 +
              "name": "punctuation.definition.group.regexp"
4323 +
            }
4324 +
          },
4325 +
          "name": "meta.group.regexp",
4326 +
          "patterns": [
4327 +
            {
4328 +
              "include": "#regexp"
4329 +
            }
4330 +
          ]
4331 +
        },
4332 +
        {
4333 +
          "begin": "(\\[)(\\^)?",
4334 +
          "beginCaptures": {
4335 +
            "1": {
4336 +
              "name": "punctuation.definition.character-class.regexp"
4337 +
            },
4338 +
            "2": {
4339 +
              "name": "keyword.operator.negation.regexp"
4340 +
            }
4341 +
          },
4342 +
          "end": "(])",
4343 +
          "endCaptures": {
4344 +
            "1": {
4345 +
              "name": "punctuation.definition.character-class.regexp"
4346 +
            }
4347 +
          },
4348 +
          "name": "constant.other.character-class.set.regexp",
4349 +
          "patterns": [
4350 +
            {
4351 +
              "captures": {
4352 +
                "1": {
4353 +
                  "name": "constant.character.numeric.regexp"
4354 +
                },
4355 +
                "2": {
4356 +
                  "name": "constant.character.control.regexp"
4357 +
                },
4358 +
                "3": {
4359 +
                  "name": "constant.character.escape.backslash.regexp"
4360 +
                },
4361 +
                "4": {
4362 +
                  "name": "constant.character.numeric.regexp"
4363 +
                },
4364 +
                "5": {
4365 +
                  "name": "constant.character.control.regexp"
4366 +
                },
4367 +
                "6": {
4368 +
                  "name": "constant.character.escape.backslash.regexp"
4369 +
                }
4370 +
              },
4371 +
              "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h{2}|u\\h{4}))|(\\\\c[A-Z])|(\\\\.))-(?:[^]\\\\]|(\\\\(?:[0-7]{3}|x\\h{2}|u\\h{4}))|(\\\\c[A-Z])|(\\\\.))",
4372 +
              "name": "constant.other.character-class.range.regexp"
4373 +
            },
4374 +
            {
4375 +
              "include": "#regex-character-class"
4376 +
            }
4377 +
          ]
4378 +
        },
4379 +
        {
4380 +
          "include": "#regex-character-class"
4381 +
        }
4382 +
      ]
4383 +
    },
4384 +
    "return-type": {
4385 +
      "patterns": [
4386 +
        {
4387 +
          "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
4388 +
          "beginCaptures": {
4389 +
            "1": {
4390 +
              "name": "keyword.operator.type.annotation.js"
4391 +
            }
4392 +
          },
4393 +
          "end": "(?<![\\&:|])(?=$|^|[,;{}]|//)",
4394 +
          "name": "meta.return.type.js",
4395 +
          "patterns": [
4396 +
            {
4397 +
              "include": "#return-type-core"
4398 +
            }
4399 +
          ]
4400 +
        },
4401 +
        {
4402 +
          "begin": "(?<=\\))\\s*(:)",
4403 +
          "beginCaptures": {
4404 +
            "1": {
4405 +
              "name": "keyword.operator.type.annotation.js"
4406 +
            }
4407 +
          },
4408 +
          "end": "(?<![\\&:|])((?=[,;{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4409 +
          "name": "meta.return.type.js",
4410 +
          "patterns": [
4411 +
            {
4412 +
              "include": "#return-type-core"
4413 +
            }
4414 +
          ]
4415 +
        }
4416 +
      ]
4417 +
    },
4418 +
    "return-type-core": {
4419 +
      "patterns": [
4420 +
        {
4421 +
          "include": "#comment"
4422 +
        },
4423 +
        {
4424 +
          "begin": "(?<=[\\&:|])(?=\\s*\\{)",
4425 +
          "end": "(?<=})",
4426 +
          "patterns": [
4427 +
            {
4428 +
              "include": "#type-object"
4429 +
            }
4430 +
          ]
4431 +
        },
4432 +
        {
4433 +
          "include": "#type-predicate-operator"
4434 +
        },
4435 +
        {
4436 +
          "include": "#type"
4437 +
        }
4438 +
      ]
4439 +
    },
4440 +
    "shebang": {
4441 +
      "captures": {
4442 +
        "1": {
4443 +
          "name": "punctuation.definition.comment.js"
4444 +
        }
4445 +
      },
4446 +
      "match": "\\A(#!).*(?=$)",
4447 +
      "name": "comment.line.shebang.js"
4448 +
    },
4449 +
    "single-line-comment-consuming-line-ending": {
4450 +
      "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
4451 +
      "beginCaptures": {
4452 +
        "1": {
4453 +
          "name": "punctuation.whitespace.comment.leading.js"
4454 +
        },
4455 +
        "2": {
4456 +
          "name": "comment.line.double-slash.js"
4457 +
        },
4458 +
        "3": {
4459 +
          "name": "punctuation.definition.comment.js"
4460 +
        },
4461 +
        "4": {
4462 +
          "name": "storage.type.internaldeclaration.js"
4463 +
        },
4464 +
        "5": {
4465 +
          "name": "punctuation.decorator.internaldeclaration.js"
4466 +
        }
4467 +
      },
4468 +
      "contentName": "comment.line.double-slash.js",
4469 +
      "end": "(?=^)"
4470 +
    },
4471 +
    "statements": {
4472 +
      "patterns": [
4473 +
        {
4474 +
          "include": "#declaration"
4475 +
        },
4476 +
        {
4477 +
          "include": "#control-statement"
4478 +
        },
4479 +
        {
4480 +
          "include": "#after-operator-block-as-object-literal"
4481 +
        },
4482 +
        {
4483 +
          "include": "#decl-block"
4484 +
        },
4485 +
        {
4486 +
          "include": "#label"
4487 +
        },
4488 +
        {
4489 +
          "include": "#expression"
4490 +
        },
4491 +
        {
4492 +
          "include": "#punctuation-semicolon"
4493 +
        },
4494 +
        {
4495 +
          "include": "#string"
4496 +
        },
4497 +
        {
4498 +
          "include": "#comment"
4499 +
        }
4500 +
      ]
4501 +
    },
4502 +
    "string": {
4503 +
      "patterns": [
4504 +
        {
4505 +
          "include": "#qstring-single"
4506 +
        },
4507 +
        {
4508 +
          "include": "#qstring-double"
4509 +
        },
4510 +
        {
4511 +
          "include": "#template"
4512 +
        }
4513 +
      ]
4514 +
    },
4515 +
    "string-character-escape": {
4516 +
      "match": "\\\\(x\\h{2}|u\\h{4}|u\\{\\h+}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
4517 +
      "name": "constant.character.escape.js"
4518 +
    },
4519 +
    "super-literal": {
4520 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)",
4521 +
      "name": "variable.language.super.js"
4522 +
    },
4523 +
    "support-function-call-identifiers": {
4524 +
      "patterns": [
4525 +
        {
4526 +
          "include": "#literal"
4527 +
        },
4528 +
        {
4529 +
          "include": "#support-objects"
4530 +
        },
4531 +
        {
4532 +
          "include": "#object-identifiers"
4533 +
        },
4534 +
        {
4535 +
          "include": "#punctuation-accessor"
4536 +
        },
4537 +
        {
4538 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\(\\s*[\"'`])",
4539 +
          "name": "keyword.operator.expression.import.js"
4540 +
        }
4541 +
      ]
4542 +
    },
4543 +
    "support-objects": {
4544 +
      "patterns": [
4545 +
        {
4546 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)",
4547 +
          "name": "variable.language.arguments.js"
4548 +
        },
4549 +
        {
4550 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)",
4551 +
          "name": "support.class.promise.js"
4552 +
        },
4553 +
        {
4554 +
          "captures": {
4555 +
            "1": {
4556 +
              "name": "keyword.control.import.js"
4557 +
            },
4558 +
            "2": {
4559 +
              "name": "punctuation.accessor.js"
4560 +
            },
4561 +
            "3": {
4562 +
              "name": "punctuation.accessor.optional.js"
4563 +
            },
4564 +
            "4": {
4565 +
              "name": "support.variable.property.importmeta.js"
4566 +
            }
4567 +
          },
4568 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(meta)\\b(?!\\$)"
4569 +
        },
4570 +
        {
4571 +
          "captures": {
4572 +
            "1": {
4573 +
              "name": "keyword.operator.new.js"
4574 +
            },
4575 +
            "2": {
4576 +
              "name": "punctuation.accessor.js"
4577 +
            },
4578 +
            "3": {
4579 +
              "name": "punctuation.accessor.optional.js"
4580 +
            },
4581 +
            "4": {
4582 +
              "name": "support.variable.property.target.js"
4583 +
            }
4584 +
          },
4585 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(target)\\b(?!\\$)"
4586 +
        },
4587 +
        {
4588 +
          "captures": {
4589 +
            "1": {
4590 +
              "name": "punctuation.accessor.js"
4591 +
            },
4592 +
            "2": {
4593 +
              "name": "punctuation.accessor.optional.js"
4594 +
            },
4595 +
            "3": {
4596 +
              "name": "support.variable.property.js"
4597 +
            },
4598 +
            "4": {
4599 +
              "name": "support.constant.js"
4600 +
            }
4601 +
          },
4602 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\()|(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$))"
4603 +
        },
4604 +
        {
4605 +
          "captures": {
4606 +
            "1": {
4607 +
              "name": "support.type.object.module.js"
4608 +
            },
4609 +
            "2": {
4610 +
              "name": "support.type.object.module.js"
4611 +
            },
4612 +
            "3": {
4613 +
              "name": "punctuation.accessor.js"
4614 +
            },
4615 +
            "4": {
4616 +
              "name": "punctuation.accessor.optional.js"
4617 +
            },
4618 +
            "5": {
4619 +
              "name": "support.type.object.module.js"
4620 +
            }
4621 +
          },
4622 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)"
4623 +
        }
4624 +
      ]
4625 +
    },
4626 +
    "switch-statement": {
4627 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
4628 +
      "end": "}",
4629 +
      "endCaptures": {
4630 +
        "0": {
4631 +
          "name": "punctuation.definition.block.js"
4632 +
        }
4633 +
      },
4634 +
      "name": "switch-statement.expr.js",
4635 +
      "patterns": [
4636 +
        {
4637 +
          "include": "#comment"
4638 +
        },
4639 +
        {
4640 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
4641 +
          "beginCaptures": {
4642 +
            "1": {
4643 +
              "name": "keyword.control.switch.js"
4644 +
            },
4645 +
            "2": {
4646 +
              "name": "meta.brace.round.js"
4647 +
            }
4648 +
          },
4649 +
          "end": "\\)",
4650 +
          "endCaptures": {
4651 +
            "0": {
4652 +
              "name": "meta.brace.round.js"
4653 +
            }
4654 +
          },
4655 +
          "name": "switch-expression.expr.js",
4656 +
          "patterns": [
4657 +
            {
4658 +
              "include": "#expression"
4659 +
            }
4660 +
          ]
4661 +
        },
4662 +
        {
4663 +
          "begin": "\\{",
4664 +
          "beginCaptures": {
4665 +
            "0": {
4666 +
              "name": "punctuation.definition.block.js"
4667 +
            }
4668 +
          },
4669 +
          "end": "(?=})",
4670 +
          "name": "switch-block.expr.js",
4671 +
          "patterns": [
4672 +
            {
4673 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4674 +
              "beginCaptures": {
4675 +
                "1": {
4676 +
                  "name": "keyword.control.switch.js"
4677 +
                }
4678 +
              },
4679 +
              "end": "(?=:)",
4680 +
              "name": "case-clause.expr.js",
4681 +
              "patterns": [
4682 +
                {
4683 +
                  "include": "#expression"
4684 +
                }
4685 +
              ]
4686 +
            },
4687 +
            {
4688 +
              "begin": "(:)\\s*(\\{)",
4689 +
              "beginCaptures": {
4690 +
                "1": {
4691 +
                  "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
4692 +
                },
4693 +
                "2": {
4694 +
                  "name": "meta.block.js punctuation.definition.block.js"
4695 +
                }
4696 +
              },
4697 +
              "contentName": "meta.block.js",
4698 +
              "end": "}",
4699 +
              "endCaptures": {
4700 +
                "0": {
4701 +
                  "name": "meta.block.js punctuation.definition.block.js"
4702 +
                }
4703 +
              },
4704 +
              "patterns": [
4705 +
                {
4706 +
                  "include": "#statements"
4707 +
                }
4708 +
              ]
4709 +
            },
4710 +
            {
4711 +
              "captures": {
4712 +
                "0": {
4713 +
                  "name": "case-clause.expr.js punctuation.definition.section.case-statement.js"
4714 +
                }
4715 +
              },
4716 +
              "match": "(:)"
4717 +
            },
4718 +
            {
4719 +
              "include": "#statements"
4720 +
            }
4721 +
          ]
4722 +
        }
4723 +
      ]
4724 +
    },
4725 +
    "template": {
4726 +
      "patterns": [
4727 +
        {
4728 +
          "include": "#template-call"
4729 +
        },
4730 +
        {
4731 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4732 +
          "beginCaptures": {
4733 +
            "1": {
4734 +
              "name": "entity.name.function.tagged-template.js"
4735 +
            },
4736 +
            "2": {
4737 +
              "name": "string.template.js punctuation.definition.string.template.begin.js"
4738 +
            }
4739 +
          },
4740 +
          "contentName": "string.template.js",
4741 +
          "end": "`",
4742 +
          "endCaptures": {
4743 +
            "0": {
4744 +
              "name": "string.template.js punctuation.definition.string.template.end.js"
4745 +
            }
4746 +
          },
4747 +
          "patterns": [
4748 +
            {
4749 +
              "include": "#template-substitution-element"
4750 +
            },
4751 +
            {
4752 +
              "include": "#string-character-escape"
4753 +
            }
4754 +
          ]
4755 +
        }
4756 +
      ]
4757 +
    },
4758 +
    "template-call": {
4759 +
      "patterns": [
4760 +
        {
4761 +
          "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)?`)",
4762 +
          "end": "(?=`)",
4763 +
          "patterns": [
4764 +
            {
4765 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))",
4766 +
              "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)?`)",
4767 +
              "patterns": [
4768 +
                {
4769 +
                  "include": "#support-function-call-identifiers"
4770 +
                },
4771 +
                {
4772 +
                  "match": "([$_[:alpha:]][$_[:alnum:]]*)",
4773 +
                  "name": "entity.name.function.tagged-template.js"
4774 +
                }
4775 +
              ]
4776 +
            },
4777 +
            {
4778 +
              "include": "#type-arguments"
4779 +
            }
4780 +
          ]
4781 +
        },
4782 +
        {
4783 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>|<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))(?=\\s*([,.<>\\[]|=>|&(?!&)|\\|(?!\\|)))))([^(<>]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\s*)`)",
4784 +
          "beginCaptures": {
4785 +
            "1": {
4786 +
              "name": "entity.name.function.tagged-template.js"
4787 +
            }
4788 +
          },
4789 +
          "end": "(?=`)",
4790 +
          "patterns": [
4791 +
            {
4792 +
              "include": "#type-arguments"
4793 +
            }
4794 +
          ]
4795 +
        }
4796 +
      ]
4797 +
    },
4798 +
    "template-substitution-element": {
4799 +
      "begin": "\\$\\{",
4800 +
      "beginCaptures": {
4801 +
        "0": {
4802 +
          "name": "punctuation.definition.template-expression.begin.js"
4803 +
        }
4804 +
      },
4805 +
      "contentName": "meta.embedded.line.js",
4806 +
      "end": "}",
4807 +
      "endCaptures": {
4808 +
        "0": {
4809 +
          "name": "punctuation.definition.template-expression.end.js"
4810 +
        }
4811 +
      },
4812 +
      "name": "meta.template.expression.js",
4813 +
      "patterns": [
4814 +
        {
4815 +
          "include": "#expression"
4816 +
        }
4817 +
      ]
4818 +
    },
4819 +
    "template-type": {
4820 +
      "patterns": [
4821 +
        {
4822 +
          "include": "#template-call"
4823 +
        },
4824 +
        {
4825 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4826 +
          "beginCaptures": {
4827 +
            "1": {
4828 +
              "name": "entity.name.function.tagged-template.js"
4829 +
            },
4830 +
            "2": {
4831 +
              "name": "string.template.js punctuation.definition.string.template.begin.js"
4832 +
            }
4833 +
          },
4834 +
          "contentName": "string.template.js",
4835 +
          "end": "`",
4836 +
          "endCaptures": {
4837 +
            "0": {
4838 +
              "name": "string.template.js punctuation.definition.string.template.end.js"
4839 +
            }
4840 +
          },
4841 +
          "patterns": [
4842 +
            {
4843 +
              "include": "#template-type-substitution-element"
4844 +
            },
4845 +
            {
4846 +
              "include": "#string-character-escape"
4847 +
            }
4848 +
          ]
4849 +
        }
4850 +
      ]
4851 +
    },
4852 +
    "template-type-substitution-element": {
4853 +
      "begin": "\\$\\{",
4854 +
      "beginCaptures": {
4855 +
        "0": {
4856 +
          "name": "punctuation.definition.template-expression.begin.js"
4857 +
        }
4858 +
      },
4859 +
      "contentName": "meta.embedded.line.js",
4860 +
      "end": "}",
4861 +
      "endCaptures": {
4862 +
        "0": {
4863 +
          "name": "punctuation.definition.template-expression.end.js"
4864 +
        }
4865 +
      },
4866 +
      "name": "meta.template.expression.js",
4867 +
      "patterns": [
4868 +
        {
4869 +
          "include": "#type"
4870 +
        }
4871 +
      ]
4872 +
    },
4873 +
    "ternary-expression": {
4874 +
      "begin": "(?!\\?\\.\\s*\\D)(\\?)(?!\\?)",
4875 +
      "beginCaptures": {
4876 +
        "1": {
4877 +
          "name": "keyword.operator.ternary.js"
4878 +
        }
4879 +
      },
4880 +
      "end": "\\s*(:)",
4881 +
      "endCaptures": {
4882 +
        "1": {
4883 +
          "name": "keyword.operator.ternary.js"
4884 +
        }
4885 +
      },
4886 +
      "patterns": [
4887 +
        {
4888 +
          "include": "#expression"
4889 +
        }
4890 +
      ]
4891 +
    },
4892 +
    "this-literal": {
4893 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)",
4894 +
      "name": "variable.language.this.js"
4895 +
    },
4896 +
    "type": {
4897 +
      "patterns": [
4898 +
        {
4899 +
          "include": "#comment"
4900 +
        },
4901 +
        {
4902 +
          "include": "#type-string"
4903 +
        },
4904 +
        {
4905 +
          "include": "#numeric-literal"
4906 +
        },
4907 +
        {
4908 +
          "include": "#type-primitive"
4909 +
        },
4910 +
        {
4911 +
          "include": "#type-builtin-literals"
4912 +
        },
4913 +
        {
4914 +
          "include": "#type-parameters"
4915 +
        },
4916 +
        {
4917 +
          "include": "#type-tuple"
4918 +
        },
4919 +
        {
4920 +
          "include": "#type-object"
4921 +
        },
4922 +
        {
4923 +
          "include": "#type-operators"
4924 +
        },
4925 +
        {
4926 +
          "include": "#type-conditional"
4927 +
        },
4928 +
        {
4929 +
          "include": "#type-fn-type-parameters"
4930 +
        },
4931 +
        {
4932 +
          "include": "#type-paren-or-function-parameters"
4933 +
        },
4934 +
        {
4935 +
          "include": "#type-function-return-type"
4936 +
        },
4937 +
        {
4938 +
          "captures": {
4939 +
            "1": {
4940 +
              "name": "storage.modifier.js"
4941 +
            }
4942 +
          },
4943 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*"
4944 +
        },
4945 +
        {
4946 +
          "include": "#type-name"
4947 +
        }
4948 +
      ]
4949 +
    },
4950 +
    "type-alias-declaration": {
4951 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(type)\\b\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*",
4952 +
      "beginCaptures": {
4953 +
        "1": {
4954 +
          "name": "keyword.control.export.js"
4955 +
        },
4956 +
        "2": {
4957 +
          "name": "storage.modifier.js"
4958 +
        },
4959 +
        "3": {
4960 +
          "name": "storage.type.type.js"
4961 +
        },
4962 +
        "4": {
4963 +
          "name": "entity.name.type.alias.js"
4964 +
        }
4965 +
      },
4966 +
      "end": "(?=[;}]|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
4967 +
      "name": "meta.type.declaration.js",
4968 +
      "patterns": [
4969 +
        {
4970 +
          "include": "#comment"
4971 +
        },
4972 +
        {
4973 +
          "include": "#type-parameters"
4974 +
        },
4975 +
        {
4976 +
          "begin": "(=)\\s*(intrinsic)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4977 +
          "beginCaptures": {
4978 +
            "1": {
4979 +
              "name": "keyword.operator.assignment.js"
4980 +
            },
4981 +
            "2": {
4982 +
              "name": "keyword.control.intrinsic.js"
4983 +
            }
4984 +
          },
4985 +
          "end": "(?=[;}]|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
4986 +
          "patterns": [
4987 +
            {
4988 +
              "include": "#type"
4989 +
            }
4990 +
          ]
4991 +
        },
4992 +
        {
4993 +
          "begin": "(=)\\s*",
4994 +
          "beginCaptures": {
4995 +
            "1": {
4996 +
              "name": "keyword.operator.assignment.js"
4997 +
            }
4998 +
          },
4999 +
          "end": "(?=[;}]|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
5000 +
          "patterns": [
5001 +
            {
5002 +
              "include": "#type"
5003 +
            }
5004 +
          ]
5005 +
        }
5006 +
      ]
5007 +
    },
5008 +
    "type-annotation": {
5009 +
      "patterns": [
5010 +
        {
5011 +
          "begin": "(:)(?=\\s*\\S)",
5012 +
          "beginCaptures": {
5013 +
            "1": {
5014 +
              "name": "keyword.operator.type.annotation.js"
5015 +
            }
5016 +
          },
5017 +
          "end": "(?<![\\&:|])(?!\\s*[\\&|]\\s+)((?=^|[]),;}]|//)|(?==[^>])|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
5018 +
          "name": "meta.type.annotation.js",
5019 +
          "patterns": [
5020 +
            {
5021 +
              "include": "#type"
5022 +
            }
5023 +
          ]
5024 +
        },
5025 +
        {
5026 +
          "begin": "(:)",
5027 +
          "beginCaptures": {
5028 +
            "1": {
5029 +
              "name": "keyword.operator.type.annotation.js"
5030 +
            }
5031 +
          },
5032 +
          "end": "(?<![\\&:|])((?=[]),;}]|//)|(?==[^>])|(?=^\\s*$)|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
5033 +
          "name": "meta.type.annotation.js",
5034 +
          "patterns": [
5035 +
            {
5036 +
              "include": "#type"
5037 +
            }
5038 +
          ]
5039 +
        }
5040 +
      ]
5041 +
    },
5042 +
    "type-arguments": {
5043 +
      "begin": "<",
5044 +
      "beginCaptures": {
5045 +
        "0": {
5046 +
          "name": "punctuation.definition.typeparameters.begin.js"
5047 +
        }
5048 +
      },
5049 +
      "end": ">",
5050 +
      "endCaptures": {
5051 +
        "0": {
5052 +
          "name": "punctuation.definition.typeparameters.end.js"
5053 +
        }
5054 +
      },
5055 +
      "name": "meta.type.parameters.js",
5056 +
      "patterns": [
5057 +
        {
5058 +
          "include": "#type-arguments-body"
5059 +
        }
5060 +
      ]
5061 +
    },
5062 +
    "type-arguments-body": {
5063 +
      "patterns": [
5064 +
        {
5065 +
          "captures": {
5066 +
            "0": {
5067 +
              "name": "keyword.operator.type.js"
5068 +
            }
5069 +
          },
5070 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5071 +
        },
5072 +
        {
5073 +
          "include": "#type"
5074 +
        },
5075 +
        {
5076 +
          "include": "#punctuation-comma"
5077 +
        }
5078 +
      ]
5079 +
    },
5080 +
    "type-builtin-literals": {
5081 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5082 +
      "name": "support.type.builtin.js"
5083 +
    },
5084 +
    "type-conditional": {
5085 +
      "patterns": [
5086 +
        {
5087 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
5088 +
          "beginCaptures": {
5089 +
            "1": {
5090 +
              "name": "storage.modifier.js"
5091 +
            }
5092 +
          },
5093 +
          "end": "(?<=:)",
5094 +
          "patterns": [
5095 +
            {
5096 +
              "begin": "\\?",
5097 +
              "beginCaptures": {
5098 +
                "0": {
5099 +
                  "name": "keyword.operator.ternary.js"
5100 +
                }
5101 +
              },
5102 +
              "end": ":",
5103 +
              "endCaptures": {
5104 +
                "0": {
5105 +
                  "name": "keyword.operator.ternary.js"
5106 +
                }
5107 +
              },
5108 +
              "patterns": [
5109 +
                {
5110 +
                  "include": "#type"
5111 +
                }
5112 +
              ]
5113 +
            },
5114 +
            {
5115 +
              "include": "#type"
5116 +
            }
5117 +
          ]
5118 +
        }
5119 +
      ]
5120 +
    },
5121 +
    "type-fn-type-parameters": {
5122 +
      "patterns": [
5123 +
        {
5124 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*<)",
5125 +
          "beginCaptures": {
5126 +
            "1": {
5127 +
              "name": "meta.type.constructor.js storage.modifier.js"
5128 +
            },
5129 +
            "2": {
5130 +
              "name": "meta.type.constructor.js keyword.control.new.js"
5131 +
            }
5132 +
          },
5133 +
          "end": "(?<=>)",
5134 +
          "patterns": [
5135 +
            {
5136 +
              "include": "#comment"
5137 +
            },
5138 +
            {
5139 +
              "include": "#type-parameters"
5140 +
            }
5141 +
          ]
5142 +
        },
5143 +
        {
5144 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
5145 +
          "beginCaptures": {
5146 +
            "1": {
5147 +
              "name": "storage.modifier.js"
5148 +
            },
5149 +
            "2": {
5150 +
              "name": "keyword.control.new.js"
5151 +
            }
5152 +
          },
5153 +
          "end": "(?<=\\))",
5154 +
          "name": "meta.type.constructor.js",
5155 +
          "patterns": [
5156 +
            {
5157 +
              "include": "#function-parameters"
5158 +
            }
5159 +
          ]
5160 +
        },
5161 +
        {
5162 +
          "begin": "((?=\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>))))))",
5163 +
          "end": "(?<=\\))",
5164 +
          "name": "meta.type.function.js",
5165 +
          "patterns": [
5166 +
            {
5167 +
              "include": "#function-parameters"
5168 +
            }
5169 +
          ]
5170 +
        }
5171 +
      ]
5172 +
    },
5173 +
    "type-function-return-type": {
5174 +
      "patterns": [
5175 +
        {
5176 +
          "begin": "(=>)(?=\\s*\\S)",
5177 +
          "beginCaptures": {
5178 +
            "1": {
5179 +
              "name": "storage.type.function.arrow.js"
5180 +
            }
5181 +
          },
5182 +
          "end": "(?<!=>)(?<![\\&|])(?=[]),:;=>?{}]|//|$)",
5183 +
          "name": "meta.type.function.return.js",
5184 +
          "patterns": [
5185 +
            {
5186 +
              "include": "#type-function-return-type-core"
5187 +
            }
5188 +
          ]
5189 +
        },
5190 +
        {
5191 +
          "begin": "=>",
5192 +
          "beginCaptures": {
5193 +
            "0": {
5194 +
              "name": "storage.type.function.arrow.js"
5195 +
            }
5196 +
          },
5197 +
          "end": "(?<!=>)(?<![\\&|])((?=[]),:;=>?{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
5198 +
          "name": "meta.type.function.return.js",
5199 +
          "patterns": [
5200 +
            {
5201 +
              "include": "#type-function-return-type-core"
5202 +
            }
5203 +
          ]
5204 +
        }
5205 +
      ]
5206 +
    },
5207 +
    "type-function-return-type-core": {
5208 +
      "patterns": [
5209 +
        {
5210 +
          "include": "#comment"
5211 +
        },
5212 +
        {
5213 +
          "begin": "(?<==>)(?=\\s*\\{)",
5214 +
          "end": "(?<=})",
5215 +
          "patterns": [
5216 +
            {
5217 +
              "include": "#type-object"
5218 +
            }
5219 +
          ]
5220 +
        },
5221 +
        {
5222 +
          "include": "#type-predicate-operator"
5223 +
        },
5224 +
        {
5225 +
          "include": "#type"
5226 +
        }
5227 +
      ]
5228 +
    },
5229 +
    "type-infer": {
5230 +
      "patterns": [
5231 +
        {
5232 +
          "captures": {
5233 +
            "1": {
5234 +
              "name": "keyword.operator.expression.infer.js"
5235 +
            },
5236 +
            "2": {
5237 +
              "name": "entity.name.type.js"
5238 +
            },
5239 +
            "3": {
5240 +
              "name": "keyword.operator.expression.extends.js"
5241 +
            }
5242 +
          },
5243 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
5244 +
          "name": "meta.type.infer.js"
5245 +
        }
5246 +
      ]
5247 +
    },
5248 +
    "type-name": {
5249 +
      "patterns": [
5250 +
        {
5251 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(<)",
5252 +
          "captures": {
5253 +
            "1": {
5254 +
              "name": "entity.name.type.module.js"
5255 +
            },
5256 +
            "2": {
5257 +
              "name": "punctuation.accessor.js"
5258 +
            },
5259 +
            "3": {
5260 +
              "name": "punctuation.accessor.optional.js"
5261 +
            },
5262 +
            "4": {
5263 +
              "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
5264 +
            }
5265 +
          },
5266 +
          "contentName": "meta.type.parameters.js",
5267 +
          "end": "(>)",
5268 +
          "endCaptures": {
5269 +
            "1": {
5270 +
              "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
5271 +
            }
5272 +
          },
5273 +
          "patterns": [
5274 +
            {
5275 +
              "include": "#type-arguments-body"
5276 +
            }
5277 +
          ]
5278 +
        },
5279 +
        {
5280 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(<)",
5281 +
          "beginCaptures": {
5282 +
            "1": {
5283 +
              "name": "entity.name.type.js"
5284 +
            },
5285 +
            "2": {
5286 +
              "name": "meta.type.parameters.js punctuation.definition.typeparameters.begin.js"
5287 +
            }
5288 +
          },
5289 +
          "contentName": "meta.type.parameters.js",
5290 +
          "end": "(>)",
5291 +
          "endCaptures": {
5292 +
            "1": {
5293 +
              "name": "meta.type.parameters.js punctuation.definition.typeparameters.end.js"
5294 +
            }
5295 +
          },
5296 +
          "patterns": [
5297 +
            {
5298 +
              "include": "#type-arguments-body"
5299 +
            }
5300 +
          ]
5301 +
        },
5302 +
        {
5303 +
          "captures": {
5304 +
            "1": {
5305 +
              "name": "entity.name.type.module.js"
5306 +
            },
5307 +
            "2": {
5308 +
              "name": "punctuation.accessor.js"
5309 +
            },
5310 +
            "3": {
5311 +
              "name": "punctuation.accessor.optional.js"
5312 +
            }
5313 +
          },
5314 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
5315 +
        },
5316 +
        {
5317 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
5318 +
          "name": "entity.name.type.js"
5319 +
        }
5320 +
      ]
5321 +
    },
5322 +
    "type-object": {
5323 +
      "begin": "\\{",
5324 +
      "beginCaptures": {
5325 +
        "0": {
5326 +
          "name": "punctuation.definition.block.js"
5327 +
        }
5328 +
      },
5329 +
      "end": "}",
5330 +
      "endCaptures": {
5331 +
        "0": {
5332 +
          "name": "punctuation.definition.block.js"
5333 +
        }
5334 +
      },
5335 +
      "name": "meta.object.type.js",
5336 +
      "patterns": [
5337 +
        {
5338 +
          "include": "#comment"
5339 +
        },
5340 +
        {
5341 +
          "include": "#method-declaration"
5342 +
        },
5343 +
        {
5344 +
          "include": "#indexer-declaration"
5345 +
        },
5346 +
        {
5347 +
          "include": "#indexer-mapped-type-declaration"
5348 +
        },
5349 +
        {
5350 +
          "include": "#field-declaration"
5351 +
        },
5352 +
        {
5353 +
          "include": "#type-annotation"
5354 +
        },
5355 +
        {
5356 +
          "begin": "\\.\\.\\.",
5357 +
          "beginCaptures": {
5358 +
            "0": {
5359 +
              "name": "keyword.operator.spread.js"
5360 +
            }
5361 +
          },
5362 +
          "end": "(?=[,;}]|$)|(?<=})",
5363 +
          "patterns": [
5364 +
            {
5365 +
              "include": "#type"
5366 +
            }
5367 +
          ]
5368 +
        },
5369 +
        {
5370 +
          "include": "#punctuation-comma"
5371 +
        },
5372 +
        {
5373 +
          "include": "#punctuation-semicolon"
5374 +
        },
5375 +
        {
5376 +
          "include": "#type"
5377 +
        }
5378 +
      ]
5379 +
    },
5380 +
    "type-operators": {
5381 +
      "patterns": [
5382 +
        {
5383 +
          "include": "#typeof-operator"
5384 +
        },
5385 +
        {
5386 +
          "include": "#type-infer"
5387 +
        },
5388 +
        {
5389 +
          "begin": "([\\&|])(?=\\s*\\{)",
5390 +
          "beginCaptures": {
5391 +
            "0": {
5392 +
              "name": "keyword.operator.type.js"
5393 +
            }
5394 +
          },
5395 +
          "end": "(?<=})",
5396 +
          "patterns": [
5397 +
            {
5398 +
              "include": "#type-object"
5399 +
            }
5400 +
          ]
5401 +
        },
5402 +
        {
5403 +
          "begin": "[\\&|]",
5404 +
          "beginCaptures": {
5405 +
            "0": {
5406 +
              "name": "keyword.operator.type.js"
5407 +
            }
5408 +
          },
5409 +
          "end": "(?=\\S)"
5410 +
        },
5411 +
        {
5412 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5413 +
          "name": "keyword.operator.expression.keyof.js"
5414 +
        },
5415 +
        {
5416 +
          "match": "([:?])",
5417 +
          "name": "keyword.operator.ternary.js"
5418 +
        },
5419 +
        {
5420 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()",
5421 +
          "name": "keyword.operator.expression.import.js"
5422 +
        }
5423 +
      ]
5424 +
    },
5425 +
    "type-parameters": {
5426 +
      "begin": "(<)",
5427 +
      "beginCaptures": {
5428 +
        "1": {
5429 +
          "name": "punctuation.definition.typeparameters.begin.js"
5430 +
        }
5431 +
      },
5432 +
      "end": "(>)",
5433 +
      "endCaptures": {
5434 +
        "1": {
5435 +
          "name": "punctuation.definition.typeparameters.end.js"
5436 +
        }
5437 +
      },
5438 +
      "name": "meta.type.parameters.js",
5439 +
      "patterns": [
5440 +
        {
5441 +
          "include": "#comment"
5442 +
        },
5443 +
        {
5444 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5445 +
          "name": "storage.modifier.js"
5446 +
        },
5447 +
        {
5448 +
          "include": "#type"
5449 +
        },
5450 +
        {
5451 +
          "include": "#punctuation-comma"
5452 +
        },
5453 +
        {
5454 +
          "match": "(=)(?!>)",
5455 +
          "name": "keyword.operator.assignment.js"
5456 +
        }
5457 +
      ]
5458 +
    },
5459 +
    "type-paren-or-function-parameters": {
5460 +
      "begin": "\\(",
5461 +
      "beginCaptures": {
5462 +
        "0": {
5463 +
          "name": "meta.brace.round.js"
5464 +
        }
5465 +
      },
5466 +
      "end": "\\)",
5467 +
      "endCaptures": {
5468 +
        "0": {
5469 +
          "name": "meta.brace.round.js"
5470 +
        }
5471 +
      },
5472 +
      "name": "meta.type.paren.cover.js",
5473 +
      "patterns": [
5474 +
        {
5475 +
          "captures": {
5476 +
            "1": {
5477 +
              "name": "storage.modifier.js"
5478 +
            },
5479 +
            "2": {
5480 +
              "name": "keyword.operator.rest.js"
5481 +
            },
5482 +
            "3": {
5483 +
              "name": "entity.name.function.js variable.language.this.js"
5484 +
            },
5485 +
            "4": {
5486 +
              "name": "entity.name.function.js"
5487 +
            },
5488 +
            "5": {
5489 +
              "name": "keyword.operator.optional.js"
5490 +
            }
5491 +
          },
5492 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))))"
5493 +
        },
5494 +
        {
5495 +
          "captures": {
5496 +
            "1": {
5497 +
              "name": "storage.modifier.js"
5498 +
            },
5499 +
            "2": {
5500 +
              "name": "keyword.operator.rest.js"
5501 +
            },
5502 +
            "3": {
5503 +
              "name": "variable.parameter.js variable.language.this.js"
5504 +
            },
5505 +
            "4": {
5506 +
              "name": "variable.parameter.js"
5507 +
            },
5508 +
            "5": {
5509 +
              "name": "keyword.operator.optional.js"
5510 +
            }
5511 +
          },
5512 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s*(\\??)(?=:)"
5513 +
        },
5514 +
        {
5515 +
          "include": "#type-annotation"
5516 +
        },
5517 +
        {
5518 +
          "match": ",",
5519 +
          "name": "punctuation.separator.parameter.js"
5520 +
        },
5521 +
        {
5522 +
          "include": "#type"
5523 +
        }
5524 +
      ]
5525 +
    },
5526 +
    "type-predicate-operator": {
5527 +
      "patterns": [
5528 +
        {
5529 +
          "captures": {
5530 +
            "1": {
5531 +
              "name": "keyword.operator.type.asserts.js"
5532 +
            },
5533 +
            "2": {
5534 +
              "name": "variable.parameter.js variable.language.this.js"
5535 +
            },
5536 +
            "3": {
5537 +
              "name": "variable.parameter.js"
5538 +
            },
5539 +
            "4": {
5540 +
              "name": "keyword.operator.expression.is.js"
5541 +
            }
5542 +
          },
5543 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s(is)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5544 +
        },
5545 +
        {
5546 +
          "captures": {
5547 +
            "1": {
5548 +
              "name": "keyword.operator.type.asserts.js"
5549 +
            },
5550 +
            "2": {
5551 +
              "name": "variable.parameter.js variable.language.this.js"
5552 +
            },
5553 +
            "3": {
5554 +
              "name": "variable.parameter.js"
5555 +
            }
5556 +
          },
5557 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5558 +
        },
5559 +
        {
5560 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5561 +
          "name": "keyword.operator.type.asserts.js"
5562 +
        },
5563 +
        {
5564 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5565 +
          "name": "keyword.operator.expression.is.js"
5566 +
        }
5567 +
      ]
5568 +
    },
5569 +
    "type-primitive": {
5570 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5571 +
      "name": "support.type.primitive.js"
5572 +
    },
5573 +
    "type-string": {
5574 +
      "patterns": [
5575 +
        {
5576 +
          "include": "#qstring-single"
5577 +
        },
5578 +
        {
5579 +
          "include": "#qstring-double"
5580 +
        },
5581 +
        {
5582 +
          "include": "#template-type"
5583 +
        }
5584 +
      ]
5585 +
    },
5586 +
    "type-tuple": {
5587 +
      "begin": "\\[",
5588 +
      "beginCaptures": {
5589 +
        "0": {
5590 +
          "name": "meta.brace.square.js"
5591 +
        }
5592 +
      },
5593 +
      "end": "]",
5594 +
      "endCaptures": {
5595 +
        "0": {
5596 +
          "name": "meta.brace.square.js"
5597 +
        }
5598 +
      },
5599 +
      "name": "meta.type.tuple.js",
5600 +
      "patterns": [
5601 +
        {
5602 +
          "match": "\\.\\.\\.",
5603 +
          "name": "keyword.operator.rest.js"
5604 +
        },
5605 +
        {
5606 +
          "captures": {
5607 +
            "1": {
5608 +
              "name": "entity.name.label.js"
5609 +
            },
5610 +
            "2": {
5611 +
              "name": "keyword.operator.optional.js"
5612 +
            },
5613 +
            "3": {
5614 +
              "name": "punctuation.separator.label.js"
5615 +
            }
5616 +
          },
5617 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([$_[:alpha:]][$_[:alnum:]]*)\\s*(\\?)?\\s*(:)"
5618 +
        },
5619 +
        {
5620 +
          "include": "#type"
5621 +
        },
5622 +
        {
5623 +
          "include": "#punctuation-comma"
5624 +
        }
5625 +
      ]
5626 +
    },
5627 +
    "typeof-operator": {
5628 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5629 +
      "beginCaptures": {
5630 +
        "0": {
5631 +
          "name": "keyword.operator.expression.typeof.js"
5632 +
        }
5633 +
      },
5634 +
      "end": "(?=[]\\&),:;=>?{|}]|(extends\\s+)|$|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)",
5635 +
      "patterns": [
5636 +
        {
5637 +
          "include": "#type-arguments"
5638 +
        },
5639 +
        {
5640 +
          "include": "#expression"
5641 +
        }
5642 +
      ]
5643 +
    },
5644 +
    "undefined-literal": {
5645 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5646 +
      "name": "constant.language.undefined.js"
5647 +
    },
5648 +
    "var-expr": {
5649 +
      "patterns": [
5650 +
        {
5651 +
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5652 +
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|[;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)|((?<!^let|[^$._[:alnum:]]let|^var|[^$._[:alnum:]]var)(?=\\s*$)))",
5653 +
          "name": "meta.var.expr.js",
5654 +
          "patterns": [
5655 +
            {
5656 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5657 +
              "beginCaptures": {
5658 +
                "1": {
5659 +
                  "name": "keyword.control.export.js"
5660 +
                },
5661 +
                "2": {
5662 +
                  "name": "storage.modifier.js"
5663 +
                },
5664 +
                "3": {
5665 +
                  "name": "storage.type.js"
5666 +
                }
5667 +
              },
5668 +
              "end": "(?=\\S)"
5669 +
            },
5670 +
            {
5671 +
              "include": "#destructuring-variable"
5672 +
            },
5673 +
            {
5674 +
              "include": "#var-single-variable"
5675 +
            },
5676 +
            {
5677 +
              "include": "#variable-initializer"
5678 +
            },
5679 +
            {
5680 +
              "include": "#comment"
5681 +
            },
5682 +
            {
5683 +
              "begin": "(,)\\s*(?=$|//)",
5684 +
              "beginCaptures": {
5685 +
                "1": {
5686 +
                  "name": "punctuation.separator.comma.js"
5687 +
                }
5688 +
              },
5689 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5690 +
              "patterns": [
5691 +
                {
5692 +
                  "include": "#single-line-comment-consuming-line-ending"
5693 +
                },
5694 +
                {
5695 +
                  "include": "#comment"
5696 +
                },
5697 +
                {
5698 +
                  "include": "#destructuring-variable"
5699 +
                },
5700 +
                {
5701 +
                  "include": "#var-single-variable"
5702 +
                },
5703 +
                {
5704 +
                  "include": "#punctuation-comma"
5705 +
                }
5706 +
              ]
5707 +
            },
5708 +
            {
5709 +
              "include": "#punctuation-comma"
5710 +
            }
5711 +
          ]
5712 +
        },
5713 +
        {
5714 +
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5715 +
          "beginCaptures": {
5716 +
            "1": {
5717 +
              "name": "keyword.control.export.js"
5718 +
            },
5719 +
            "2": {
5720 +
              "name": "storage.modifier.js"
5721 +
            },
5722 +
            "3": {
5723 +
              "name": "storage.type.js"
5724 +
            }
5725 +
          },
5726 +
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|[;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)|((?<!(?:^|[^$._[:alnum:]])const)(?=\\s*$)))",
5727 +
          "name": "meta.var.expr.js",
5728 +
          "patterns": [
5729 +
            {
5730 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5731 +
              "beginCaptures": {
5732 +
                "1": {
5733 +
                  "name": "keyword.control.export.js"
5734 +
                },
5735 +
                "2": {
5736 +
                  "name": "storage.modifier.js"
5737 +
                },
5738 +
                "3": {
5739 +
                  "name": "storage.type.js"
5740 +
                }
5741 +
              },
5742 +
              "end": "(?=\\S)"
5743 +
            },
5744 +
            {
5745 +
              "include": "#destructuring-const"
5746 +
            },
5747 +
            {
5748 +
              "include": "#var-single-const"
5749 +
            },
5750 +
            {
5751 +
              "include": "#variable-initializer"
5752 +
            },
5753 +
            {
5754 +
              "include": "#comment"
5755 +
            },
5756 +
            {
5757 +
              "begin": "(,)\\s*(?=$|//)",
5758 +
              "beginCaptures": {
5759 +
                "1": {
5760 +
                  "name": "punctuation.separator.comma.js"
5761 +
                }
5762 +
              },
5763 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5764 +
              "patterns": [
5765 +
                {
5766 +
                  "include": "#single-line-comment-consuming-line-ending"
5767 +
                },
5768 +
                {
5769 +
                  "include": "#comment"
5770 +
                },
5771 +
                {
5772 +
                  "include": "#destructuring-const"
5773 +
                },
5774 +
                {
5775 +
                  "include": "#var-single-const"
5776 +
                },
5777 +
                {
5778 +
                  "include": "#punctuation-comma"
5779 +
                }
5780 +
              ]
5781 +
            },
5782 +
            {
5783 +
              "include": "#punctuation-comma"
5784 +
            }
5785 +
          ]
5786 +
        },
5787 +
        {
5788 +
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5789 +
          "beginCaptures": {
5790 +
            "1": {
5791 +
              "name": "keyword.control.export.js"
5792 +
            },
5793 +
            "2": {
5794 +
              "name": "storage.modifier.js"
5795 +
            },
5796 +
            "3": {
5797 +
              "name": "storage.type.js"
5798 +
            }
5799 +
          },
5800 +
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=[;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b)|((?<!(?:^|[^$._[:alnum:]]|^await\\s+|[^$._[:alnum:]]await\\s+)using)(?=\\s*$)))",
5801 +
          "name": "meta.var.expr.js",
5802 +
          "patterns": [
5803 +
            {
5804 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5805 +
              "beginCaptures": {
5806 +
                "1": {
5807 +
                  "name": "keyword.control.export.js"
5808 +
                },
5809 +
                "2": {
5810 +
                  "name": "storage.modifier.js"
5811 +
                },
5812 +
                "3": {
5813 +
                  "name": "storage.type.js"
5814 +
                }
5815 +
              },
5816 +
              "end": "(?=\\S)"
5817 +
            },
5818 +
            {
5819 +
              "include": "#var-single-const"
5820 +
            },
5821 +
            {
5822 +
              "include": "#variable-initializer"
5823 +
            },
5824 +
            {
5825 +
              "include": "#comment"
5826 +
            },
5827 +
            {
5828 +
              "begin": "(,)\\s*((?!\\S)|(?=//))",
5829 +
              "beginCaptures": {
5830 +
                "1": {
5831 +
                  "name": "punctuation.separator.comma.js"
5832 +
                }
5833 +
              },
5834 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5835 +
              "patterns": [
5836 +
                {
5837 +
                  "include": "#single-line-comment-consuming-line-ending"
5838 +
                },
5839 +
                {
5840 +
                  "include": "#comment"
5841 +
                },
5842 +
                {
5843 +
                  "include": "#var-single-const"
5844 +
                },
5845 +
                {
5846 +
                  "include": "#punctuation-comma"
5847 +
                }
5848 +
              ]
5849 +
            },
5850 +
            {
5851 +
              "include": "#punctuation-comma"
5852 +
            }
5853 +
          ]
5854 +
        }
5855 +
      ]
5856 +
    },
5857 +
    "var-single-const": {
5858 +
      "patterns": [
5859 +
        {
5860 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5861 +
          "beginCaptures": {
5862 +
            "1": {
5863 +
              "name": "meta.definition.variable.js variable.other.constant.js entity.name.function.js"
5864 +
            }
5865 +
          },
5866 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b))",
5867 +
          "name": "meta.var-single-variable.expr.js",
5868 +
          "patterns": [
5869 +
            {
5870 +
              "include": "#var-single-variable-type-annotation"
5871 +
            }
5872 +
          ]
5873 +
        },
5874 +
        {
5875 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
5876 +
          "beginCaptures": {
5877 +
            "1": {
5878 +
              "name": "meta.definition.variable.js variable.other.constant.js"
5879 +
            }
5880 +
          },
5881 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b))",
5882 +
          "name": "meta.var-single-variable.expr.js",
5883 +
          "patterns": [
5884 +
            {
5885 +
              "include": "#var-single-variable-type-annotation"
5886 +
            }
5887 +
          ]
5888 +
        }
5889 +
      ]
5890 +
    },
5891 +
    "var-single-variable": {
5892 +
      "patterns": [
5893 +
        {
5894 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\s*((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\s*)$|(\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|(<\\s*[$_[:alpha:]][$_[:alnum:]]*\\s+extends\\s*[^=>])|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5895 +
          "beginCaptures": {
5896 +
            "1": {
5897 +
              "name": "meta.definition.variable.js entity.name.function.js"
5898 +
            },
5899 +
            "2": {
5900 +
              "name": "keyword.operator.definiteassignment.js"
5901 +
            }
5902 +
          },
5903 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b))",
5904 +
          "name": "meta.var-single-variable.expr.js",
5905 +
          "patterns": [
5906 +
            {
5907 +
              "include": "#var-single-variable-type-annotation"
5908 +
            }
5909 +
          ]
5910 +
        },
5911 +
        {
5912 +
          "begin": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])(!)?",
5913 +
          "beginCaptures": {
5914 +
            "1": {
5915 +
              "name": "meta.definition.variable.js variable.other.constant.js"
5916 +
            },
5917 +
            "2": {
5918 +
              "name": "keyword.operator.definiteassignment.js"
5919 +
            }
5920 +
          },
5921 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b))",
5922 +
          "name": "meta.var-single-variable.expr.js",
5923 +
          "patterns": [
5924 +
            {
5925 +
              "include": "#var-single-variable-type-annotation"
5926 +
            }
5927 +
          ]
5928 +
        },
5929 +
        {
5930 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?",
5931 +
          "beginCaptures": {
5932 +
            "1": {
5933 +
              "name": "meta.definition.variable.js variable.other.readwrite.js"
5934 +
            },
5935 +
            "2": {
5936 +
              "name": "keyword.operator.definiteassignment.js"
5937 +
            }
5938 +
          },
5939 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|^\\s*(?:abstract|async|\\bawait\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b\\b|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b|var|while)\\b))",
5940 +
          "name": "meta.var-single-variable.expr.js",
5941 +
          "patterns": [
5942 +
            {
5943 +
              "include": "#var-single-variable-type-annotation"
5944 +
            }
5945 +
          ]
5946 +
        }
5947 +
      ]
5948 +
    },
5949 +
    "var-single-variable-type-annotation": {
5950 +
      "patterns": [
5951 +
        {
5952 +
          "include": "#type-annotation"
5953 +
        },
5954 +
        {
5955 +
          "include": "#string"
5956 +
        },
5957 +
        {
5958 +
          "include": "#comment"
5959 +
        }
5960 +
      ]
5961 +
    },
5962 +
    "variable-initializer": {
5963 +
      "patterns": [
5964 +
        {
5965 +
          "begin": "(?<![!=])(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
5966 +
          "beginCaptures": {
5967 +
            "1": {
5968 +
              "name": "keyword.operator.assignment.js"
5969 +
            }
5970 +
          },
5971 +
          "end": "(?=$|^|[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
5972 +
          "patterns": [
5973 +
            {
5974 +
              "include": "#expression"
5975 +
            }
5976 +
          ]
5977 +
        },
5978 +
        {
5979 +
          "begin": "(?<![!=])(=)(?!=)",
5980 +
          "beginCaptures": {
5981 +
            "1": {
5982 +
              "name": "keyword.operator.assignment.js"
5983 +
            }
5984 +
          },
5985 +
          "end": "(?=[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![-\\&*+/|])(?<=\\S)(?<!=)(?=\\s*$)",
5986 +
          "patterns": [
5987 +
            {
5988 +
              "include": "#expression"
5989 +
            }
5990 +
          ]
5991 +
        }
5992 +
      ]
5993 +
    }
5994 +
  },
5995 +
  "scopeName": "source.js"
5996 +
}
crates/highlight/syntaxes/make.json added +629 -0
1 +
{
2 +
  "displayName": "Makefile",
3 +
  "name": "make",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#comment"
7 +
    },
8 +
    {
9 +
      "include": "#variables"
10 +
    },
11 +
    {
12 +
      "include": "#variable-assignment"
13 +
    },
14 +
    {
15 +
      "include": "#directives"
16 +
    },
17 +
    {
18 +
      "include": "#recipe"
19 +
    },
20 +
    {
21 +
      "include": "#target"
22 +
    }
23 +
  ],
24 +
  "repository": {
25 +
    "another-variable-braces": {
26 +
      "patterns": [
27 +
        {
28 +
          "begin": "(?<=\\{)(?!})",
29 +
          "end": "(?=}|((?<!\\\\)\\n))",
30 +
          "name": "variable.other.makefile",
31 +
          "patterns": [
32 +
            {
33 +
              "include": "#variables"
34 +
            },
35 +
            {
36 +
              "match": "\\\\\\n",
37 +
              "name": "constant.character.escape.continuation.makefile"
38 +
            }
39 +
          ]
40 +
        }
41 +
      ]
42 +
    },
43 +
    "another-variable-parentheses": {
44 +
      "patterns": [
45 +
        {
46 +
          "begin": "(?<=\\()(?!\\))",
47 +
          "end": "(?=\\)|((?<!\\\\)\\n))",
48 +
          "name": "variable.other.makefile",
49 +
          "patterns": [
50 +
            {
51 +
              "include": "#variables"
52 +
            },
53 +
            {
54 +
              "match": "\\\\\\n",
55 +
              "name": "constant.character.escape.continuation.makefile"
56 +
            }
57 +
          ]
58 +
        }
59 +
      ]
60 +
    },
61 +
    "braces-interpolation": {
62 +
      "begin": "\\{",
63 +
      "end": "}",
64 +
      "patterns": [
65 +
        {
66 +
          "include": "#variables"
67 +
        },
68 +
        {
69 +
          "include": "#interpolation"
70 +
        }
71 +
      ]
72 +
    },
73 +
    "builtin-variable-braces": {
74 +
      "patterns": [
75 +
        {
76 +
          "match": "(?<=\\{)(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*})",
77 +
          "name": "variable.language.makefile"
78 +
        }
79 +
      ]
80 +
    },
81 +
    "builtin-variable-parentheses": {
82 +
      "patterns": [
83 +
        {
84 +
          "match": "(?<=\\()(MAKEFILES|VPATH|SHELL|MAKESHELL|MAKE|MAKELEVEL|MAKEFLAGS|MAKECMDGOALS|CURDIR|SUFFIXES|\\.LIBPATTERNS)(?=\\s*\\))",
85 +
          "name": "variable.language.makefile"
86 +
        }
87 +
      ]
88 +
    },
89 +
    "comma": {
90 +
      "match": ",",
91 +
      "name": "punctuation.separator.delimeter.comma.makefile"
92 +
    },
93 +
    "comment": {
94 +
      "begin": "(^ +)?((?<!\\\\)(\\\\\\\\)*)(?=#)",
95 +
      "beginCaptures": {
96 +
        "1": {
97 +
          "name": "punctuation.whitespace.comment.leading.makefile"
98 +
        }
99 +
      },
100 +
      "end": "(?!\\G)",
101 +
      "patterns": [
102 +
        {
103 +
          "begin": "#",
104 +
          "beginCaptures": {
105 +
            "0": {
106 +
              "name": "punctuation.definition.comment.makefile"
107 +
            }
108 +
          },
109 +
          "end": "(?=[^\\\\])$",
110 +
          "name": "comment.line.number-sign.makefile",
111 +
          "patterns": [
112 +
            {
113 +
              "match": "\\\\\\n",
114 +
              "name": "constant.character.escape.continuation.makefile"
115 +
            }
116 +
          ]
117 +
        }
118 +
      ]
119 +
    },
120 +
    "directives": {
121 +
      "patterns": [
122 +
        {
123 +
          "begin": "^ *([-s]?include)\\b",
124 +
          "beginCaptures": {
125 +
            "1": {
126 +
              "name": "keyword.control.include.makefile"
127 +
            }
128 +
          },
129 +
          "end": "^",
130 +
          "patterns": [
131 +
            {
132 +
              "include": "#comment"
133 +
            },
134 +
            {
135 +
              "include": "#variables"
136 +
            },
137 +
            {
138 +
              "match": "%",
139 +
              "name": "constant.other.placeholder.makefile"
140 +
            }
141 +
          ]
142 +
        },
143 +
        {
144 +
          "begin": "^ *(vpath)\\b",
145 +
          "beginCaptures": {
146 +
            "1": {
147 +
              "name": "keyword.control.vpath.makefile"
148 +
            }
149 +
          },
150 +
          "end": "^",
151 +
          "patterns": [
152 +
            {
153 +
              "include": "#comment"
154 +
            },
155 +
            {
156 +
              "include": "#variables"
157 +
            },
158 +
            {
159 +
              "match": "%",
160 +
              "name": "constant.other.placeholder.makefile"
161 +
            }
162 +
          ]
163 +
        },
164 +
        {
165 +
          "begin": "^\\s*(?:(override)\\s*)?(define)\\s*(\\S+)\\s*([+:?]??=)?(?=\\s)",
166 +
          "captures": {
167 +
            "1": {
168 +
              "name": "keyword.control.override.makefile"
169 +
            },
170 +
            "2": {
171 +
              "name": "keyword.control.define.makefile"
172 +
            },
173 +
            "3": {
174 +
              "name": "variable.other.makefile"
175 +
            },
176 +
            "4": {
177 +
              "name": "punctuation.separator.key-value.makefile"
178 +
            }
179 +
          },
180 +
          "end": "^\\s*(endef)\\b",
181 +
          "name": "meta.scope.conditional.makefile",
182 +
          "patterns": [
183 +
            {
184 +
              "begin": "\\G(?!\\n)",
185 +
              "end": "^",
186 +
              "patterns": [
187 +
                {
188 +
                  "include": "#comment"
189 +
                }
190 +
              ]
191 +
            },
192 +
            {
193 +
              "include": "#variables"
194 +
            },
195 +
            {
196 +
              "include": "#directives"
197 +
            }
198 +
          ]
199 +
        },
200 +
        {
201 +
          "begin": "^ *(export)\\b",
202 +
          "beginCaptures": {
203 +
            "1": {
204 +
              "name": "keyword.control.$1.makefile"
205 +
            }
206 +
          },
207 +
          "end": "^",
208 +
          "patterns": [
209 +
            {
210 +
              "include": "#comment"
211 +
            },
212 +
            {
213 +
              "include": "#variable-assignment"
214 +
            },
215 +
            {
216 +
              "match": "\\S+",
217 +
              "name": "variable.other.makefile"
218 +
            }
219 +
          ]
220 +
        },
221 +
        {
222 +
          "begin": "^ *(override|private)\\b",
223 +
          "beginCaptures": {
224 +
            "1": {
225 +
              "name": "keyword.control.$1.makefile"
226 +
            }
227 +
          },
228 +
          "end": "^",
229 +
          "patterns": [
230 +
            {
231 +
              "include": "#comment"
232 +
            },
233 +
            {
234 +
              "include": "#variable-assignment"
235 +
            }
236 +
          ]
237 +
        },
238 +
        {
239 +
          "begin": "^ *(un(?:export|define))\\b",
240 +
          "beginCaptures": {
241 +
            "1": {
242 +
              "name": "keyword.control.$1.makefile"
243 +
            }
244 +
          },
245 +
          "end": "^",
246 +
          "patterns": [
247 +
            {
248 +
              "include": "#comment"
249 +
            },
250 +
            {
251 +
              "match": "\\S+",
252 +
              "name": "variable.other.makefile"
253 +
            }
254 +
          ]
255 +
        },
256 +
        {
257 +
          "begin": "^\\s*(ifn??(?:eq|def))(?=\\s)",
258 +
          "captures": {
259 +
            "1": {
260 +
              "name": "keyword.control.$1.makefile"
261 +
            }
262 +
          },
263 +
          "end": "^\\s*(endif)\\b",
264 +
          "name": "meta.scope.conditional.makefile",
265 +
          "patterns": [
266 +
            {
267 +
              "begin": "\\G",
268 +
              "end": "^",
269 +
              "name": "meta.scope.condition.makefile",
270 +
              "patterns": [
271 +
                {
272 +
                  "include": "#comma"
273 +
                },
274 +
                {
275 +
                  "include": "#variables"
276 +
                },
277 +
                {
278 +
                  "include": "#comment"
279 +
                }
280 +
              ]
281 +
            },
282 +
            {
283 +
              "begin": "^\\s*else(?=\\s)\\s*(ifn??(?:eq|def))*(?=\\s)",
284 +
              "beginCaptures": {
285 +
                "0": {
286 +
                  "name": "keyword.control.else.makefile"
287 +
                }
288 +
              },
289 +
              "end": "^",
290 +
              "patterns": [
291 +
                {
292 +
                  "include": "#comma"
293 +
                },
294 +
                {
295 +
                  "include": "#variables"
296 +
                },
297 +
                {
298 +
                  "include": "#comment"
299 +
                }
300 +
              ]
301 +
            },
302 +
            {
303 +
              "include": "$self"
304 +
            }
305 +
          ]
306 +
        }
307 +
      ]
308 +
    },
309 +
    "flavor-variable-braces": {
310 +
      "patterns": [
311 +
        {
312 +
          "begin": "(?<=\\{)(origin|flavor)\\s(?=[^}\\s]+\\s*})",
313 +
          "beginCaptures": {
314 +
            "1": {
315 +
              "name": "support.function.$1.makefile"
316 +
            }
317 +
          },
318 +
          "contentName": "variable.other.makefile",
319 +
          "end": "(?=})",
320 +
          "name": "meta.scope.function-call.makefile",
321 +
          "patterns": [
322 +
            {
323 +
              "include": "#variables"
324 +
            }
325 +
          ]
326 +
        }
327 +
      ]
328 +
    },
329 +
    "flavor-variable-parentheses": {
330 +
      "patterns": [
331 +
        {
332 +
          "begin": "(?<=\\()(origin|flavor)\\s(?=[^)\\s]+\\s*\\))",
333 +
          "beginCaptures": {
334 +
            "1": {
335 +
              "name": "support.function.$1.makefile"
336 +
            }
337 +
          },
338 +
          "contentName": "variable.other.makefile",
339 +
          "end": "(?=\\))",
340 +
          "name": "meta.scope.function-call.makefile",
341 +
          "patterns": [
342 +
            {
343 +
              "include": "#variables"
344 +
            }
345 +
          ]
346 +
        }
347 +
      ]
348 +
    },
349 +
    "function-variable-braces": {
350 +
      "patterns": [
351 +
        {
352 +
          "begin": "(?<=\\{)(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
353 +
          "beginCaptures": {
354 +
            "1": {
355 +
              "name": "support.function.$1.makefile"
356 +
            }
357 +
          },
358 +
          "end": "(?=}|((?<!\\\\)\\n))",
359 +
          "name": "meta.scope.function-call.makefile",
360 +
          "patterns": [
361 +
            {
362 +
              "include": "#comma"
363 +
            },
364 +
            {
365 +
              "include": "#variables"
366 +
            },
367 +
            {
368 +
              "include": "#interpolation"
369 +
            },
370 +
            {
371 +
              "match": "[%*]",
372 +
              "name": "constant.other.placeholder.makefile"
373 +
            },
374 +
            {
375 +
              "match": "\\\\\\n",
376 +
              "name": "constant.character.escape.continuation.makefile"
377 +
            }
378 +
          ]
379 +
        }
380 +
      ]
381 +
    },
382 +
    "function-variable-parentheses": {
383 +
      "patterns": [
384 +
        {
385 +
          "begin": "(?<=\\()(subst|patsubst|strip|findstring|filter(-out)?|sort|word(list)?|firstword|lastword|dir|notdir|suffix|basename|addsuffix|addprefix|join|wildcard|realpath|abspath|info|error|warning|shell|foreach|if|or|and|call|eval|value|file|guile)\\s",
386 +
          "beginCaptures": {
387 +
            "1": {
388 +
              "name": "support.function.$1.makefile"
389 +
            }
390 +
          },
391 +
          "end": "(?=\\)|((?<!\\\\)\\n))",
392 +
          "name": "meta.scope.function-call.makefile",
393 +
          "patterns": [
394 +
            {
395 +
              "include": "#comma"
396 +
            },
397 +
            {
398 +
              "include": "#variables"
399 +
            },
400 +
            {
401 +
              "include": "#interpolation"
402 +
            },
403 +
            {
404 +
              "match": "[%*]",
405 +
              "name": "constant.other.placeholder.makefile"
406 +
            },
407 +
            {
408 +
              "match": "\\\\\\n",
409 +
              "name": "constant.character.escape.continuation.makefile"
410 +
            }
411 +
          ]
412 +
        }
413 +
      ]
414 +
    },
415 +
    "interpolation": {
416 +
      "patterns": [
417 +
        {
418 +
          "include": "#parentheses-interpolation"
419 +
        },
420 +
        {
421 +
          "include": "#braces-interpolation"
422 +
        }
423 +
      ]
424 +
    },
425 +
    "parentheses-interpolation": {
426 +
      "begin": "\\(",
427 +
      "end": "\\)",
428 +
      "patterns": [
429 +
        {
430 +
          "include": "#variables"
431 +
        },
432 +
        {
433 +
          "include": "#interpolation"
434 +
        }
435 +
      ]
436 +
    },
437 +
    "recipe": {
438 +
      "begin": "^\\t([-+@]*)",
439 +
      "beginCaptures": {
440 +
        "1": {
441 +
          "name": "keyword.control.$1.makefile"
442 +
        }
443 +
      },
444 +
      "end": "[^\\\\]$",
445 +
      "name": "meta.scope.recipe.makefile",
446 +
      "patterns": [
447 +
        {
448 +
          "match": "\\\\\\n",
449 +
          "name": "constant.character.escape.continuation.makefile"
450 +
        },
451 +
        {
452 +
          "include": "#variables"
453 +
        }
454 +
      ]
455 +
    },
456 +
    "simple-variable": {
457 +
      "patterns": [
458 +
        {
459 +
          "match": "\\$[^(){}]",
460 +
          "name": "variable.language.makefile"
461 +
        }
462 +
      ]
463 +
    },
464 +
    "target": {
465 +
      "begin": "^(?!\\t)([^:]*)(:)(?!=)",
466 +
      "beginCaptures": {
467 +
        "1": {
468 +
          "patterns": [
469 +
            {
470 +
              "captures": {
471 +
                "1": {
472 +
                  "name": "support.function.target.$1.makefile"
473 +
                }
474 +
              },
475 +
              "match": "^\\s*(\\.(PHONY|SUFFIXES|DEFAULT|PRECIOUS|INTERMEDIATE|SECONDARY|SECONDEXPANSION|DELETE_ON_ERROR|IGNORE|LOW_RESOLUTION_TIME|SILENT|EXPORT_ALL_VARIABLES|NOTPARALLEL|ONESHELL|POSIX))\\s*$"
476 +
            },
477 +
            {
478 +
              "begin": "(?=\\S)",
479 +
              "end": "(?=\\s|$)",
480 +
              "name": "entity.name.function.target.makefile",
481 +
              "patterns": [
482 +
                {
483 +
                  "include": "#variables"
484 +
                },
485 +
                {
486 +
                  "match": "%",
487 +
                  "name": "constant.other.placeholder.makefile"
488 +
                }
489 +
              ]
490 +
            }
491 +
          ]
492 +
        },
493 +
        "2": {
494 +
          "name": "punctuation.separator.key-value.makefile"
495 +
        }
496 +
      },
497 +
      "end": "[^\\\\]$",
498 +
      "name": "meta.scope.target.makefile",
499 +
      "patterns": [
500 +
        {
501 +
          "begin": "\\G",
502 +
          "end": "(?=[^\\\\])$",
503 +
          "name": "meta.scope.prerequisites.makefile",
504 +
          "patterns": [
505 +
            {
506 +
              "match": "\\\\\\n",
507 +
              "name": "constant.character.escape.continuation.makefile"
508 +
            },
509 +
            {
510 +
              "match": "[%*]",
511 +
              "name": "constant.other.placeholder.makefile"
512 +
            },
513 +
            {
514 +
              "include": "#comment"
515 +
            },
516 +
            {
517 +
              "include": "#variables"
518 +
            }
519 +
          ]
520 +
        }
521 +
      ]
522 +
    },
523 +
    "variable-assignment": {
524 +
      "begin": "(^ *|\\G\\s*)([^#:=\\s]+)\\s*((?:(?<![!+:?])|[!+:?])=)",
525 +
      "beginCaptures": {
526 +
        "2": {
527 +
          "name": "variable.other.makefile",
528 +
          "patterns": [
529 +
            {
530 +
              "include": "#variables"
531 +
            }
532 +
          ]
533 +
        },
534 +
        "3": {
535 +
          "name": "punctuation.separator.key-value.makefile"
536 +
        }
537 +
      },
538 +
      "end": "\\n",
539 +
      "patterns": [
540 +
        {
541 +
          "match": "\\\\\\n",
542 +
          "name": "constant.character.escape.continuation.makefile"
543 +
        },
544 +
        {
545 +
          "include": "#comment"
546 +
        },
547 +
        {
548 +
          "include": "#variables"
549 +
        }
550 +
      ]
551 +
    },
552 +
    "variable-braces": {
553 +
      "patterns": [
554 +
        {
555 +
          "begin": "\\$\\{",
556 +
          "captures": {
557 +
            "0": {
558 +
              "name": "punctuation.definition.variable.makefile"
559 +
            }
560 +
          },
561 +
          "end": "}|((?<!\\\\)\\n)",
562 +
          "name": "string.interpolated.makefile",
563 +
          "patterns": [
564 +
            {
565 +
              "include": "#variables"
566 +
            },
567 +
            {
568 +
              "include": "#builtin-variable-braces"
569 +
            },
570 +
            {
571 +
              "include": "#function-variable-braces"
572 +
            },
573 +
            {
574 +
              "include": "#flavor-variable-braces"
575 +
            },
576 +
            {
577 +
              "include": "#another-variable-braces"
578 +
            }
579 +
          ]
580 +
        }
581 +
      ]
582 +
    },
583 +
    "variable-parentheses": {
584 +
      "patterns": [
585 +
        {
586 +
          "begin": "\\$\\(",
587 +
          "captures": {
588 +
            "0": {
589 +
              "name": "punctuation.definition.variable.makefile"
590 +
            }
591 +
          },
592 +
          "end": "\\)|((?<!\\\\)\\n)",
593 +
          "name": "string.interpolated.makefile",
594 +
          "patterns": [
595 +
            {
596 +
              "include": "#variables"
597 +
            },
598 +
            {
599 +
              "include": "#builtin-variable-parentheses"
600 +
            },
601 +
            {
602 +
              "include": "#function-variable-parentheses"
603 +
            },
604 +
            {
605 +
              "include": "#flavor-variable-parentheses"
606 +
            },
607 +
            {
608 +
              "include": "#another-variable-parentheses"
609 +
            }
610 +
          ]
611 +
        }
612 +
      ]
613 +
    },
614 +
    "variables": {
615 +
      "patterns": [
616 +
        {
617 +
          "include": "#simple-variable"
618 +
        },
619 +
        {
620 +
          "include": "#variable-parentheses"
621 +
        },
622 +
        {
623 +
          "include": "#variable-braces"
624 +
        }
625 +
      ]
626 +
    }
627 +
  },
628 +
  "scopeName": "source.makefile"
629 +
}
crates/highlight/syntaxes/python.json added +4174 -0
1 +
{
2 +
  "displayName": "Python",
3 +
  "name": "python",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#statement"
7 +
    },
8 +
    {
9 +
      "include": "#expression"
10 +
    }
11 +
  ],
12 +
  "repository": {
13 +
    "annotated-parameter": {
14 +
      "begin": "\\b([_[:alpha:]]\\w*)\\s*(:)",
15 +
      "beginCaptures": {
16 +
        "1": {
17 +
          "name": "variable.parameter.function.language.python"
18 +
        },
19 +
        "2": {
20 +
          "name": "punctuation.separator.annotation.python"
21 +
        }
22 +
      },
23 +
      "end": "(,)|(?=\\))",
24 +
      "endCaptures": {
25 +
        "1": {
26 +
          "name": "punctuation.separator.parameters.python"
27 +
        }
28 +
      },
29 +
      "patterns": [
30 +
        {
31 +
          "include": "#expression"
32 +
        },
33 +
        {
34 +
          "match": "=(?!=)",
35 +
          "name": "keyword.operator.assignment.python"
36 +
        }
37 +
      ]
38 +
    },
39 +
    "assignment-operator": {
40 +
      "match": "<<=|>>=|//=|\\*\\*=|\\+=|-=|/=|@=|\\*=|%=|~=|\\^=|&=|\\|=|=(?!=)",
41 +
      "name": "keyword.operator.assignment.python"
42 +
    },
43 +
    "backticks": {
44 +
      "begin": "`",
45 +
      "end": "`|(?<!\\\\)(\\n)",
46 +
      "name": "invalid.deprecated.backtick.python",
47 +
      "patterns": [
48 +
        {
49 +
          "include": "#expression"
50 +
        }
51 +
      ]
52 +
    },
53 +
    "builtin-callables": {
54 +
      "patterns": [
55 +
        {
56 +
          "include": "#illegal-names"
57 +
        },
58 +
        {
59 +
          "include": "#illegal-object-name"
60 +
        },
61 +
        {
62 +
          "include": "#builtin-exceptions"
63 +
        },
64 +
        {
65 +
          "include": "#builtin-functions"
66 +
        },
67 +
        {
68 +
          "include": "#builtin-types"
69 +
        }
70 +
      ]
71 +
    },
72 +
    "builtin-exceptions": {
73 +
      "match": "(?<!\\.)\\b((Arithmetic|Assertion|Attribute|Buffer|BlockingIO|BrokenPipe|ChildProcess|(Connection(Aborted|Refused|Reset)?)|EOF|Environment|FileExists|FileNotFound|FloatingPoint|IO|Import|Indentation|Index|Interrupted|IsADirectory|NotADirectory|Permission|ProcessLookup|Timeout|Key|Lookup|Memory|Name|NotImplemented|OS|Overflow|Reference|Runtime|Recursion|Syntax|System|Tab|Type|UnboundLocal|Unicode(Encode|Decode|Translate)?|Value|Windows|ZeroDivision|ModuleNotFound)Error|((Pending)?Deprecation|Runtime|Syntax|User|Future|Import|Unicode|Bytes|Resource)?Warning|SystemExit|Stop(Async)?Iteration|KeyboardInterrupt|GeneratorExit|(Base)?Exception)\\b",
74 +
      "name": "support.type.exception.python"
75 +
    },
76 +
    "builtin-functions": {
77 +
      "patterns": [
78 +
        {
79 +
          "match": "(?<!\\.)\\b(__import__|abs|aiter|all|any|anext|ascii|bin|breakpoint|callable|chr|compile|copyright|credits|delattr|dir|divmod|enumerate|eval|exec|exit|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|license|locals|map|max|memoryview|min|next|oct|open|ord|pow|print|quit|range|reload|repr|reversed|round|setattr|sorted|sum|vars|zip)\\b",
80 +
          "name": "support.function.builtin.python"
81 +
        },
82 +
        {
83 +
          "match": "(?<!\\.)\\b(file|reduce|intern|raw_input|unicode|cmp|basestring|execfile|long|xrange)\\b",
84 +
          "name": "variable.legacy.builtin.python"
85 +
        }
86 +
      ]
87 +
    },
88 +
    "builtin-possible-callables": {
89 +
      "patterns": [
90 +
        {
91 +
          "include": "#builtin-callables"
92 +
        },
93 +
        {
94 +
          "include": "#magic-names"
95 +
        }
96 +
      ]
97 +
    },
98 +
    "builtin-types": {
99 +
      "match": "(?<!\\.)\\b(bool|bytearray|bytes|classmethod|complex|dict|float|frozenset|int|list|object|property|set|slice|staticmethod|str|tuple|type|super)\\b",
100 +
      "name": "support.type.python"
101 +
    },
102 +
    "call-wrapper-inheritance": {
103 +
      "begin": "\\b(?=([_[:alpha:]]\\w*)\\s*(\\())",
104 +
      "end": "(\\))",
105 +
      "endCaptures": {
106 +
        "1": {
107 +
          "name": "punctuation.definition.arguments.end.python"
108 +
        }
109 +
      },
110 +
      "name": "meta.function-call.python",
111 +
      "patterns": [
112 +
        {
113 +
          "include": "#inheritance-name"
114 +
        },
115 +
        {
116 +
          "include": "#function-arguments"
117 +
        }
118 +
      ]
119 +
    },
120 +
    "class-declaration": {
121 +
      "patterns": [
122 +
        {
123 +
          "begin": "\\s*(class)\\s+(?=[_[:alpha:]]\\w*\\s*([(:]))",
124 +
          "beginCaptures": {
125 +
            "1": {
126 +
              "name": "storage.type.class.python"
127 +
            }
128 +
          },
129 +
          "end": "(:)",
130 +
          "endCaptures": {
131 +
            "1": {
132 +
              "name": "punctuation.section.class.begin.python"
133 +
            }
134 +
          },
135 +
          "name": "meta.class.python",
136 +
          "patterns": [
137 +
            {
138 +
              "include": "#class-name"
139 +
            },
140 +
            {
141 +
              "include": "#class-inheritance"
142 +
            }
143 +
          ]
144 +
        }
145 +
      ]
146 +
    },
147 +
    "class-inheritance": {
148 +
      "begin": "(\\()",
149 +
      "beginCaptures": {
150 +
        "1": {
151 +
          "name": "punctuation.definition.inheritance.begin.python"
152 +
        }
153 +
      },
154 +
      "end": "(\\))",
155 +
      "endCaptures": {
156 +
        "1": {
157 +
          "name": "punctuation.definition.inheritance.end.python"
158 +
        }
159 +
      },
160 +
      "name": "meta.class.inheritance.python",
161 +
      "patterns": [
162 +
        {
163 +
          "match": "(\\*\\*?)",
164 +
          "name": "keyword.operator.unpacking.arguments.python"
165 +
        },
166 +
        {
167 +
          "match": ",",
168 +
          "name": "punctuation.separator.inheritance.python"
169 +
        },
170 +
        {
171 +
          "match": "=(?!=)",
172 +
          "name": "keyword.operator.assignment.python"
173 +
        },
174 +
        {
175 +
          "match": "\\bmetaclass\\b",
176 +
          "name": "support.type.metaclass.python"
177 +
        },
178 +
        {
179 +
          "include": "#illegal-names"
180 +
        },
181 +
        {
182 +
          "include": "#class-kwarg"
183 +
        },
184 +
        {
185 +
          "include": "#call-wrapper-inheritance"
186 +
        },
187 +
        {
188 +
          "include": "#expression-base"
189 +
        },
190 +
        {
191 +
          "include": "#member-access-class"
192 +
        },
193 +
        {
194 +
          "include": "#inheritance-identifier"
195 +
        }
196 +
      ]
197 +
    },
198 +
    "class-kwarg": {
199 +
      "captures": {
200 +
        "1": {
201 +
          "name": "entity.other.inherited-class.python variable.parameter.class.python"
202 +
        },
203 +
        "2": {
204 +
          "name": "keyword.operator.assignment.python"
205 +
        }
206 +
      },
207 +
      "match": "\\b([_[:alpha:]]\\w*)\\s*(=)(?!=)"
208 +
    },
209 +
    "class-name": {
210 +
      "patterns": [
211 +
        {
212 +
          "include": "#illegal-object-name"
213 +
        },
214 +
        {
215 +
          "include": "#builtin-possible-callables"
216 +
        },
217 +
        {
218 +
          "match": "\\b([_[:alpha:]]\\w*)\\b",
219 +
          "name": "entity.name.type.class.python"
220 +
        }
221 +
      ]
222 +
    },
223 +
    "codetags": {
224 +
      "captures": {
225 +
        "1": {
226 +
          "name": "keyword.codetag.notation.python"
227 +
        }
228 +
      },
229 +
      "match": "\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b"
230 +
    },
231 +
    "comments": {
232 +
      "patterns": [
233 +
        {
234 +
          "begin": "#\\s*(type:)\\s*+(?!$|#)",
235 +
          "beginCaptures": {
236 +
            "0": {
237 +
              "name": "meta.typehint.comment.python"
238 +
            },
239 +
            "1": {
240 +
              "name": "comment.typehint.directive.notation.python"
241 +
            }
242 +
          },
243 +
          "contentName": "meta.typehint.comment.python",
244 +
          "end": "$|(?=#)",
245 +
          "name": "comment.line.number-sign.python",
246 +
          "patterns": [
247 +
            {
248 +
              "match": "\\Gignore(?=\\s*(?:$|#))",
249 +
              "name": "comment.typehint.ignore.notation.python"
250 +
            },
251 +
            {
252 +
              "match": "(?<!\\.)\\b(bool|bytes|float|int|object|str|List|Dict|Iterable|Sequence|Set|FrozenSet|Callable|Union|Tuple|Any|None)\\b",
253 +
              "name": "comment.typehint.type.notation.python"
254 +
            },
255 +
            {
256 +
              "match": "([]()*,.=\\[]|(->))",
257 +
              "name": "comment.typehint.punctuation.notation.python"
258 +
            },
259 +
            {
260 +
              "match": "([_[:alpha:]]\\w*)",
261 +
              "name": "comment.typehint.variable.notation.python"
262 +
            }
263 +
          ]
264 +
        },
265 +
        {
266 +
          "include": "#comments-base"
267 +
        }
268 +
      ]
269 +
    },
270 +
    "comments-base": {
271 +
      "begin": "(#)",
272 +
      "beginCaptures": {
273 +
        "1": {
274 +
          "name": "punctuation.definition.comment.python"
275 +
        }
276 +
      },
277 +
      "end": "$()",
278 +
      "name": "comment.line.number-sign.python",
279 +
      "patterns": [
280 +
        {
281 +
          "include": "#codetags"
282 +
        }
283 +
      ]
284 +
    },
285 +
    "comments-string-double-three": {
286 +
      "begin": "(#)",
287 +
      "beginCaptures": {
288 +
        "1": {
289 +
          "name": "punctuation.definition.comment.python"
290 +
        }
291 +
      },
292 +
      "end": "($|(?=\"\"\"))",
293 +
      "name": "comment.line.number-sign.python",
294 +
      "patterns": [
295 +
        {
296 +
          "include": "#codetags"
297 +
        }
298 +
      ]
299 +
    },
300 +
    "comments-string-single-three": {
301 +
      "begin": "(#)",
302 +
      "beginCaptures": {
303 +
        "1": {
304 +
          "name": "punctuation.definition.comment.python"
305 +
        }
306 +
      },
307 +
      "end": "($|(?='''))",
308 +
      "name": "comment.line.number-sign.python",
309 +
      "patterns": [
310 +
        {
311 +
          "include": "#codetags"
312 +
        }
313 +
      ]
314 +
    },
315 +
    "curly-braces": {
316 +
      "begin": "\\{",
317 +
      "beginCaptures": {
318 +
        "0": {
319 +
          "name": "punctuation.definition.dict.begin.python"
320 +
        }
321 +
      },
322 +
      "end": "}",
323 +
      "endCaptures": {
324 +
        "0": {
325 +
          "name": "punctuation.definition.dict.end.python"
326 +
        }
327 +
      },
328 +
      "patterns": [
329 +
        {
330 +
          "match": ":",
331 +
          "name": "punctuation.separator.dict.python"
332 +
        },
333 +
        {
334 +
          "include": "#expression"
335 +
        }
336 +
      ]
337 +
    },
338 +
    "decorator": {
339 +
      "begin": "^\\s*((@))\\s*(?=[_[:alpha:]]\\w*)",
340 +
      "beginCaptures": {
341 +
        "1": {
342 +
          "name": "entity.name.function.decorator.python"
343 +
        },
344 +
        "2": {
345 +
          "name": "punctuation.definition.decorator.python"
346 +
        }
347 +
      },
348 +
      "end": "(\\))(.*?)(?=\\s*(?:#|$))|(?=[\\n#])",
349 +
      "endCaptures": {
350 +
        "1": {
351 +
          "name": "punctuation.definition.arguments.end.python"
352 +
        },
353 +
        "2": {
354 +
          "name": "invalid.illegal.decorator.python"
355 +
        }
356 +
      },
357 +
      "name": "meta.function.decorator.python",
358 +
      "patterns": [
359 +
        {
360 +
          "include": "#decorator-name"
361 +
        },
362 +
        {
363 +
          "include": "#function-arguments"
364 +
        }
365 +
      ]
366 +
    },
367 +
    "decorator-name": {
368 +
      "patterns": [
369 +
        {
370 +
          "include": "#builtin-callables"
371 +
        },
372 +
        {
373 +
          "include": "#illegal-object-name"
374 +
        },
375 +
        {
376 +
          "captures": {
377 +
            "2": {
378 +
              "name": "punctuation.separator.period.python"
379 +
            }
380 +
          },
381 +
          "match": "([_[:alpha:]]\\w*)|(\\.)",
382 +
          "name": "entity.name.function.decorator.python"
383 +
        },
384 +
        {
385 +
          "include": "#line-continuation"
386 +
        },
387 +
        {
388 +
          "captures": {
389 +
            "1": {
390 +
              "name": "invalid.illegal.decorator.python"
391 +
            }
392 +
          },
393 +
          "match": "\\s*([^#(.\\\\_[:alpha:]\\s].*?)(?=#|$)",
394 +
          "name": "invalid.illegal.decorator.python"
395 +
        }
396 +
      ]
397 +
    },
398 +
    "docstring": {
399 +
      "patterns": [
400 +
        {
401 +
          "begin": "('''|\"\"\")",
402 +
          "beginCaptures": {
403 +
            "1": {
404 +
              "name": "punctuation.definition.string.begin.python"
405 +
            }
406 +
          },
407 +
          "end": "(\\1)",
408 +
          "endCaptures": {
409 +
            "1": {
410 +
              "name": "punctuation.definition.string.end.python"
411 +
            }
412 +
          },
413 +
          "name": "string.quoted.docstring.multi.python",
414 +
          "patterns": [
415 +
            {
416 +
              "include": "#docstring-prompt"
417 +
            },
418 +
            {
419 +
              "include": "#codetags"
420 +
            },
421 +
            {
422 +
              "include": "#docstring-guts-unicode"
423 +
            }
424 +
          ]
425 +
        },
426 +
        {
427 +
          "begin": "([Rr])('''|\"\"\")",
428 +
          "beginCaptures": {
429 +
            "1": {
430 +
              "name": "storage.type.string.python"
431 +
            },
432 +
            "2": {
433 +
              "name": "punctuation.definition.string.begin.python"
434 +
            }
435 +
          },
436 +
          "end": "(\\2)",
437 +
          "endCaptures": {
438 +
            "1": {
439 +
              "name": "punctuation.definition.string.end.python"
440 +
            }
441 +
          },
442 +
          "name": "string.quoted.docstring.raw.multi.python",
443 +
          "patterns": [
444 +
            {
445 +
              "include": "#string-consume-escape"
446 +
            },
447 +
            {
448 +
              "include": "#docstring-prompt"
449 +
            },
450 +
            {
451 +
              "include": "#codetags"
452 +
            }
453 +
          ]
454 +
        },
455 +
        {
456 +
          "begin": "([\"'])",
457 +
          "beginCaptures": {
458 +
            "1": {
459 +
              "name": "punctuation.definition.string.begin.python"
460 +
            }
461 +
          },
462 +
          "end": "(\\1)|(\\n)",
463 +
          "endCaptures": {
464 +
            "1": {
465 +
              "name": "punctuation.definition.string.end.python"
466 +
            },
467 +
            "2": {
468 +
              "name": "invalid.illegal.newline.python"
469 +
            }
470 +
          },
471 +
          "name": "string.quoted.docstring.single.python",
472 +
          "patterns": [
473 +
            {
474 +
              "include": "#codetags"
475 +
            },
476 +
            {
477 +
              "include": "#docstring-guts-unicode"
478 +
            }
479 +
          ]
480 +
        },
481 +
        {
482 +
          "begin": "([Rr])([\"'])",
483 +
          "beginCaptures": {
484 +
            "1": {
485 +
              "name": "storage.type.string.python"
486 +
            },
487 +
            "2": {
488 +
              "name": "punctuation.definition.string.begin.python"
489 +
            }
490 +
          },
491 +
          "end": "(\\2)|(\\n)",
492 +
          "endCaptures": {
493 +
            "1": {
494 +
              "name": "punctuation.definition.string.end.python"
495 +
            },
496 +
            "2": {
497 +
              "name": "invalid.illegal.newline.python"
498 +
            }
499 +
          },
500 +
          "name": "string.quoted.docstring.raw.single.python",
501 +
          "patterns": [
502 +
            {
503 +
              "include": "#string-consume-escape"
504 +
            },
505 +
            {
506 +
              "include": "#codetags"
507 +
            }
508 +
          ]
509 +
        }
510 +
      ]
511 +
    },
512 +
    "docstring-guts-unicode": {
513 +
      "patterns": [
514 +
        {
515 +
          "include": "#escape-sequence-unicode"
516 +
        },
517 +
        {
518 +
          "include": "#escape-sequence"
519 +
        },
520 +
        {
521 +
          "include": "#string-line-continuation"
522 +
        }
523 +
      ]
524 +
    },
525 +
    "docstring-prompt": {
526 +
      "captures": {
527 +
        "1": {
528 +
          "name": "keyword.control.flow.python"
529 +
        }
530 +
      },
531 +
      "match": "(?:^|\\G)\\s*((?:>>>|\\.\\.\\.)\\s)(?=\\s*\\S)"
532 +
    },
533 +
    "docstring-statement": {
534 +
      "begin": "^(?=\\s*[Rr]?('''|\"\"\"|[\"']))",
535 +
      "end": "((?<=\\1)|^)(?!\\s*[Rr]?('''|\"\"\"|[\"']))",
536 +
      "patterns": [
537 +
        {
538 +
          "include": "#docstring"
539 +
        }
540 +
      ]
541 +
    },
542 +
    "double-one-regexp-character-set": {
543 +
      "patterns": [
544 +
        {
545 +
          "match": "\\[\\^?](?!.*?])"
546 +
        },
547 +
        {
548 +
          "begin": "(\\[)(\\^)?(])?",
549 +
          "beginCaptures": {
550 +
            "1": {
551 +
              "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
552 +
            },
553 +
            "2": {
554 +
              "name": "keyword.operator.negation.regexp"
555 +
            },
556 +
            "3": {
557 +
              "name": "constant.character.set.regexp"
558 +
            }
559 +
          },
560 +
          "end": "(]|(?=\"))|((?=(?<!\\\\)\\n))",
561 +
          "endCaptures": {
562 +
            "1": {
563 +
              "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
564 +
            },
565 +
            "2": {
566 +
              "name": "invalid.illegal.newline.python"
567 +
            }
568 +
          },
569 +
          "name": "meta.character.set.regexp",
570 +
          "patterns": [
571 +
            {
572 +
              "include": "#regexp-charecter-set-escapes"
573 +
            },
574 +
            {
575 +
              "match": "\\N",
576 +
              "name": "constant.character.set.regexp"
577 +
            }
578 +
          ]
579 +
        }
580 +
      ]
581 +
    },
582 +
    "double-one-regexp-comments": {
583 +
      "begin": "\\(\\?#",
584 +
      "beginCaptures": {
585 +
        "0": {
586 +
          "name": "punctuation.comment.begin.regexp"
587 +
        }
588 +
      },
589 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
590 +
      "endCaptures": {
591 +
        "1": {
592 +
          "name": "punctuation.comment.end.regexp"
593 +
        },
594 +
        "2": {
595 +
          "name": "invalid.illegal.newline.python"
596 +
        }
597 +
      },
598 +
      "name": "comment.regexp",
599 +
      "patterns": [
600 +
        {
601 +
          "include": "#codetags"
602 +
        }
603 +
      ]
604 +
    },
605 +
    "double-one-regexp-conditional": {
606 +
      "begin": "(\\()\\?\\((\\w+(?:\\s+\\p{alnum}+)?|\\d+)\\)",
607 +
      "beginCaptures": {
608 +
        "0": {
609 +
          "name": "keyword.operator.conditional.regexp"
610 +
        },
611 +
        "1": {
612 +
          "name": "punctuation.parenthesis.conditional.begin.regexp"
613 +
        }
614 +
      },
615 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
616 +
      "endCaptures": {
617 +
        "1": {
618 +
          "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
619 +
        },
620 +
        "2": {
621 +
          "name": "invalid.illegal.newline.python"
622 +
        }
623 +
      },
624 +
      "patterns": [
625 +
        {
626 +
          "include": "#double-one-regexp-expression"
627 +
        }
628 +
      ]
629 +
    },
630 +
    "double-one-regexp-expression": {
631 +
      "patterns": [
632 +
        {
633 +
          "include": "#regexp-base-expression"
634 +
        },
635 +
        {
636 +
          "include": "#double-one-regexp-character-set"
637 +
        },
638 +
        {
639 +
          "include": "#double-one-regexp-comments"
640 +
        },
641 +
        {
642 +
          "include": "#regexp-flags"
643 +
        },
644 +
        {
645 +
          "include": "#double-one-regexp-named-group"
646 +
        },
647 +
        {
648 +
          "include": "#regexp-backreference"
649 +
        },
650 +
        {
651 +
          "include": "#double-one-regexp-lookahead"
652 +
        },
653 +
        {
654 +
          "include": "#double-one-regexp-lookahead-negative"
655 +
        },
656 +
        {
657 +
          "include": "#double-one-regexp-lookbehind"
658 +
        },
659 +
        {
660 +
          "include": "#double-one-regexp-lookbehind-negative"
661 +
        },
662 +
        {
663 +
          "include": "#double-one-regexp-conditional"
664 +
        },
665 +
        {
666 +
          "include": "#double-one-regexp-parentheses-non-capturing"
667 +
        },
668 +
        {
669 +
          "include": "#double-one-regexp-parentheses"
670 +
        }
671 +
      ]
672 +
    },
673 +
    "double-one-regexp-lookahead": {
674 +
      "begin": "(\\()\\?=",
675 +
      "beginCaptures": {
676 +
        "0": {
677 +
          "name": "keyword.operator.lookahead.regexp"
678 +
        },
679 +
        "1": {
680 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
681 +
        }
682 +
      },
683 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
684 +
      "endCaptures": {
685 +
        "1": {
686 +
          "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
687 +
        },
688 +
        "2": {
689 +
          "name": "invalid.illegal.newline.python"
690 +
        }
691 +
      },
692 +
      "patterns": [
693 +
        {
694 +
          "include": "#double-one-regexp-expression"
695 +
        }
696 +
      ]
697 +
    },
698 +
    "double-one-regexp-lookahead-negative": {
699 +
      "begin": "(\\()\\?!",
700 +
      "beginCaptures": {
701 +
        "0": {
702 +
          "name": "keyword.operator.lookahead.negative.regexp"
703 +
        },
704 +
        "1": {
705 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
706 +
        }
707 +
      },
708 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
709 +
      "endCaptures": {
710 +
        "1": {
711 +
          "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
712 +
        },
713 +
        "2": {
714 +
          "name": "invalid.illegal.newline.python"
715 +
        }
716 +
      },
717 +
      "patterns": [
718 +
        {
719 +
          "include": "#double-one-regexp-expression"
720 +
        }
721 +
      ]
722 +
    },
723 +
    "double-one-regexp-lookbehind": {
724 +
      "begin": "(\\()\\?<=",
725 +
      "beginCaptures": {
726 +
        "0": {
727 +
          "name": "keyword.operator.lookbehind.regexp"
728 +
        },
729 +
        "1": {
730 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
731 +
        }
732 +
      },
733 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
734 +
      "endCaptures": {
735 +
        "1": {
736 +
          "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
737 +
        },
738 +
        "2": {
739 +
          "name": "invalid.illegal.newline.python"
740 +
        }
741 +
      },
742 +
      "patterns": [
743 +
        {
744 +
          "include": "#double-one-regexp-expression"
745 +
        }
746 +
      ]
747 +
    },
748 +
    "double-one-regexp-lookbehind-negative": {
749 +
      "begin": "(\\()\\?<!",
750 +
      "beginCaptures": {
751 +
        "0": {
752 +
          "name": "keyword.operator.lookbehind.negative.regexp"
753 +
        },
754 +
        "1": {
755 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
756 +
        }
757 +
      },
758 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
759 +
      "endCaptures": {
760 +
        "1": {
761 +
          "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
762 +
        },
763 +
        "2": {
764 +
          "name": "invalid.illegal.newline.python"
765 +
        }
766 +
      },
767 +
      "patterns": [
768 +
        {
769 +
          "include": "#double-one-regexp-expression"
770 +
        }
771 +
      ]
772 +
    },
773 +
    "double-one-regexp-named-group": {
774 +
      "begin": "(\\()(\\?P<\\w+(?:\\s+\\p{alnum}+)?>)",
775 +
      "beginCaptures": {
776 +
        "1": {
777 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
778 +
        },
779 +
        "2": {
780 +
          "name": "entity.name.tag.named.group.regexp"
781 +
        }
782 +
      },
783 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
784 +
      "endCaptures": {
785 +
        "1": {
786 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
787 +
        },
788 +
        "2": {
789 +
          "name": "invalid.illegal.newline.python"
790 +
        }
791 +
      },
792 +
      "name": "meta.named.regexp",
793 +
      "patterns": [
794 +
        {
795 +
          "include": "#double-one-regexp-expression"
796 +
        }
797 +
      ]
798 +
    },
799 +
    "double-one-regexp-parentheses": {
800 +
      "begin": "\\(",
801 +
      "beginCaptures": {
802 +
        "0": {
803 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
804 +
        }
805 +
      },
806 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
807 +
      "endCaptures": {
808 +
        "1": {
809 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
810 +
        },
811 +
        "2": {
812 +
          "name": "invalid.illegal.newline.python"
813 +
        }
814 +
      },
815 +
      "patterns": [
816 +
        {
817 +
          "include": "#double-one-regexp-expression"
818 +
        }
819 +
      ]
820 +
    },
821 +
    "double-one-regexp-parentheses-non-capturing": {
822 +
      "begin": "\\(\\?:",
823 +
      "beginCaptures": {
824 +
        "0": {
825 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
826 +
        }
827 +
      },
828 +
      "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
829 +
      "endCaptures": {
830 +
        "1": {
831 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
832 +
        },
833 +
        "2": {
834 +
          "name": "invalid.illegal.newline.python"
835 +
        }
836 +
      },
837 +
      "patterns": [
838 +
        {
839 +
          "include": "#double-one-regexp-expression"
840 +
        }
841 +
      ]
842 +
    },
843 +
    "double-three-regexp-character-set": {
844 +
      "patterns": [
845 +
        {
846 +
          "match": "\\[\\^?](?!.*?])"
847 +
        },
848 +
        {
849 +
          "begin": "(\\[)(\\^)?(])?",
850 +
          "beginCaptures": {
851 +
            "1": {
852 +
              "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
853 +
            },
854 +
            "2": {
855 +
              "name": "keyword.operator.negation.regexp"
856 +
            },
857 +
            "3": {
858 +
              "name": "constant.character.set.regexp"
859 +
            }
860 +
          },
861 +
          "end": "(]|(?=\"\"\"))",
862 +
          "endCaptures": {
863 +
            "1": {
864 +
              "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
865 +
            },
866 +
            "2": {
867 +
              "name": "invalid.illegal.newline.python"
868 +
            }
869 +
          },
870 +
          "name": "meta.character.set.regexp",
871 +
          "patterns": [
872 +
            {
873 +
              "include": "#regexp-charecter-set-escapes"
874 +
            },
875 +
            {
876 +
              "match": "\\N",
877 +
              "name": "constant.character.set.regexp"
878 +
            }
879 +
          ]
880 +
        }
881 +
      ]
882 +
    },
883 +
    "double-three-regexp-comments": {
884 +
      "begin": "\\(\\?#",
885 +
      "beginCaptures": {
886 +
        "0": {
887 +
          "name": "punctuation.comment.begin.regexp"
888 +
        }
889 +
      },
890 +
      "end": "(\\)|(?=\"\"\"))",
891 +
      "endCaptures": {
892 +
        "1": {
893 +
          "name": "punctuation.comment.end.regexp"
894 +
        },
895 +
        "2": {
896 +
          "name": "invalid.illegal.newline.python"
897 +
        }
898 +
      },
899 +
      "name": "comment.regexp",
900 +
      "patterns": [
901 +
        {
902 +
          "include": "#codetags"
903 +
        }
904 +
      ]
905 +
    },
906 +
    "double-three-regexp-conditional": {
907 +
      "begin": "(\\()\\?\\((\\w+(?:\\s+\\p{alnum}+)?|\\d+)\\)",
908 +
      "beginCaptures": {
909 +
        "0": {
910 +
          "name": "keyword.operator.conditional.regexp"
911 +
        },
912 +
        "1": {
913 +
          "name": "punctuation.parenthesis.conditional.begin.regexp"
914 +
        }
915 +
      },
916 +
      "end": "(\\)|(?=\"\"\"))",
917 +
      "endCaptures": {
918 +
        "1": {
919 +
          "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
920 +
        },
921 +
        "2": {
922 +
          "name": "invalid.illegal.newline.python"
923 +
        }
924 +
      },
925 +
      "patterns": [
926 +
        {
927 +
          "include": "#double-three-regexp-expression"
928 +
        },
929 +
        {
930 +
          "include": "#comments-string-double-three"
931 +
        }
932 +
      ]
933 +
    },
934 +
    "double-three-regexp-expression": {
935 +
      "patterns": [
936 +
        {
937 +
          "include": "#regexp-base-expression"
938 +
        },
939 +
        {
940 +
          "include": "#double-three-regexp-character-set"
941 +
        },
942 +
        {
943 +
          "include": "#double-three-regexp-comments"
944 +
        },
945 +
        {
946 +
          "include": "#regexp-flags"
947 +
        },
948 +
        {
949 +
          "include": "#double-three-regexp-named-group"
950 +
        },
951 +
        {
952 +
          "include": "#regexp-backreference"
953 +
        },
954 +
        {
955 +
          "include": "#double-three-regexp-lookahead"
956 +
        },
957 +
        {
958 +
          "include": "#double-three-regexp-lookahead-negative"
959 +
        },
960 +
        {
961 +
          "include": "#double-three-regexp-lookbehind"
962 +
        },
963 +
        {
964 +
          "include": "#double-three-regexp-lookbehind-negative"
965 +
        },
966 +
        {
967 +
          "include": "#double-three-regexp-conditional"
968 +
        },
969 +
        {
970 +
          "include": "#double-three-regexp-parentheses-non-capturing"
971 +
        },
972 +
        {
973 +
          "include": "#double-three-regexp-parentheses"
974 +
        },
975 +
        {
976 +
          "include": "#comments-string-double-three"
977 +
        }
978 +
      ]
979 +
    },
980 +
    "double-three-regexp-lookahead": {
981 +
      "begin": "(\\()\\?=",
982 +
      "beginCaptures": {
983 +
        "0": {
984 +
          "name": "keyword.operator.lookahead.regexp"
985 +
        },
986 +
        "1": {
987 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
988 +
        }
989 +
      },
990 +
      "end": "(\\)|(?=\"\"\"))",
991 +
      "endCaptures": {
992 +
        "1": {
993 +
          "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
994 +
        },
995 +
        "2": {
996 +
          "name": "invalid.illegal.newline.python"
997 +
        }
998 +
      },
999 +
      "patterns": [
1000 +
        {
1001 +
          "include": "#double-three-regexp-expression"
1002 +
        },
1003 +
        {
1004 +
          "include": "#comments-string-double-three"
1005 +
        }
1006 +
      ]
1007 +
    },
1008 +
    "double-three-regexp-lookahead-negative": {
1009 +
      "begin": "(\\()\\?!",
1010 +
      "beginCaptures": {
1011 +
        "0": {
1012 +
          "name": "keyword.operator.lookahead.negative.regexp"
1013 +
        },
1014 +
        "1": {
1015 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
1016 +
        }
1017 +
      },
1018 +
      "end": "(\\)|(?=\"\"\"))",
1019 +
      "endCaptures": {
1020 +
        "1": {
1021 +
          "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
1022 +
        },
1023 +
        "2": {
1024 +
          "name": "invalid.illegal.newline.python"
1025 +
        }
1026 +
      },
1027 +
      "patterns": [
1028 +
        {
1029 +
          "include": "#double-three-regexp-expression"
1030 +
        },
1031 +
        {
1032 +
          "include": "#comments-string-double-three"
1033 +
        }
1034 +
      ]
1035 +
    },
1036 +
    "double-three-regexp-lookbehind": {
1037 +
      "begin": "(\\()\\?<=",
1038 +
      "beginCaptures": {
1039 +
        "0": {
1040 +
          "name": "keyword.operator.lookbehind.regexp"
1041 +
        },
1042 +
        "1": {
1043 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
1044 +
        }
1045 +
      },
1046 +
      "end": "(\\)|(?=\"\"\"))",
1047 +
      "endCaptures": {
1048 +
        "1": {
1049 +
          "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
1050 +
        },
1051 +
        "2": {
1052 +
          "name": "invalid.illegal.newline.python"
1053 +
        }
1054 +
      },
1055 +
      "patterns": [
1056 +
        {
1057 +
          "include": "#double-three-regexp-expression"
1058 +
        },
1059 +
        {
1060 +
          "include": "#comments-string-double-three"
1061 +
        }
1062 +
      ]
1063 +
    },
1064 +
    "double-three-regexp-lookbehind-negative": {
1065 +
      "begin": "(\\()\\?<!",
1066 +
      "beginCaptures": {
1067 +
        "0": {
1068 +
          "name": "keyword.operator.lookbehind.negative.regexp"
1069 +
        },
1070 +
        "1": {
1071 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
1072 +
        }
1073 +
      },
1074 +
      "end": "(\\)|(?=\"\"\"))",
1075 +
      "endCaptures": {
1076 +
        "1": {
1077 +
          "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
1078 +
        },
1079 +
        "2": {
1080 +
          "name": "invalid.illegal.newline.python"
1081 +
        }
1082 +
      },
1083 +
      "patterns": [
1084 +
        {
1085 +
          "include": "#double-three-regexp-expression"
1086 +
        },
1087 +
        {
1088 +
          "include": "#comments-string-double-three"
1089 +
        }
1090 +
      ]
1091 +
    },
1092 +
    "double-three-regexp-named-group": {
1093 +
      "begin": "(\\()(\\?P<\\w+(?:\\s+\\p{alnum}+)?>)",
1094 +
      "beginCaptures": {
1095 +
        "1": {
1096 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
1097 +
        },
1098 +
        "2": {
1099 +
          "name": "entity.name.tag.named.group.regexp"
1100 +
        }
1101 +
      },
1102 +
      "end": "(\\)|(?=\"\"\"))",
1103 +
      "endCaptures": {
1104 +
        "1": {
1105 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
1106 +
        },
1107 +
        "2": {
1108 +
          "name": "invalid.illegal.newline.python"
1109 +
        }
1110 +
      },
1111 +
      "name": "meta.named.regexp",
1112 +
      "patterns": [
1113 +
        {
1114 +
          "include": "#double-three-regexp-expression"
1115 +
        },
1116 +
        {
1117 +
          "include": "#comments-string-double-three"
1118 +
        }
1119 +
      ]
1120 +
    },
1121 +
    "double-three-regexp-parentheses": {
1122 +
      "begin": "\\(",
1123 +
      "beginCaptures": {
1124 +
        "0": {
1125 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
1126 +
        }
1127 +
      },
1128 +
      "end": "(\\)|(?=\"\"\"))",
1129 +
      "endCaptures": {
1130 +
        "1": {
1131 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
1132 +
        },
1133 +
        "2": {
1134 +
          "name": "invalid.illegal.newline.python"
1135 +
        }
1136 +
      },
1137 +
      "patterns": [
1138 +
        {
1139 +
          "include": "#double-three-regexp-expression"
1140 +
        },
1141 +
        {
1142 +
          "include": "#comments-string-double-three"
1143 +
        }
1144 +
      ]
1145 +
    },
1146 +
    "double-three-regexp-parentheses-non-capturing": {
1147 +
      "begin": "\\(\\?:",
1148 +
      "beginCaptures": {
1149 +
        "0": {
1150 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
1151 +
        }
1152 +
      },
1153 +
      "end": "(\\)|(?=\"\"\"))",
1154 +
      "endCaptures": {
1155 +
        "1": {
1156 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
1157 +
        },
1158 +
        "2": {
1159 +
          "name": "invalid.illegal.newline.python"
1160 +
        }
1161 +
      },
1162 +
      "patterns": [
1163 +
        {
1164 +
          "include": "#double-three-regexp-expression"
1165 +
        },
1166 +
        {
1167 +
          "include": "#comments-string-double-three"
1168 +
        }
1169 +
      ]
1170 +
    },
1171 +
    "ellipsis": {
1172 +
      "match": "\\.\\.\\.",
1173 +
      "name": "constant.other.ellipsis.python"
1174 +
    },
1175 +
    "escape-sequence": {
1176 +
      "match": "\\\\(x\\h{2}|[0-7]{1,3}|[\"'\\\\abfnrtv])",
1177 +
      "name": "constant.character.escape.python"
1178 +
    },
1179 +
    "escape-sequence-unicode": {
1180 +
      "patterns": [
1181 +
        {
1182 +
          "match": "\\\\(u\\h{4}|U\\h{8}|N\\{[\\w\\s]+?})",
1183 +
          "name": "constant.character.escape.python"
1184 +
        }
1185 +
      ]
1186 +
    },
1187 +
    "expression": {
1188 +
      "patterns": [
1189 +
        {
1190 +
          "include": "#expression-base"
1191 +
        },
1192 +
        {
1193 +
          "include": "#member-access"
1194 +
        },
1195 +
        {
1196 +
          "match": "\\b([_[:alpha:]]\\w*)\\b"
1197 +
        }
1198 +
      ]
1199 +
    },
1200 +
    "expression-bare": {
1201 +
      "patterns": [
1202 +
        {
1203 +
          "include": "#backticks"
1204 +
        },
1205 +
        {
1206 +
          "include": "#illegal-anno"
1207 +
        },
1208 +
        {
1209 +
          "include": "#literal"
1210 +
        },
1211 +
        {
1212 +
          "include": "#regexp"
1213 +
        },
1214 +
        {
1215 +
          "include": "#string"
1216 +
        },
1217 +
        {
1218 +
          "include": "#lambda"
1219 +
        },
1220 +
        {
1221 +
          "include": "#generator"
1222 +
        },
1223 +
        {
1224 +
          "include": "#illegal-operator"
1225 +
        },
1226 +
        {
1227 +
          "include": "#operator"
1228 +
        },
1229 +
        {
1230 +
          "include": "#curly-braces"
1231 +
        },
1232 +
        {
1233 +
          "include": "#item-access"
1234 +
        },
1235 +
        {
1236 +
          "include": "#list"
1237 +
        },
1238 +
        {
1239 +
          "include": "#odd-function-call"
1240 +
        },
1241 +
        {
1242 +
          "include": "#round-braces"
1243 +
        },
1244 +
        {
1245 +
          "include": "#function-call"
1246 +
        },
1247 +
        {
1248 +
          "include": "#builtin-functions"
1249 +
        },
1250 +
        {
1251 +
          "include": "#builtin-types"
1252 +
        },
1253 +
        {
1254 +
          "include": "#builtin-exceptions"
1255 +
        },
1256 +
        {
1257 +
          "include": "#magic-names"
1258 +
        },
1259 +
        {
1260 +
          "include": "#special-names"
1261 +
        },
1262 +
        {
1263 +
          "include": "#illegal-names"
1264 +
        },
1265 +
        {
1266 +
          "include": "#special-variables"
1267 +
        },
1268 +
        {
1269 +
          "include": "#ellipsis"
1270 +
        },
1271 +
        {
1272 +
          "include": "#punctuation"
1273 +
        },
1274 +
        {
1275 +
          "include": "#line-continuation"
1276 +
        }
1277 +
      ]
1278 +
    },
1279 +
    "expression-base": {
1280 +
      "patterns": [
1281 +
        {
1282 +
          "include": "#comments"
1283 +
        },
1284 +
        {
1285 +
          "include": "#expression-bare"
1286 +
        },
1287 +
        {
1288 +
          "include": "#line-continuation"
1289 +
        }
1290 +
      ]
1291 +
    },
1292 +
    "f-expression": {
1293 +
      "patterns": [
1294 +
        {
1295 +
          "include": "#expression-bare"
1296 +
        },
1297 +
        {
1298 +
          "include": "#member-access"
1299 +
        },
1300 +
        {
1301 +
          "match": "\\b([_[:alpha:]]\\w*)\\b"
1302 +
        }
1303 +
      ]
1304 +
    },
1305 +
    "fregexp-base-expression": {
1306 +
      "patterns": [
1307 +
        {
1308 +
          "include": "#fregexp-quantifier"
1309 +
        },
1310 +
        {
1311 +
          "include": "#fstring-formatting-braces"
1312 +
        },
1313 +
        {
1314 +
          "match": "\\{.*?}"
1315 +
        },
1316 +
        {
1317 +
          "include": "#regexp-base-common"
1318 +
        }
1319 +
      ]
1320 +
    },
1321 +
    "fregexp-quantifier": {
1322 +
      "match": "\\{\\{(\\d+|\\d+,(\\d+)?|,\\d+)}}",
1323 +
      "name": "keyword.operator.quantifier.regexp"
1324 +
    },
1325 +
    "fstring-fnorm-quoted-multi-line": {
1326 +
      "begin": "\\b([Ff])([BUbu])?('''|\"\"\")",
1327 +
      "beginCaptures": {
1328 +
        "1": {
1329 +
          "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
1330 +
        },
1331 +
        "2": {
1332 +
          "name": "invalid.illegal.prefix.python"
1333 +
        },
1334 +
        "3": {
1335 +
          "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"
1336 +
        }
1337 +
      },
1338 +
      "end": "(\\3)",
1339 +
      "endCaptures": {
1340 +
        "1": {
1341 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
1342 +
        },
1343 +
        "2": {
1344 +
          "name": "invalid.illegal.newline.python"
1345 +
        }
1346 +
      },
1347 +
      "name": "meta.fstring.python",
1348 +
      "patterns": [
1349 +
        {
1350 +
          "include": "#fstring-guts"
1351 +
        },
1352 +
        {
1353 +
          "include": "#fstring-illegal-multi-brace"
1354 +
        },
1355 +
        {
1356 +
          "include": "#fstring-multi-brace"
1357 +
        },
1358 +
        {
1359 +
          "include": "#fstring-multi-core"
1360 +
        }
1361 +
      ]
1362 +
    },
1363 +
    "fstring-fnorm-quoted-single-line": {
1364 +
      "begin": "\\b([Ff])([BUbu])?(([\"']))",
1365 +
      "beginCaptures": {
1366 +
        "1": {
1367 +
          "name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
1368 +
        },
1369 +
        "2": {
1370 +
          "name": "invalid.illegal.prefix.python"
1371 +
        },
1372 +
        "3": {
1373 +
          "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"
1374 +
        }
1375 +
      },
1376 +
      "end": "(\\3)|((?<!\\\\)\\n)",
1377 +
      "endCaptures": {
1378 +
        "1": {
1379 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
1380 +
        },
1381 +
        "2": {
1382 +
          "name": "invalid.illegal.newline.python"
1383 +
        }
1384 +
      },
1385 +
      "name": "meta.fstring.python",
1386 +
      "patterns": [
1387 +
        {
1388 +
          "include": "#fstring-guts"
1389 +
        },
1390 +
        {
1391 +
          "include": "#fstring-illegal-single-brace"
1392 +
        },
1393 +
        {
1394 +
          "include": "#fstring-single-brace"
1395 +
        },
1396 +
        {
1397 +
          "include": "#fstring-single-core"
1398 +
        }
1399 +
      ]
1400 +
    },
1401 +
    "fstring-formatting": {
1402 +
      "patterns": [
1403 +
        {
1404 +
          "include": "#fstring-formatting-braces"
1405 +
        },
1406 +
        {
1407 +
          "include": "#fstring-formatting-singe-brace"
1408 +
        }
1409 +
      ]
1410 +
    },
1411 +
    "fstring-formatting-braces": {
1412 +
      "patterns": [
1413 +
        {
1414 +
          "captures": {
1415 +
            "1": {
1416 +
              "name": "constant.character.format.placeholder.other.python"
1417 +
            },
1418 +
            "2": {
1419 +
              "name": "invalid.illegal.brace.python"
1420 +
            },
1421 +
            "3": {
1422 +
              "name": "constant.character.format.placeholder.other.python"
1423 +
            }
1424 +
          },
1425 +
          "match": "(\\{)(\\s*?)(})"
1426 +
        },
1427 +
        {
1428 +
          "match": "(\\{\\{|}})",
1429 +
          "name": "constant.character.escape.python"
1430 +
        }
1431 +
      ]
1432 +
    },
1433 +
    "fstring-formatting-singe-brace": {
1434 +
      "match": "(}(?!}))",
1435 +
      "name": "invalid.illegal.brace.python"
1436 +
    },
1437 +
    "fstring-guts": {
1438 +
      "patterns": [
1439 +
        {
1440 +
          "include": "#escape-sequence-unicode"
1441 +
        },
1442 +
        {
1443 +
          "include": "#escape-sequence"
1444 +
        },
1445 +
        {
1446 +
          "include": "#string-line-continuation"
1447 +
        },
1448 +
        {
1449 +
          "include": "#fstring-formatting"
1450 +
        }
1451 +
      ]
1452 +
    },
1453 +
    "fstring-illegal-multi-brace": {
1454 +
      "patterns": [
1455 +
        {
1456 +
          "include": "#impossible"
1457 +
        }
1458 +
      ]
1459 +
    },
1460 +
    "fstring-illegal-single-brace": {
1461 +
      "begin": "(\\{)(?=[^\\n}]*$\\n?)",
1462 +
      "beginCaptures": {
1463 +
        "1": {
1464 +
          "name": "constant.character.format.placeholder.other.python"
1465 +
        }
1466 +
      },
1467 +
      "end": "(})|(?=\\n)",
1468 +
      "endCaptures": {
1469 +
        "1": {
1470 +
          "name": "constant.character.format.placeholder.other.python"
1471 +
        }
1472 +
      },
1473 +
      "patterns": [
1474 +
        {
1475 +
          "include": "#fstring-terminator-single"
1476 +
        },
1477 +
        {
1478 +
          "include": "#f-expression"
1479 +
        }
1480 +
      ]
1481 +
    },
1482 +
    "fstring-multi-brace": {
1483 +
      "begin": "(\\{)",
1484 +
      "beginCaptures": {
1485 +
        "1": {
1486 +
          "name": "constant.character.format.placeholder.other.python"
1487 +
        }
1488 +
      },
1489 +
      "end": "(})",
1490 +
      "endCaptures": {
1491 +
        "1": {
1492 +
          "name": "constant.character.format.placeholder.other.python"
1493 +
        }
1494 +
      },
1495 +
      "patterns": [
1496 +
        {
1497 +
          "include": "#fstring-terminator-multi"
1498 +
        },
1499 +
        {
1500 +
          "include": "#f-expression"
1501 +
        }
1502 +
      ]
1503 +
    },
1504 +
    "fstring-multi-core": {
1505 +
      "match": "(.+?)($(\\n?)|(?=[\\\\{}]|'''|\"\"\"))|\\n",
1506 +
      "name": "string.interpolated.python string.quoted.multi.python"
1507 +
    },
1508 +
    "fstring-normf-quoted-multi-line": {
1509 +
      "begin": "\\b([BUbu])([Ff])('''|\"\"\")",
1510 +
      "beginCaptures": {
1511 +
        "1": {
1512 +
          "name": "invalid.illegal.prefix.python"
1513 +
        },
1514 +
        "2": {
1515 +
          "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
1516 +
        },
1517 +
        "3": {
1518 +
          "name": "punctuation.definition.string.begin.python string.quoted.multi.python"
1519 +
        }
1520 +
      },
1521 +
      "end": "(\\3)",
1522 +
      "endCaptures": {
1523 +
        "1": {
1524 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
1525 +
        },
1526 +
        "2": {
1527 +
          "name": "invalid.illegal.newline.python"
1528 +
        }
1529 +
      },
1530 +
      "name": "meta.fstring.python",
1531 +
      "patterns": [
1532 +
        {
1533 +
          "include": "#fstring-guts"
1534 +
        },
1535 +
        {
1536 +
          "include": "#fstring-illegal-multi-brace"
1537 +
        },
1538 +
        {
1539 +
          "include": "#fstring-multi-brace"
1540 +
        },
1541 +
        {
1542 +
          "include": "#fstring-multi-core"
1543 +
        }
1544 +
      ]
1545 +
    },
1546 +
    "fstring-normf-quoted-single-line": {
1547 +
      "begin": "\\b([BUbu])([Ff])(([\"']))",
1548 +
      "beginCaptures": {
1549 +
        "1": {
1550 +
          "name": "invalid.illegal.prefix.python"
1551 +
        },
1552 +
        "2": {
1553 +
          "name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
1554 +
        },
1555 +
        "3": {
1556 +
          "name": "punctuation.definition.string.begin.python string.quoted.single.python"
1557 +
        }
1558 +
      },
1559 +
      "end": "(\\3)|((?<!\\\\)\\n)",
1560 +
      "endCaptures": {
1561 +
        "1": {
1562 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
1563 +
        },
1564 +
        "2": {
1565 +
          "name": "invalid.illegal.newline.python"
1566 +
        }
1567 +
      },
1568 +
      "name": "meta.fstring.python",
1569 +
      "patterns": [
1570 +
        {
1571 +
          "include": "#fstring-guts"
1572 +
        },
1573 +
        {
1574 +
          "include": "#fstring-illegal-single-brace"
1575 +
        },
1576 +
        {
1577 +
          "include": "#fstring-single-brace"
1578 +
        },
1579 +
        {
1580 +
          "include": "#fstring-single-core"
1581 +
        }
1582 +
      ]
1583 +
    },
1584 +
    "fstring-raw-guts": {
1585 +
      "patterns": [
1586 +
        {
1587 +
          "include": "#string-consume-escape"
1588 +
        },
1589 +
        {
1590 +
          "include": "#fstring-formatting"
1591 +
        }
1592 +
      ]
1593 +
    },
1594 +
    "fstring-raw-multi-core": {
1595 +
      "match": "(.+?)($(\\n?)|(?=[\\\\{}]|'''|\"\"\"))|\\n",
1596 +
      "name": "string.interpolated.python string.quoted.raw.multi.python"
1597 +
    },
1598 +
    "fstring-raw-quoted-multi-line": {
1599 +
      "begin": "\\b([Rr][Ff]|[Ff][Rr])('''|\"\"\")",
1600 +
      "beginCaptures": {
1601 +
        "1": {
1602 +
          "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python"
1603 +
        },
1604 +
        "2": {
1605 +
          "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python"
1606 +
        }
1607 +
      },
1608 +
      "end": "(\\2)",
1609 +
      "endCaptures": {
1610 +
        "1": {
1611 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python"
1612 +
        },
1613 +
        "2": {
1614 +
          "name": "invalid.illegal.newline.python"
1615 +
        }
1616 +
      },
1617 +
      "name": "meta.fstring.python",
1618 +
      "patterns": [
1619 +
        {
1620 +
          "include": "#fstring-raw-guts"
1621 +
        },
1622 +
        {
1623 +
          "include": "#fstring-illegal-multi-brace"
1624 +
        },
1625 +
        {
1626 +
          "include": "#fstring-multi-brace"
1627 +
        },
1628 +
        {
1629 +
          "include": "#fstring-raw-multi-core"
1630 +
        }
1631 +
      ]
1632 +
    },
1633 +
    "fstring-raw-quoted-single-line": {
1634 +
      "begin": "\\b([Rr][Ff]|[Ff][Rr])(([\"']))",
1635 +
      "beginCaptures": {
1636 +
        "1": {
1637 +
          "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python"
1638 +
        },
1639 +
        "2": {
1640 +
          "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python"
1641 +
        }
1642 +
      },
1643 +
      "end": "(\\2)|((?<!\\\\)\\n)",
1644 +
      "endCaptures": {
1645 +
        "1": {
1646 +
          "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python"
1647 +
        },
1648 +
        "2": {
1649 +
          "name": "invalid.illegal.newline.python"
1650 +
        }
1651 +
      },
1652 +
      "name": "meta.fstring.python",
1653 +
      "patterns": [
1654 +
        {
1655 +
          "include": "#fstring-raw-guts"
1656 +
        },
1657 +
        {
1658 +
          "include": "#fstring-illegal-single-brace"
1659 +
        },
1660 +
        {
1661 +
          "include": "#fstring-single-brace"
1662 +
        },
1663 +
        {
1664 +
          "include": "#fstring-raw-single-core"
1665 +
        }
1666 +
      ]
1667 +
    },
1668 +
    "fstring-raw-single-core": {
1669 +
      "match": "(.+?)($(\\n?)|(?=[\\\\{}]|([\"'])|((?<!\\\\)\\n)))|\\n",
1670 +
      "name": "string.interpolated.python string.quoted.raw.single.python"
1671 +
    },
1672 +
    "fstring-single-brace": {
1673 +
      "begin": "(\\{)",
1674 +
      "beginCaptures": {
1675 +
        "1": {
1676 +
          "name": "constant.character.format.placeholder.other.python"
1677 +
        }
1678 +
      },
1679 +
      "end": "(})|(?=\\n)",
1680 +
      "endCaptures": {
1681 +
        "1": {
1682 +
          "name": "constant.character.format.placeholder.other.python"
1683 +
        }
1684 +
      },
1685 +
      "patterns": [
1686 +
        {
1687 +
          "include": "#fstring-terminator-single"
1688 +
        },
1689 +
        {
1690 +
          "include": "#f-expression"
1691 +
        }
1692 +
      ]
1693 +
    },
1694 +
    "fstring-single-core": {
1695 +
      "match": "(.+?)($(\\n?)|(?=[\\\\{}]|([\"'])|((?<!\\\\)\\n)))|\\n",
1696 +
      "name": "string.interpolated.python string.quoted.single.python"
1697 +
    },
1698 +
    "fstring-terminator-multi": {
1699 +
      "patterns": [
1700 +
        {
1701 +
          "match": "(=(![ars])?)(?=})",
1702 +
          "name": "storage.type.format.python"
1703 +
        },
1704 +
        {
1705 +
          "match": "(=?![ars])(?=})",
1706 +
          "name": "storage.type.format.python"
1707 +
        },
1708 +
        {
1709 +
          "captures": {
1710 +
            "1": {
1711 +
              "name": "storage.type.format.python"
1712 +
            },
1713 +
            "2": {
1714 +
              "name": "storage.type.format.python"
1715 +
            }
1716 +
          },
1717 +
          "match": "(=?(?:![ars])?)(:\\w?[<=>^]?[- +]?#?\\d*,?(\\.\\d+)?[%EFGXb-gnosx]?)(?=})"
1718 +
        },
1719 +
        {
1720 +
          "include": "#fstring-terminator-multi-tail"
1721 +
        }
1722 +
      ]
1723 +
    },
1724 +
    "fstring-terminator-multi-tail": {
1725 +
      "begin": "(=?(?:![ars])?)(:)(?=.*?\\{)",
1726 +
      "beginCaptures": {
1727 +
        "1": {
1728 +
          "name": "storage.type.format.python"
1729 +
        },
1730 +
        "2": {
1731 +
          "name": "storage.type.format.python"
1732 +
        }
1733 +
      },
1734 +
      "end": "(?=})",
1735 +
      "patterns": [
1736 +
        {
1737 +
          "include": "#fstring-illegal-multi-brace"
1738 +
        },
1739 +
        {
1740 +
          "include": "#fstring-multi-brace"
1741 +
        },
1742 +
        {
1743 +
          "match": "([%EFGXb-gnosx])(?=})",
1744 +
          "name": "storage.type.format.python"
1745 +
        },
1746 +
        {
1747 +
          "match": "(\\.\\d+)",
1748 +
          "name": "storage.type.format.python"
1749 +
        },
1750 +
        {
1751 +
          "match": "(,)",
1752 +
          "name": "storage.type.format.python"
1753 +
        },
1754 +
        {
1755 +
          "match": "(\\d+)",
1756 +
          "name": "storage.type.format.python"
1757 +
        },
1758 +
        {
1759 +
          "match": "(#)",
1760 +
          "name": "storage.type.format.python"
1761 +
        },
1762 +
        {
1763 +
          "match": "([- +])",
1764 +
          "name": "storage.type.format.python"
1765 +
        },
1766 +
        {
1767 +
          "match": "([<=>^])",
1768 +
          "name": "storage.type.format.python"
1769 +
        },
1770 +
        {
1771 +
          "match": "(\\w)",
1772 +
          "name": "storage.type.format.python"
1773 +
        }
1774 +
      ]
1775 +
    },
1776 +
    "fstring-terminator-single": {
1777 +
      "patterns": [
1778 +
        {
1779 +
          "match": "(=(![ars])?)(?=})",
1780 +
          "name": "storage.type.format.python"
1781 +
        },
1782 +
        {
1783 +
          "match": "(=?![ars])(?=})",
1784 +
          "name": "storage.type.format.python"
1785 +
        },
1786 +
        {
1787 +
          "captures": {
1788 +
            "1": {
1789 +
              "name": "storage.type.format.python"
1790 +
            },
1791 +
            "2": {
1792 +
              "name": "storage.type.format.python"
1793 +
            }
1794 +
          },
1795 +
          "match": "(=?(?:![ars])?)(:\\w?[<=>^]?[- +]?#?\\d*,?(\\.\\d+)?[%EFGXb-gnosx]?)(?=})"
1796 +
        },
1797 +
        {
1798 +
          "include": "#fstring-terminator-single-tail"
1799 +
        }
1800 +
      ]
1801 +
    },
1802 +
    "fstring-terminator-single-tail": {
1803 +
      "begin": "(=?(?:![ars])?)(:)(?=.*?\\{)",
1804 +
      "beginCaptures": {
1805 +
        "1": {
1806 +
          "name": "storage.type.format.python"
1807 +
        },
1808 +
        "2": {
1809 +
          "name": "storage.type.format.python"
1810 +
        }
1811 +
      },
1812 +
      "end": "(?=})|(?=\\n)",
1813 +
      "patterns": [
1814 +
        {
1815 +
          "include": "#fstring-illegal-single-brace"
1816 +
        },
1817 +
        {
1818 +
          "include": "#fstring-single-brace"
1819 +
        },
1820 +
        {
1821 +
          "match": "([%EFGXb-gnosx])(?=})",
1822 +
          "name": "storage.type.format.python"
1823 +
        },
1824 +
        {
1825 +
          "match": "(\\.\\d+)",
1826 +
          "name": "storage.type.format.python"
1827 +
        },
1828 +
        {
1829 +
          "match": "(,)",
1830 +
          "name": "storage.type.format.python"
1831 +
        },
1832 +
        {
1833 +
          "match": "(\\d+)",
1834 +
          "name": "storage.type.format.python"
1835 +
        },
1836 +
        {
1837 +
          "match": "(#)",
1838 +
          "name": "storage.type.format.python"
1839 +
        },
1840 +
        {
1841 +
          "match": "([- +])",
1842 +
          "name": "storage.type.format.python"
1843 +
        },
1844 +
        {
1845 +
          "match": "([<=>^])",
1846 +
          "name": "storage.type.format.python"
1847 +
        },
1848 +
        {
1849 +
          "match": "(\\w)",
1850 +
          "name": "storage.type.format.python"
1851 +
        }
1852 +
      ]
1853 +
    },
1854 +
    "function-arguments": {
1855 +
      "begin": "(\\()",
1856 +
      "beginCaptures": {
1857 +
        "1": {
1858 +
          "name": "punctuation.definition.arguments.begin.python"
1859 +
        }
1860 +
      },
1861 +
      "contentName": "meta.function-call.arguments.python",
1862 +
      "end": "(?=\\))(?!\\)\\s*\\()",
1863 +
      "patterns": [
1864 +
        {
1865 +
          "match": "(,)",
1866 +
          "name": "punctuation.separator.arguments.python"
1867 +
        },
1868 +
        {
1869 +
          "captures": {
1870 +
            "1": {
1871 +
              "name": "keyword.operator.unpacking.arguments.python"
1872 +
            }
1873 +
          },
1874 +
          "match": "(?:(?<=[(,])|^)\\s*(\\*{1,2})"
1875 +
        },
1876 +
        {
1877 +
          "include": "#lambda-incomplete"
1878 +
        },
1879 +
        {
1880 +
          "include": "#illegal-names"
1881 +
        },
1882 +
        {
1883 +
          "captures": {
1884 +
            "1": {
1885 +
              "name": "variable.parameter.function-call.python"
1886 +
            },
1887 +
            "2": {
1888 +
              "name": "keyword.operator.assignment.python"
1889 +
            }
1890 +
          },
1891 +
          "match": "\\b([_[:alpha:]]\\w*)\\s*(=)(?!=)"
1892 +
        },
1893 +
        {
1894 +
          "match": "=(?!=)",
1895 +
          "name": "keyword.operator.assignment.python"
1896 +
        },
1897 +
        {
1898 +
          "include": "#expression"
1899 +
        },
1900 +
        {
1901 +
          "captures": {
1902 +
            "1": {
1903 +
              "name": "punctuation.definition.arguments.end.python"
1904 +
            },
1905 +
            "2": {
1906 +
              "name": "punctuation.definition.arguments.begin.python"
1907 +
            }
1908 +
          },
1909 +
          "match": "\\s*(\\))\\s*(\\()"
1910 +
        }
1911 +
      ]
1912 +
    },
1913 +
    "function-call": {
1914 +
      "begin": "\\b(?=([_[:alpha:]]\\w*)\\s*(\\())",
1915 +
      "end": "(\\))",
1916 +
      "endCaptures": {
1917 +
        "1": {
1918 +
          "name": "punctuation.definition.arguments.end.python"
1919 +
        }
1920 +
      },
1921 +
      "name": "meta.function-call.python",
1922 +
      "patterns": [
1923 +
        {
1924 +
          "include": "#special-variables"
1925 +
        },
1926 +
        {
1927 +
          "include": "#function-name"
1928 +
        },
1929 +
        {
1930 +
          "include": "#function-arguments"
1931 +
        }
1932 +
      ]
1933 +
    },
1934 +
    "function-declaration": {
1935 +
      "begin": "\\s*(?:\\b(async)\\s+)?\\b(def)\\s+(?=[_[:alpha:]]\\p{word}*\\s*\\()",
1936 +
      "beginCaptures": {
1937 +
        "1": {
1938 +
          "name": "storage.type.function.async.python"
1939 +
        },
1940 +
        "2": {
1941 +
          "name": "storage.type.function.python"
1942 +
        }
1943 +
      },
1944 +
      "end": "(:|(?=[\\n\"#']))",
1945 +
      "endCaptures": {
1946 +
        "1": {
1947 +
          "name": "punctuation.section.function.begin.python"
1948 +
        }
1949 +
      },
1950 +
      "name": "meta.function.python",
1951 +
      "patterns": [
1952 +
        {
1953 +
          "include": "#function-def-name"
1954 +
        },
1955 +
        {
1956 +
          "include": "#parameters"
1957 +
        },
1958 +
        {
1959 +
          "include": "#line-continuation"
1960 +
        },
1961 +
        {
1962 +
          "include": "#return-annotation"
1963 +
        }
1964 +
      ]
1965 +
    },
1966 +
    "function-def-name": {
1967 +
      "patterns": [
1968 +
        {
1969 +
          "include": "#illegal-object-name"
1970 +
        },
1971 +
        {
1972 +
          "include": "#builtin-possible-callables"
1973 +
        },
1974 +
        {
1975 +
          "match": "\\b([_[:alpha:]]\\w*)\\b",
1976 +
          "name": "entity.name.function.python"
1977 +
        }
1978 +
      ]
1979 +
    },
1980 +
    "function-name": {
1981 +
      "patterns": [
1982 +
        {
1983 +
          "include": "#builtin-possible-callables"
1984 +
        },
1985 +
        {
1986 +
          "match": "\\b([_[:alpha:]]\\w*)\\b",
1987 +
          "name": "meta.function-call.generic.python"
1988 +
        }
1989 +
      ]
1990 +
    },
1991 +
    "generator": {
1992 +
      "begin": "\\bfor\\b",
1993 +
      "beginCaptures": {
1994 +
        "0": {
1995 +
          "name": "keyword.control.flow.python"
1996 +
        }
1997 +
      },
1998 +
      "end": "\\bin\\b",
1999 +
      "endCaptures": {
2000 +
        "0": {
2001 +
          "name": "keyword.control.flow.python"
2002 +
        }
2003 +
      },
2004 +
      "patterns": [
2005 +
        {
2006 +
          "include": "#expression"
2007 +
        }
2008 +
      ]
2009 +
    },
2010 +
    "illegal-anno": {
2011 +
      "match": "->",
2012 +
      "name": "invalid.illegal.annotation.python"
2013 +
    },
2014 +
    "illegal-names": {
2015 +
      "captures": {
2016 +
        "1": {
2017 +
          "name": "keyword.control.flow.python"
2018 +
        },
2019 +
        "2": {
2020 +
          "name": "keyword.control.import.python"
2021 +
        }
2022 +
      },
2023 +
      "match": "\\b(?:(and|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|in|is|(?<=\\.)lambda|lambda(?=\\s*[.=])|nonlocal|not|or|pass|raise|return|try|while|with|yield)|(as|import))\\b"
2024 +
    },
2025 +
    "illegal-object-name": {
2026 +
      "match": "\\b(True|False|None)\\b",
2027 +
      "name": "keyword.illegal.name.python"
2028 +
    },
2029 +
    "illegal-operator": {
2030 +
      "patterns": [
2031 +
        {
2032 +
          "match": "&&|\\|\\||--|\\+\\+",
2033 +
          "name": "invalid.illegal.operator.python"
2034 +
        },
2035 +
        {
2036 +
          "match": "[$?]",
2037 +
          "name": "invalid.illegal.operator.python"
2038 +
        },
2039 +
        {
2040 +
          "match": "!\\b",
2041 +
          "name": "invalid.illegal.operator.python"
2042 +
        }
2043 +
      ]
2044 +
    },
2045 +
    "import": {
2046 +
      "patterns": [
2047 +
        {
2048 +
          "begin": "\\b(?<!\\.)(from)\\b(?=.+import)",
2049 +
          "beginCaptures": {
2050 +
            "1": {
2051 +
              "name": "keyword.control.import.python"
2052 +
            }
2053 +
          },
2054 +
          "end": "$|(?=import)",
2055 +
          "patterns": [
2056 +
            {
2057 +
              "match": "\\.+",
2058 +
              "name": "punctuation.separator.period.python"
2059 +
            },
2060 +
            {
2061 +
              "include": "#expression"
2062 +
            }
2063 +
          ]
2064 +
        },
2065 +
        {
2066 +
          "begin": "\\b(?<!\\.)(import)\\b",
2067 +
          "beginCaptures": {
2068 +
            "1": {
2069 +
              "name": "keyword.control.import.python"
2070 +
            }
2071 +
          },
2072 +
          "end": "$",
2073 +
          "patterns": [
2074 +
            {
2075 +
              "match": "\\b(?<!\\.)as\\b",
2076 +
              "name": "keyword.control.import.python"
2077 +
            },
2078 +
            {
2079 +
              "include": "#expression"
2080 +
            }
2081 +
          ]
2082 +
        }
2083 +
      ]
2084 +
    },
2085 +
    "impossible": {
2086 +
      "match": "$.^"
2087 +
    },
2088 +
    "inheritance-identifier": {
2089 +
      "captures": {
2090 +
        "1": {
2091 +
          "name": "entity.other.inherited-class.python"
2092 +
        }
2093 +
      },
2094 +
      "match": "\\b([_[:alpha:]]\\w*)\\b"
2095 +
    },
2096 +
    "inheritance-name": {
2097 +
      "patterns": [
2098 +
        {
2099 +
          "include": "#lambda-incomplete"
2100 +
        },
2101 +
        {
2102 +
          "include": "#builtin-possible-callables"
2103 +
        },
2104 +
        {
2105 +
          "include": "#inheritance-identifier"
2106 +
        }
2107 +
      ]
2108 +
    },
2109 +
    "item-access": {
2110 +
      "patterns": [
2111 +
        {
2112 +
          "begin": "\\b(?=[_[:alpha:]]\\w*\\s*\\[)",
2113 +
          "end": "(])",
2114 +
          "endCaptures": {
2115 +
            "1": {
2116 +
              "name": "punctuation.definition.arguments.end.python"
2117 +
            }
2118 +
          },
2119 +
          "name": "meta.item-access.python",
2120 +
          "patterns": [
2121 +
            {
2122 +
              "include": "#item-name"
2123 +
            },
2124 +
            {
2125 +
              "include": "#item-index"
2126 +
            },
2127 +
            {
2128 +
              "include": "#expression"
2129 +
            }
2130 +
          ]
2131 +
        }
2132 +
      ]
2133 +
    },
2134 +
    "item-index": {
2135 +
      "begin": "(\\[)",
2136 +
      "beginCaptures": {
2137 +
        "1": {
2138 +
          "name": "punctuation.definition.arguments.begin.python"
2139 +
        }
2140 +
      },
2141 +
      "contentName": "meta.item-access.arguments.python",
2142 +
      "end": "(?=])",
2143 +
      "patterns": [
2144 +
        {
2145 +
          "match": ":",
2146 +
          "name": "punctuation.separator.slice.python"
2147 +
        },
2148 +
        {
2149 +
          "include": "#expression"
2150 +
        }
2151 +
      ]
2152 +
    },
2153 +
    "item-name": {
2154 +
      "patterns": [
2155 +
        {
2156 +
          "include": "#special-variables"
2157 +
        },
2158 +
        {
2159 +
          "include": "#builtin-functions"
2160 +
        },
2161 +
        {
2162 +
          "include": "#special-names"
2163 +
        },
2164 +
        {
2165 +
          "match": "\\b([_[:alpha:]]\\w*)\\b",
2166 +
          "name": "meta.indexed-name.python"
2167 +
        }
2168 +
      ]
2169 +
    },
2170 +
    "lambda": {
2171 +
      "patterns": [
2172 +
        {
2173 +
          "captures": {
2174 +
            "1": {
2175 +
              "name": "keyword.control.flow.python"
2176 +
            }
2177 +
          },
2178 +
          "match": "((?<=\\.)lambda|lambda(?=\\s*[.=]))"
2179 +
        },
2180 +
        {
2181 +
          "captures": {
2182 +
            "1": {
2183 +
              "name": "storage.type.function.lambda.python"
2184 +
            }
2185 +
          },
2186 +
          "match": "\\b(lambda)\\s*?(?=[\\n,]|$)"
2187 +
        },
2188 +
        {
2189 +
          "begin": "\\b(lambda)\\b",
2190 +
          "beginCaptures": {
2191 +
            "1": {
2192 +
              "name": "storage.type.function.lambda.python"
2193 +
            }
2194 +
          },
2195 +
          "contentName": "meta.function.lambda.parameters.python",
2196 +
          "end": "(:)|(\\n)",
2197 +
          "endCaptures": {
2198 +
            "1": {
2199 +
              "name": "punctuation.section.function.lambda.begin.python"
2200 +
            }
2201 +
          },
2202 +
          "name": "meta.lambda-function.python",
2203 +
          "patterns": [
2204 +
            {
2205 +
              "match": "/",
2206 +
              "name": "keyword.operator.positional.parameter.python"
2207 +
            },
2208 +
            {
2209 +
              "match": "(\\*\\*?)",
2210 +
              "name": "keyword.operator.unpacking.parameter.python"
2211 +
            },
2212 +
            {
2213 +
              "include": "#lambda-nested-incomplete"
2214 +
            },
2215 +
            {
2216 +
              "include": "#illegal-names"
2217 +
            },
2218 +
            {
2219 +
              "captures": {
2220 +
                "1": {
2221 +
                  "name": "variable.parameter.function.language.python"
2222 +
                },
2223 +
                "2": {
2224 +
                  "name": "punctuation.separator.parameters.python"
2225 +
                }
2226 +
              },
2227 +
              "match": "([_[:alpha:]]\\w*)\\s*(?:(,)|(?=:|$))"
2228 +
            },
2229 +
            {
2230 +
              "include": "#comments"
2231 +
            },
2232 +
            {
2233 +
              "include": "#backticks"
2234 +
            },
2235 +
            {
2236 +
              "include": "#illegal-anno"
2237 +
            },
2238 +
            {
2239 +
              "include": "#lambda-parameter-with-default"
2240 +
            },
2241 +
            {
2242 +
              "include": "#line-continuation"
2243 +
            },
2244 +
            {
2245 +
              "include": "#illegal-operator"
2246 +
            }
2247 +
          ]
2248 +
        }
2249 +
      ]
2250 +
    },
2251 +
    "lambda-incomplete": {
2252 +
      "match": "\\blambda(?=\\s*[),])",
2253 +
      "name": "storage.type.function.lambda.python"
2254 +
    },
2255 +
    "lambda-nested-incomplete": {
2256 +
      "match": "\\blambda(?=\\s*[),:])",
2257 +
      "name": "storage.type.function.lambda.python"
2258 +
    },
2259 +
    "lambda-parameter-with-default": {
2260 +
      "begin": "\\b([_[:alpha:]]\\w*)\\s*(=)",
2261 +
      "beginCaptures": {
2262 +
        "1": {
2263 +
          "name": "variable.parameter.function.language.python"
2264 +
        },
2265 +
        "2": {
2266 +
          "name": "keyword.operator.python"
2267 +
        }
2268 +
      },
2269 +
      "end": "(,)|(?=:|$)",
2270 +
      "endCaptures": {
2271 +
        "1": {
2272 +
          "name": "punctuation.separator.parameters.python"
2273 +
        }
2274 +
      },
2275 +
      "patterns": [
2276 +
        {
2277 +
          "include": "#expression"
2278 +
        }
2279 +
      ]
2280 +
    },
2281 +
    "line-continuation": {
2282 +
      "patterns": [
2283 +
        {
2284 +
          "captures": {
2285 +
            "1": {
2286 +
              "name": "punctuation.separator.continuation.line.python"
2287 +
            },
2288 +
            "2": {
2289 +
              "name": "invalid.illegal.line.continuation.python"
2290 +
            }
2291 +
          },
2292 +
          "match": "(\\\\)\\s*(\\S.*$\\n?)"
2293 +
        },
2294 +
        {
2295 +
          "begin": "(\\\\)\\s*$\\n?",
2296 +
          "beginCaptures": {
2297 +
            "1": {
2298 +
              "name": "punctuation.separator.continuation.line.python"
2299 +
            }
2300 +
          },
2301 +
          "end": "(?=^\\s*$)|(?!(\\s*[Rr]?('''|\"\"\"|[\"']))|\\G()$)",
2302 +
          "patterns": [
2303 +
            {
2304 +
              "include": "#regexp"
2305 +
            },
2306 +
            {
2307 +
              "include": "#string"
2308 +
            }
2309 +
          ]
2310 +
        }
2311 +
      ]
2312 +
    },
2313 +
    "list": {
2314 +
      "begin": "\\[",
2315 +
      "beginCaptures": {
2316 +
        "0": {
2317 +
          "name": "punctuation.definition.list.begin.python"
2318 +
        }
2319 +
      },
2320 +
      "end": "]",
2321 +
      "endCaptures": {
2322 +
        "0": {
2323 +
          "name": "punctuation.definition.list.end.python"
2324 +
        }
2325 +
      },
2326 +
      "patterns": [
2327 +
        {
2328 +
          "include": "#expression"
2329 +
        }
2330 +
      ]
2331 +
    },
2332 +
    "literal": {
2333 +
      "patterns": [
2334 +
        {
2335 +
          "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b",
2336 +
          "name": "constant.language.python"
2337 +
        },
2338 +
        {
2339 +
          "include": "#number"
2340 +
        }
2341 +
      ]
2342 +
    },
2343 +
    "loose-default": {
2344 +
      "begin": "(=)",
2345 +
      "beginCaptures": {
2346 +
        "1": {
2347 +
          "name": "keyword.operator.python"
2348 +
        }
2349 +
      },
2350 +
      "end": "(,)|(?=\\))",
2351 +
      "endCaptures": {
2352 +
        "1": {
2353 +
          "name": "punctuation.separator.parameters.python"
2354 +
        }
2355 +
      },
2356 +
      "patterns": [
2357 +
        {
2358 +
          "include": "#expression"
2359 +
        }
2360 +
      ]
2361 +
    },
2362 +
    "magic-function-names": {
2363 +
      "captures": {
2364 +
        "1": {
2365 +
          "name": "support.function.magic.python"
2366 +
        }
2367 +
      },
2368 +
      "match": "\\b(__(?:abs|add|aenter|aexit|aiter|and|anext|await|bool|call|ceil|class_getitem|cmp|coerce|complex|contains|copy|deepcopy|del|delattr|delete|delitem|delslice|dir|div|divmod|enter|eq|exit|float|floor|floordiv|format|get??|getattr|getattribute|getinitargs|getitem|getnewargs|getslice|getstate|gt|hash|hex|iadd|iand|idiv|ifloordiv||ilshift|imod|imul|index|init|instancecheck|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|len??|long|lshift|lt|missing|mod|mul|neg??|new|next|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|reduce|reduce_ex|repr|reversed|rfloordiv||rlshift|rmod|rmul|ror|round|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|set_name|setslice|setstate|sizeof|str|sub|subclasscheck|truediv|trunc|unicode|xor|matmul|rmatmul|imatmul|init_subclass|set_name|fspath|bytes|prepare|length_hint)__)\\b"
2369 +
    },
2370 +
    "magic-names": {
2371 +
      "patterns": [
2372 +
        {
2373 +
          "include": "#magic-function-names"
2374 +
        },
2375 +
        {
2376 +
          "include": "#magic-variable-names"
2377 +
        }
2378 +
      ]
2379 +
    },
2380 +
    "magic-variable-names": {
2381 +
      "captures": {
2382 +
        "1": {
2383 +
          "name": "support.variable.magic.python"
2384 +
        }
2385 +
      },
2386 +
      "match": "\\b(__(?:all|annotations|bases|builtins|class|closure|code|debug|defaults|dict|doc|file|func|globals|kwdefaults|match_args|members|metaclass|methods|module|mro|mro_entries|name|qualname|post_init|self|signature|slots|subclasses|version|weakref|wrapped|classcell|spec|path|package|future|traceback)__)\\b"
2387 +
    },
2388 +
    "member-access": {
2389 +
      "begin": "(\\.)\\s*(?!\\.)",
2390 +
      "beginCaptures": {
2391 +
        "1": {
2392 +
          "name": "punctuation.separator.period.python"
2393 +
        }
2394 +
      },
2395 +
      "end": "(?<=\\S)(?=\\W)|(^|(?<=\\s))(?=[^\\\\\\w\\s])|$",
2396 +
      "name": "meta.member.access.python",
2397 +
      "patterns": [
2398 +
        {
2399 +
          "include": "#function-call"
2400 +
        },
2401 +
        {
2402 +
          "include": "#member-access-base"
2403 +
        },
2404 +
        {
2405 +
          "include": "#member-access-attribute"
2406 +
        }
2407 +
      ]
2408 +
    },
2409 +
    "member-access-attribute": {
2410 +
      "match": "\\b([_[:alpha:]]\\w*)\\b",
2411 +
      "name": "meta.attribute.python"
2412 +
    },
2413 +
    "member-access-base": {
2414 +
      "patterns": [
2415 +
        {
2416 +
          "include": "#magic-names"
2417 +
        },
2418 +
        {
2419 +
          "include": "#illegal-names"
2420 +
        },
2421 +
        {
2422 +
          "include": "#illegal-object-name"
2423 +
        },
2424 +
        {
2425 +
          "include": "#special-names"
2426 +
        },
2427 +
        {
2428 +
          "include": "#line-continuation"
2429 +
        },
2430 +
        {
2431 +
          "include": "#item-access"
2432 +
        }
2433 +
      ]
2434 +
    },
2435 +
    "member-access-class": {
2436 +
      "begin": "(\\.)\\s*(?!\\.)",
2437 +
      "beginCaptures": {
2438 +
        "1": {
2439 +
          "name": "punctuation.separator.period.python"
2440 +
        }
2441 +
      },
2442 +
      "end": "(?<=\\S)(?=\\W)|$",
2443 +
      "name": "meta.member.access.python",
2444 +
      "patterns": [
2445 +
        {
2446 +
          "include": "#call-wrapper-inheritance"
2447 +
        },
2448 +
        {
2449 +
          "include": "#member-access-base"
2450 +
        },
2451 +
        {
2452 +
          "include": "#inheritance-identifier"
2453 +
        }
2454 +
      ]
2455 +
    },
2456 +
    "number": {
2457 +
      "name": "constant.numeric.python",
2458 +
      "patterns": [
2459 +
        {
2460 +
          "include": "#number-float"
2461 +
        },
2462 +
        {
2463 +
          "include": "#number-dec"
2464 +
        },
2465 +
        {
2466 +
          "include": "#number-hex"
2467 +
        },
2468 +
        {
2469 +
          "include": "#number-oct"
2470 +
        },
2471 +
        {
2472 +
          "include": "#number-bin"
2473 +
        },
2474 +
        {
2475 +
          "include": "#number-long"
2476 +
        },
2477 +
        {
2478 +
          "match": "\\b[0-9]+\\w+",
2479 +
          "name": "invalid.illegal.name.python"
2480 +
        }
2481 +
      ]
2482 +
    },
2483 +
    "number-bin": {
2484 +
      "captures": {
2485 +
        "1": {
2486 +
          "name": "storage.type.number.python"
2487 +
        }
2488 +
      },
2489 +
      "match": "(?<![.\\w])(0[Bb])(_?[01])+\\b",
2490 +
      "name": "constant.numeric.bin.python"
2491 +
    },
2492 +
    "number-dec": {
2493 +
      "captures": {
2494 +
        "1": {
2495 +
          "name": "storage.type.imaginary.number.python"
2496 +
        },
2497 +
        "2": {
2498 +
          "name": "invalid.illegal.dec.python"
2499 +
        }
2500 +
      },
2501 +
      "match": "(?<![.\\w])(?:[1-9](?:_?[0-9])*|0+|[0-9](?:_?[0-9])*([Jj])|0([0-9]+)(?![.Ee]))\\b",
2502 +
      "name": "constant.numeric.dec.python"
2503 +
    },
2504 +
    "number-float": {
2505 +
      "captures": {
2506 +
        "1": {
2507 +
          "name": "storage.type.imaginary.number.python"
2508 +
        }
2509 +
      },
2510 +
      "match": "(?<!\\w)(?:(?:\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.)(?:[Ee][-+]?[0-9](?:_?[0-9])*)?|[0-9](?:_?[0-9])*[Ee][-+]?[0-9](?:_?[0-9])*)([Jj])?\\b",
2511 +
      "name": "constant.numeric.float.python"
2512 +
    },
2513 +
    "number-hex": {
2514 +
      "captures": {
2515 +
        "1": {
2516 +
          "name": "storage.type.number.python"
2517 +
        }
2518 +
      },
2519 +
      "match": "(?<![.\\w])(0[Xx])(_?\\h)+\\b",
2520 +
      "name": "constant.numeric.hex.python"
2521 +
    },
2522 +
    "number-long": {
2523 +
      "captures": {
2524 +
        "2": {
2525 +
          "name": "storage.type.number.python"
2526 +
        }
2527 +
      },
2528 +
      "match": "(?<![.\\w])([1-9][0-9]*|0)([Ll])\\b",
2529 +
      "name": "constant.numeric.bin.python"
2530 +
    },
2531 +
    "number-oct": {
2532 +
      "captures": {
2533 +
        "1": {
2534 +
          "name": "storage.type.number.python"
2535 +
        }
2536 +
      },
2537 +
      "match": "(?<![.\\w])(0[Oo])(_?[0-7])+\\b",
2538 +
      "name": "constant.numeric.oct.python"
2539 +
    },
2540 +
    "odd-function-call": {
2541 +
      "begin": "(?<=[])])\\s*(?=\\()",
2542 +
      "end": "(\\))",
2543 +
      "endCaptures": {
2544 +
        "1": {
2545 +
          "name": "punctuation.definition.arguments.end.python"
2546 +
        }
2547 +
      },
2548 +
      "patterns": [
2549 +
        {
2550 +
          "include": "#function-arguments"
2551 +
        }
2552 +
      ]
2553 +
    },
2554 +
    "operator": {
2555 +
      "captures": {
2556 +
        "1": {
2557 +
          "name": "keyword.operator.logical.python"
2558 +
        },
2559 +
        "2": {
2560 +
          "name": "keyword.control.flow.python"
2561 +
        },
2562 +
        "3": {
2563 +
          "name": "keyword.operator.bitwise.python"
2564 +
        },
2565 +
        "4": {
2566 +
          "name": "keyword.operator.arithmetic.python"
2567 +
        },
2568 +
        "5": {
2569 +
          "name": "keyword.operator.comparison.python"
2570 +
        },
2571 +
        "6": {
2572 +
          "name": "keyword.operator.assignment.python"
2573 +
        }
2574 +
      },
2575 +
      "match": "\\b(?<!\\.)(?:(and|or|not|in|is)|(for|if|else|await|yield(?:\\s+from)?))(?!\\s*:)\\b|(<<|>>|[\\&^|~])|(\\*\\*|[-%*+]|//|[/@])|(!=|==|>=|<=|[<>])|(:=)"
2576 +
    },
2577 +
    "parameter-special": {
2578 +
      "captures": {
2579 +
        "1": {
2580 +
          "name": "variable.parameter.function.language.python"
2581 +
        },
2582 +
        "2": {
2583 +
          "name": "variable.parameter.function.language.special.self.python"
2584 +
        },
2585 +
        "3": {
2586 +
          "name": "variable.parameter.function.language.special.cls.python"
2587 +
        },
2588 +
        "4": {
2589 +
          "name": "punctuation.separator.parameters.python"
2590 +
        }
2591 +
      },
2592 +
      "match": "\\b((self)|(cls))\\b\\s*(?:(,)|(?=\\)))"
2593 +
    },
2594 +
    "parameters": {
2595 +
      "begin": "(\\()",
2596 +
      "beginCaptures": {
2597 +
        "1": {
2598 +
          "name": "punctuation.definition.parameters.begin.python"
2599 +
        }
2600 +
      },
2601 +
      "end": "(\\))",
2602 +
      "endCaptures": {
2603 +
        "1": {
2604 +
          "name": "punctuation.definition.parameters.end.python"
2605 +
        }
2606 +
      },
2607 +
      "name": "meta.function.parameters.python",
2608 +
      "patterns": [
2609 +
        {
2610 +
          "match": "/",
2611 +
          "name": "keyword.operator.positional.parameter.python"
2612 +
        },
2613 +
        {
2614 +
          "match": "(\\*\\*?)",
2615 +
          "name": "keyword.operator.unpacking.parameter.python"
2616 +
        },
2617 +
        {
2618 +
          "include": "#lambda-incomplete"
2619 +
        },
2620 +
        {
2621 +
          "include": "#illegal-names"
2622 +
        },
2623 +
        {
2624 +
          "include": "#illegal-object-name"
2625 +
        },
2626 +
        {
2627 +
          "include": "#parameter-special"
2628 +
        },
2629 +
        {
2630 +
          "captures": {
2631 +
            "1": {
2632 +
              "name": "variable.parameter.function.language.python"
2633 +
            },
2634 +
            "2": {
2635 +
              "name": "punctuation.separator.parameters.python"
2636 +
            }
2637 +
          },
2638 +
          "match": "([_[:alpha:]]\\w*)\\s*(?:(,)|(?=[\\n#)=]))"
2639 +
        },
2640 +
        {
2641 +
          "include": "#comments"
2642 +
        },
2643 +
        {
2644 +
          "include": "#loose-default"
2645 +
        },
2646 +
        {
2647 +
          "include": "#annotated-parameter"
2648 +
        }
2649 +
      ]
2650 +
    },
2651 +
    "punctuation": {
2652 +
      "patterns": [
2653 +
        {
2654 +
          "match": ":",
2655 +
          "name": "punctuation.separator.colon.python"
2656 +
        },
2657 +
        {
2658 +
          "match": ",",
2659 +
          "name": "punctuation.separator.element.python"
2660 +
        }
2661 +
      ]
2662 +
    },
2663 +
    "regexp": {
2664 +
      "patterns": [
2665 +
        {
2666 +
          "include": "#regexp-single-three-line"
2667 +
        },
2668 +
        {
2669 +
          "include": "#regexp-double-three-line"
2670 +
        },
2671 +
        {
2672 +
          "include": "#regexp-single-one-line"
2673 +
        },
2674 +
        {
2675 +
          "include": "#regexp-double-one-line"
2676 +
        }
2677 +
      ]
2678 +
    },
2679 +
    "regexp-backreference": {
2680 +
      "captures": {
2681 +
        "1": {
2682 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp"
2683 +
        },
2684 +
        "2": {
2685 +
          "name": "entity.name.tag.named.backreference.regexp"
2686 +
        },
2687 +
        "3": {
2688 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"
2689 +
        }
2690 +
      },
2691 +
      "match": "(\\()(\\?P=\\w+(?:\\s+\\p{alnum}+)?)(\\))",
2692 +
      "name": "meta.backreference.named.regexp"
2693 +
    },
2694 +
    "regexp-backreference-number": {
2695 +
      "captures": {
2696 +
        "1": {
2697 +
          "name": "entity.name.tag.backreference.regexp"
2698 +
        }
2699 +
      },
2700 +
      "match": "(\\\\[1-9]\\d?)",
2701 +
      "name": "meta.backreference.regexp"
2702 +
    },
2703 +
    "regexp-base-common": {
2704 +
      "patterns": [
2705 +
        {
2706 +
          "match": "\\.",
2707 +
          "name": "support.other.match.any.regexp"
2708 +
        },
2709 +
        {
2710 +
          "match": "\\^",
2711 +
          "name": "support.other.match.begin.regexp"
2712 +
        },
2713 +
        {
2714 +
          "match": "\\$",
2715 +
          "name": "support.other.match.end.regexp"
2716 +
        },
2717 +
        {
2718 +
          "match": "[*+?]\\??",
2719 +
          "name": "keyword.operator.quantifier.regexp"
2720 +
        },
2721 +
        {
2722 +
          "match": "\\|",
2723 +
          "name": "keyword.operator.disjunction.regexp"
2724 +
        },
2725 +
        {
2726 +
          "include": "#regexp-escape-sequence"
2727 +
        }
2728 +
      ]
2729 +
    },
2730 +
    "regexp-base-expression": {
2731 +
      "patterns": [
2732 +
        {
2733 +
          "include": "#regexp-quantifier"
2734 +
        },
2735 +
        {
2736 +
          "include": "#regexp-base-common"
2737 +
        }
2738 +
      ]
2739 +
    },
2740 +
    "regexp-charecter-set-escapes": {
2741 +
      "patterns": [
2742 +
        {
2743 +
          "match": "\\\\[\\\\abfnrtv]",
2744 +
          "name": "constant.character.escape.regexp"
2745 +
        },
2746 +
        {
2747 +
          "include": "#regexp-escape-special"
2748 +
        },
2749 +
        {
2750 +
          "match": "\\\\([0-7]{1,3})",
2751 +
          "name": "constant.character.escape.regexp"
2752 +
        },
2753 +
        {
2754 +
          "include": "#regexp-escape-character"
2755 +
        },
2756 +
        {
2757 +
          "include": "#regexp-escape-unicode"
2758 +
        },
2759 +
        {
2760 +
          "include": "#regexp-escape-catchall"
2761 +
        }
2762 +
      ]
2763 +
    },
2764 +
    "regexp-double-one-line": {
2765 +
      "begin": "\\b(([Uu]r)|([Bb]r)|(r[Bb]?))(\")",
2766 +
      "beginCaptures": {
2767 +
        "2": {
2768 +
          "name": "invalid.deprecated.prefix.python"
2769 +
        },
2770 +
        "3": {
2771 +
          "name": "storage.type.string.python"
2772 +
        },
2773 +
        "4": {
2774 +
          "name": "storage.type.string.python"
2775 +
        },
2776 +
        "5": {
2777 +
          "name": "punctuation.definition.string.begin.python"
2778 +
        }
2779 +
      },
2780 +
      "end": "(\")|(?<!\\\\)(\\n)",
2781 +
      "endCaptures": {
2782 +
        "1": {
2783 +
          "name": "punctuation.definition.string.end.python"
2784 +
        },
2785 +
        "2": {
2786 +
          "name": "invalid.illegal.newline.python"
2787 +
        }
2788 +
      },
2789 +
      "name": "string.regexp.quoted.single.python",
2790 +
      "patterns": [
2791 +
        {
2792 +
          "include": "#double-one-regexp-expression"
2793 +
        }
2794 +
      ]
2795 +
    },
2796 +
    "regexp-double-three-line": {
2797 +
      "begin": "\\b(([Uu]r)|([Bb]r)|(r[Bb]?))(\"\"\")",
2798 +
      "beginCaptures": {
2799 +
        "2": {
2800 +
          "name": "invalid.deprecated.prefix.python"
2801 +
        },
2802 +
        "3": {
2803 +
          "name": "storage.type.string.python"
2804 +
        },
2805 +
        "4": {
2806 +
          "name": "storage.type.string.python"
2807 +
        },
2808 +
        "5": {
2809 +
          "name": "punctuation.definition.string.begin.python"
2810 +
        }
2811 +
      },
2812 +
      "end": "(\"\"\")",
2813 +
      "endCaptures": {
2814 +
        "1": {
2815 +
          "name": "punctuation.definition.string.end.python"
2816 +
        },
2817 +
        "2": {
2818 +
          "name": "invalid.illegal.newline.python"
2819 +
        }
2820 +
      },
2821 +
      "name": "string.regexp.quoted.multi.python",
2822 +
      "patterns": [
2823 +
        {
2824 +
          "include": "#double-three-regexp-expression"
2825 +
        }
2826 +
      ]
2827 +
    },
2828 +
    "regexp-escape-catchall": {
2829 +
      "match": "\\\\(.|\\n)",
2830 +
      "name": "constant.character.escape.regexp"
2831 +
    },
2832 +
    "regexp-escape-character": {
2833 +
      "match": "\\\\(x\\h{2}|0[0-7]{1,2}|[0-7]{3})",
2834 +
      "name": "constant.character.escape.regexp"
2835 +
    },
2836 +
    "regexp-escape-sequence": {
2837 +
      "patterns": [
2838 +
        {
2839 +
          "include": "#regexp-escape-special"
2840 +
        },
2841 +
        {
2842 +
          "include": "#regexp-escape-character"
2843 +
        },
2844 +
        {
2845 +
          "include": "#regexp-escape-unicode"
2846 +
        },
2847 +
        {
2848 +
          "include": "#regexp-backreference-number"
2849 +
        },
2850 +
        {
2851 +
          "include": "#regexp-escape-catchall"
2852 +
        }
2853 +
      ]
2854 +
    },
2855 +
    "regexp-escape-special": {
2856 +
      "match": "\\\\([ABDSWZbdsw])",
2857 +
      "name": "support.other.escape.special.regexp"
2858 +
    },
2859 +
    "regexp-escape-unicode": {
2860 +
      "match": "\\\\(u\\h{4}|U\\h{8})",
2861 +
      "name": "constant.character.unicode.regexp"
2862 +
    },
2863 +
    "regexp-flags": {
2864 +
      "match": "\\(\\?[Laimsux]+\\)",
2865 +
      "name": "storage.modifier.flag.regexp"
2866 +
    },
2867 +
    "regexp-quantifier": {
2868 +
      "match": "\\{(\\d+|\\d+,(\\d+)?|,\\d+)}",
2869 +
      "name": "keyword.operator.quantifier.regexp"
2870 +
    },
2871 +
    "regexp-single-one-line": {
2872 +
      "begin": "\\b(([Uu]r)|([Bb]r)|(r[Bb]?))(')",
2873 +
      "beginCaptures": {
2874 +
        "2": {
2875 +
          "name": "invalid.deprecated.prefix.python"
2876 +
        },
2877 +
        "3": {
2878 +
          "name": "storage.type.string.python"
2879 +
        },
2880 +
        "4": {
2881 +
          "name": "storage.type.string.python"
2882 +
        },
2883 +
        "5": {
2884 +
          "name": "punctuation.definition.string.begin.python"
2885 +
        }
2886 +
      },
2887 +
      "end": "(')|(?<!\\\\)(\\n)",
2888 +
      "endCaptures": {
2889 +
        "1": {
2890 +
          "name": "punctuation.definition.string.end.python"
2891 +
        },
2892 +
        "2": {
2893 +
          "name": "invalid.illegal.newline.python"
2894 +
        }
2895 +
      },
2896 +
      "name": "string.regexp.quoted.single.python",
2897 +
      "patterns": [
2898 +
        {
2899 +
          "include": "#single-one-regexp-expression"
2900 +
        }
2901 +
      ]
2902 +
    },
2903 +
    "regexp-single-three-line": {
2904 +
      "begin": "\\b(([Uu]r)|([Bb]r)|(r[Bb]?))(''')",
2905 +
      "beginCaptures": {
2906 +
        "2": {
2907 +
          "name": "invalid.deprecated.prefix.python"
2908 +
        },
2909 +
        "3": {
2910 +
          "name": "storage.type.string.python"
2911 +
        },
2912 +
        "4": {
2913 +
          "name": "storage.type.string.python"
2914 +
        },
2915 +
        "5": {
2916 +
          "name": "punctuation.definition.string.begin.python"
2917 +
        }
2918 +
      },
2919 +
      "end": "(''')",
2920 +
      "endCaptures": {
2921 +
        "1": {
2922 +
          "name": "punctuation.definition.string.end.python"
2923 +
        },
2924 +
        "2": {
2925 +
          "name": "invalid.illegal.newline.python"
2926 +
        }
2927 +
      },
2928 +
      "name": "string.regexp.quoted.multi.python",
2929 +
      "patterns": [
2930 +
        {
2931 +
          "include": "#single-three-regexp-expression"
2932 +
        }
2933 +
      ]
2934 +
    },
2935 +
    "return-annotation": {
2936 +
      "begin": "(->)",
2937 +
      "beginCaptures": {
2938 +
        "1": {
2939 +
          "name": "punctuation.separator.annotation.result.python"
2940 +
        }
2941 +
      },
2942 +
      "end": "(?=:)",
2943 +
      "patterns": [
2944 +
        {
2945 +
          "include": "#expression"
2946 +
        }
2947 +
      ]
2948 +
    },
2949 +
    "round-braces": {
2950 +
      "begin": "\\(",
2951 +
      "beginCaptures": {
2952 +
        "0": {
2953 +
          "name": "punctuation.parenthesis.begin.python"
2954 +
        }
2955 +
      },
2956 +
      "end": "\\)",
2957 +
      "endCaptures": {
2958 +
        "0": {
2959 +
          "name": "punctuation.parenthesis.end.python"
2960 +
        }
2961 +
      },
2962 +
      "patterns": [
2963 +
        {
2964 +
          "include": "#expression"
2965 +
        }
2966 +
      ]
2967 +
    },
2968 +
    "semicolon": {
2969 +
      "patterns": [
2970 +
        {
2971 +
          "match": ";$",
2972 +
          "name": "invalid.deprecated.semicolon.python"
2973 +
        }
2974 +
      ]
2975 +
    },
2976 +
    "single-one-regexp-character-set": {
2977 +
      "patterns": [
2978 +
        {
2979 +
          "match": "\\[\\^?](?!.*?])"
2980 +
        },
2981 +
        {
2982 +
          "begin": "(\\[)(\\^)?(])?",
2983 +
          "beginCaptures": {
2984 +
            "1": {
2985 +
              "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
2986 +
            },
2987 +
            "2": {
2988 +
              "name": "keyword.operator.negation.regexp"
2989 +
            },
2990 +
            "3": {
2991 +
              "name": "constant.character.set.regexp"
2992 +
            }
2993 +
          },
2994 +
          "end": "(]|(?='))|((?=(?<!\\\\)\\n))",
2995 +
          "endCaptures": {
2996 +
            "1": {
2997 +
              "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
2998 +
            },
2999 +
            "2": {
3000 +
              "name": "invalid.illegal.newline.python"
3001 +
            }
3002 +
          },
3003 +
          "name": "meta.character.set.regexp",
3004 +
          "patterns": [
3005 +
            {
3006 +
              "include": "#regexp-charecter-set-escapes"
3007 +
            },
3008 +
            {
3009 +
              "match": "\\N",
3010 +
              "name": "constant.character.set.regexp"
3011 +
            }
3012 +
          ]
3013 +
        }
3014 +
      ]
3015 +
    },
3016 +
    "single-one-regexp-comments": {
3017 +
      "begin": "\\(\\?#",
3018 +
      "beginCaptures": {
3019 +
        "0": {
3020 +
          "name": "punctuation.comment.begin.regexp"
3021 +
        }
3022 +
      },
3023 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3024 +
      "endCaptures": {
3025 +
        "1": {
3026 +
          "name": "punctuation.comment.end.regexp"
3027 +
        },
3028 +
        "2": {
3029 +
          "name": "invalid.illegal.newline.python"
3030 +
        }
3031 +
      },
3032 +
      "name": "comment.regexp",
3033 +
      "patterns": [
3034 +
        {
3035 +
          "include": "#codetags"
3036 +
        }
3037 +
      ]
3038 +
    },
3039 +
    "single-one-regexp-conditional": {
3040 +
      "begin": "(\\()\\?\\((\\w+(?:\\s+\\p{alnum}+)?|\\d+)\\)",
3041 +
      "beginCaptures": {
3042 +
        "0": {
3043 +
          "name": "keyword.operator.conditional.regexp"
3044 +
        },
3045 +
        "1": {
3046 +
          "name": "punctuation.parenthesis.conditional.begin.regexp"
3047 +
        }
3048 +
      },
3049 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3050 +
      "endCaptures": {
3051 +
        "1": {
3052 +
          "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3053 +
        },
3054 +
        "2": {
3055 +
          "name": "invalid.illegal.newline.python"
3056 +
        }
3057 +
      },
3058 +
      "patterns": [
3059 +
        {
3060 +
          "include": "#single-one-regexp-expression"
3061 +
        }
3062 +
      ]
3063 +
    },
3064 +
    "single-one-regexp-expression": {
3065 +
      "patterns": [
3066 +
        {
3067 +
          "include": "#regexp-base-expression"
3068 +
        },
3069 +
        {
3070 +
          "include": "#single-one-regexp-character-set"
3071 +
        },
3072 +
        {
3073 +
          "include": "#single-one-regexp-comments"
3074 +
        },
3075 +
        {
3076 +
          "include": "#regexp-flags"
3077 +
        },
3078 +
        {
3079 +
          "include": "#single-one-regexp-named-group"
3080 +
        },
3081 +
        {
3082 +
          "include": "#regexp-backreference"
3083 +
        },
3084 +
        {
3085 +
          "include": "#single-one-regexp-lookahead"
3086 +
        },
3087 +
        {
3088 +
          "include": "#single-one-regexp-lookahead-negative"
3089 +
        },
3090 +
        {
3091 +
          "include": "#single-one-regexp-lookbehind"
3092 +
        },
3093 +
        {
3094 +
          "include": "#single-one-regexp-lookbehind-negative"
3095 +
        },
3096 +
        {
3097 +
          "include": "#single-one-regexp-conditional"
3098 +
        },
3099 +
        {
3100 +
          "include": "#single-one-regexp-parentheses-non-capturing"
3101 +
        },
3102 +
        {
3103 +
          "include": "#single-one-regexp-parentheses"
3104 +
        }
3105 +
      ]
3106 +
    },
3107 +
    "single-one-regexp-lookahead": {
3108 +
      "begin": "(\\()\\?=",
3109 +
      "beginCaptures": {
3110 +
        "0": {
3111 +
          "name": "keyword.operator.lookahead.regexp"
3112 +
        },
3113 +
        "1": {
3114 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
3115 +
        }
3116 +
      },
3117 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3118 +
      "endCaptures": {
3119 +
        "1": {
3120 +
          "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3121 +
        },
3122 +
        "2": {
3123 +
          "name": "invalid.illegal.newline.python"
3124 +
        }
3125 +
      },
3126 +
      "patterns": [
3127 +
        {
3128 +
          "include": "#single-one-regexp-expression"
3129 +
        }
3130 +
      ]
3131 +
    },
3132 +
    "single-one-regexp-lookahead-negative": {
3133 +
      "begin": "(\\()\\?!",
3134 +
      "beginCaptures": {
3135 +
        "0": {
3136 +
          "name": "keyword.operator.lookahead.negative.regexp"
3137 +
        },
3138 +
        "1": {
3139 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
3140 +
        }
3141 +
      },
3142 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3143 +
      "endCaptures": {
3144 +
        "1": {
3145 +
          "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3146 +
        },
3147 +
        "2": {
3148 +
          "name": "invalid.illegal.newline.python"
3149 +
        }
3150 +
      },
3151 +
      "patterns": [
3152 +
        {
3153 +
          "include": "#single-one-regexp-expression"
3154 +
        }
3155 +
      ]
3156 +
    },
3157 +
    "single-one-regexp-lookbehind": {
3158 +
      "begin": "(\\()\\?<=",
3159 +
      "beginCaptures": {
3160 +
        "0": {
3161 +
          "name": "keyword.operator.lookbehind.regexp"
3162 +
        },
3163 +
        "1": {
3164 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3165 +
        }
3166 +
      },
3167 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3168 +
      "endCaptures": {
3169 +
        "1": {
3170 +
          "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3171 +
        },
3172 +
        "2": {
3173 +
          "name": "invalid.illegal.newline.python"
3174 +
        }
3175 +
      },
3176 +
      "patterns": [
3177 +
        {
3178 +
          "include": "#single-one-regexp-expression"
3179 +
        }
3180 +
      ]
3181 +
    },
3182 +
    "single-one-regexp-lookbehind-negative": {
3183 +
      "begin": "(\\()\\?<!",
3184 +
      "beginCaptures": {
3185 +
        "0": {
3186 +
          "name": "keyword.operator.lookbehind.negative.regexp"
3187 +
        },
3188 +
        "1": {
3189 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3190 +
        }
3191 +
      },
3192 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3193 +
      "endCaptures": {
3194 +
        "1": {
3195 +
          "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3196 +
        },
3197 +
        "2": {
3198 +
          "name": "invalid.illegal.newline.python"
3199 +
        }
3200 +
      },
3201 +
      "patterns": [
3202 +
        {
3203 +
          "include": "#single-one-regexp-expression"
3204 +
        }
3205 +
      ]
3206 +
    },
3207 +
    "single-one-regexp-named-group": {
3208 +
      "begin": "(\\()(\\?P<\\w+(?:\\s+\\p{alnum}+)?>)",
3209 +
      "beginCaptures": {
3210 +
        "1": {
3211 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3212 +
        },
3213 +
        "2": {
3214 +
          "name": "entity.name.tag.named.group.regexp"
3215 +
        }
3216 +
      },
3217 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3218 +
      "endCaptures": {
3219 +
        "1": {
3220 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3221 +
        },
3222 +
        "2": {
3223 +
          "name": "invalid.illegal.newline.python"
3224 +
        }
3225 +
      },
3226 +
      "name": "meta.named.regexp",
3227 +
      "patterns": [
3228 +
        {
3229 +
          "include": "#single-one-regexp-expression"
3230 +
        }
3231 +
      ]
3232 +
    },
3233 +
    "single-one-regexp-parentheses": {
3234 +
      "begin": "\\(",
3235 +
      "beginCaptures": {
3236 +
        "0": {
3237 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3238 +
        }
3239 +
      },
3240 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3241 +
      "endCaptures": {
3242 +
        "1": {
3243 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3244 +
        },
3245 +
        "2": {
3246 +
          "name": "invalid.illegal.newline.python"
3247 +
        }
3248 +
      },
3249 +
      "patterns": [
3250 +
        {
3251 +
          "include": "#single-one-regexp-expression"
3252 +
        }
3253 +
      ]
3254 +
    },
3255 +
    "single-one-regexp-parentheses-non-capturing": {
3256 +
      "begin": "\\(\\?:",
3257 +
      "beginCaptures": {
3258 +
        "0": {
3259 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3260 +
        }
3261 +
      },
3262 +
      "end": "(\\)|(?='))|((?=(?<!\\\\)\\n))",
3263 +
      "endCaptures": {
3264 +
        "1": {
3265 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3266 +
        },
3267 +
        "2": {
3268 +
          "name": "invalid.illegal.newline.python"
3269 +
        }
3270 +
      },
3271 +
      "patterns": [
3272 +
        {
3273 +
          "include": "#single-one-regexp-expression"
3274 +
        }
3275 +
      ]
3276 +
    },
3277 +
    "single-three-regexp-character-set": {
3278 +
      "patterns": [
3279 +
        {
3280 +
          "match": "\\[\\^?](?!.*?])"
3281 +
        },
3282 +
        {
3283 +
          "begin": "(\\[)(\\^)?(])?",
3284 +
          "beginCaptures": {
3285 +
            "1": {
3286 +
              "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
3287 +
            },
3288 +
            "2": {
3289 +
              "name": "keyword.operator.negation.regexp"
3290 +
            },
3291 +
            "3": {
3292 +
              "name": "constant.character.set.regexp"
3293 +
            }
3294 +
          },
3295 +
          "end": "(]|(?='''))",
3296 +
          "endCaptures": {
3297 +
            "1": {
3298 +
              "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
3299 +
            },
3300 +
            "2": {
3301 +
              "name": "invalid.illegal.newline.python"
3302 +
            }
3303 +
          },
3304 +
          "name": "meta.character.set.regexp",
3305 +
          "patterns": [
3306 +
            {
3307 +
              "include": "#regexp-charecter-set-escapes"
3308 +
            },
3309 +
            {
3310 +
              "match": "\\N",
3311 +
              "name": "constant.character.set.regexp"
3312 +
            }
3313 +
          ]
3314 +
        }
3315 +
      ]
3316 +
    },
3317 +
    "single-three-regexp-comments": {
3318 +
      "begin": "\\(\\?#",
3319 +
      "beginCaptures": {
3320 +
        "0": {
3321 +
          "name": "punctuation.comment.begin.regexp"
3322 +
        }
3323 +
      },
3324 +
      "end": "(\\)|(?='''))",
3325 +
      "endCaptures": {
3326 +
        "1": {
3327 +
          "name": "punctuation.comment.end.regexp"
3328 +
        },
3329 +
        "2": {
3330 +
          "name": "invalid.illegal.newline.python"
3331 +
        }
3332 +
      },
3333 +
      "name": "comment.regexp",
3334 +
      "patterns": [
3335 +
        {
3336 +
          "include": "#codetags"
3337 +
        }
3338 +
      ]
3339 +
    },
3340 +
    "single-three-regexp-conditional": {
3341 +
      "begin": "(\\()\\?\\((\\w+(?:\\s+\\p{alnum}+)?|\\d+)\\)",
3342 +
      "beginCaptures": {
3343 +
        "0": {
3344 +
          "name": "keyword.operator.conditional.regexp"
3345 +
        },
3346 +
        "1": {
3347 +
          "name": "punctuation.parenthesis.conditional.begin.regexp"
3348 +
        }
3349 +
      },
3350 +
      "end": "(\\)|(?='''))",
3351 +
      "endCaptures": {
3352 +
        "1": {
3353 +
          "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3354 +
        },
3355 +
        "2": {
3356 +
          "name": "invalid.illegal.newline.python"
3357 +
        }
3358 +
      },
3359 +
      "patterns": [
3360 +
        {
3361 +
          "include": "#single-three-regexp-expression"
3362 +
        },
3363 +
        {
3364 +
          "include": "#comments-string-single-three"
3365 +
        }
3366 +
      ]
3367 +
    },
3368 +
    "single-three-regexp-expression": {
3369 +
      "patterns": [
3370 +
        {
3371 +
          "include": "#regexp-base-expression"
3372 +
        },
3373 +
        {
3374 +
          "include": "#single-three-regexp-character-set"
3375 +
        },
3376 +
        {
3377 +
          "include": "#single-three-regexp-comments"
3378 +
        },
3379 +
        {
3380 +
          "include": "#regexp-flags"
3381 +
        },
3382 +
        {
3383 +
          "include": "#single-three-regexp-named-group"
3384 +
        },
3385 +
        {
3386 +
          "include": "#regexp-backreference"
3387 +
        },
3388 +
        {
3389 +
          "include": "#single-three-regexp-lookahead"
3390 +
        },
3391 +
        {
3392 +
          "include": "#single-three-regexp-lookahead-negative"
3393 +
        },
3394 +
        {
3395 +
          "include": "#single-three-regexp-lookbehind"
3396 +
        },
3397 +
        {
3398 +
          "include": "#single-three-regexp-lookbehind-negative"
3399 +
        },
3400 +
        {
3401 +
          "include": "#single-three-regexp-conditional"
3402 +
        },
3403 +
        {
3404 +
          "include": "#single-three-regexp-parentheses-non-capturing"
3405 +
        },
3406 +
        {
3407 +
          "include": "#single-three-regexp-parentheses"
3408 +
        },
3409 +
        {
3410 +
          "include": "#comments-string-single-three"
3411 +
        }
3412 +
      ]
3413 +
    },
3414 +
    "single-three-regexp-lookahead": {
3415 +
      "begin": "(\\()\\?=",
3416 +
      "beginCaptures": {
3417 +
        "0": {
3418 +
          "name": "keyword.operator.lookahead.regexp"
3419 +
        },
3420 +
        "1": {
3421 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
3422 +
        }
3423 +
      },
3424 +
      "end": "(\\)|(?='''))",
3425 +
      "endCaptures": {
3426 +
        "1": {
3427 +
          "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3428 +
        },
3429 +
        "2": {
3430 +
          "name": "invalid.illegal.newline.python"
3431 +
        }
3432 +
      },
3433 +
      "patterns": [
3434 +
        {
3435 +
          "include": "#single-three-regexp-expression"
3436 +
        },
3437 +
        {
3438 +
          "include": "#comments-string-single-three"
3439 +
        }
3440 +
      ]
3441 +
    },
3442 +
    "single-three-regexp-lookahead-negative": {
3443 +
      "begin": "(\\()\\?!",
3444 +
      "beginCaptures": {
3445 +
        "0": {
3446 +
          "name": "keyword.operator.lookahead.negative.regexp"
3447 +
        },
3448 +
        "1": {
3449 +
          "name": "punctuation.parenthesis.lookahead.begin.regexp"
3450 +
        }
3451 +
      },
3452 +
      "end": "(\\)|(?='''))",
3453 +
      "endCaptures": {
3454 +
        "1": {
3455 +
          "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3456 +
        },
3457 +
        "2": {
3458 +
          "name": "invalid.illegal.newline.python"
3459 +
        }
3460 +
      },
3461 +
      "patterns": [
3462 +
        {
3463 +
          "include": "#single-three-regexp-expression"
3464 +
        },
3465 +
        {
3466 +
          "include": "#comments-string-single-three"
3467 +
        }
3468 +
      ]
3469 +
    },
3470 +
    "single-three-regexp-lookbehind": {
3471 +
      "begin": "(\\()\\?<=",
3472 +
      "beginCaptures": {
3473 +
        "0": {
3474 +
          "name": "keyword.operator.lookbehind.regexp"
3475 +
        },
3476 +
        "1": {
3477 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3478 +
        }
3479 +
      },
3480 +
      "end": "(\\)|(?='''))",
3481 +
      "endCaptures": {
3482 +
        "1": {
3483 +
          "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3484 +
        },
3485 +
        "2": {
3486 +
          "name": "invalid.illegal.newline.python"
3487 +
        }
3488 +
      },
3489 +
      "patterns": [
3490 +
        {
3491 +
          "include": "#single-three-regexp-expression"
3492 +
        },
3493 +
        {
3494 +
          "include": "#comments-string-single-three"
3495 +
        }
3496 +
      ]
3497 +
    },
3498 +
    "single-three-regexp-lookbehind-negative": {
3499 +
      "begin": "(\\()\\?<!",
3500 +
      "beginCaptures": {
3501 +
        "0": {
3502 +
          "name": "keyword.operator.lookbehind.negative.regexp"
3503 +
        },
3504 +
        "1": {
3505 +
          "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3506 +
        }
3507 +
      },
3508 +
      "end": "(\\)|(?='''))",
3509 +
      "endCaptures": {
3510 +
        "1": {
3511 +
          "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3512 +
        },
3513 +
        "2": {
3514 +
          "name": "invalid.illegal.newline.python"
3515 +
        }
3516 +
      },
3517 +
      "patterns": [
3518 +
        {
3519 +
          "include": "#single-three-regexp-expression"
3520 +
        },
3521 +
        {
3522 +
          "include": "#comments-string-single-three"
3523 +
        }
3524 +
      ]
3525 +
    },
3526 +
    "single-three-regexp-named-group": {
3527 +
      "begin": "(\\()(\\?P<\\w+(?:\\s+\\p{alnum}+)?>)",
3528 +
      "beginCaptures": {
3529 +
        "1": {
3530 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3531 +
        },
3532 +
        "2": {
3533 +
          "name": "entity.name.tag.named.group.regexp"
3534 +
        }
3535 +
      },
3536 +
      "end": "(\\)|(?='''))",
3537 +
      "endCaptures": {
3538 +
        "1": {
3539 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3540 +
        },
3541 +
        "2": {
3542 +
          "name": "invalid.illegal.newline.python"
3543 +
        }
3544 +
      },
3545 +
      "name": "meta.named.regexp",
3546 +
      "patterns": [
3547 +
        {
3548 +
          "include": "#single-three-regexp-expression"
3549 +
        },
3550 +
        {
3551 +
          "include": "#comments-string-single-three"
3552 +
        }
3553 +
      ]
3554 +
    },
3555 +
    "single-three-regexp-parentheses": {
3556 +
      "begin": "\\(",
3557 +
      "beginCaptures": {
3558 +
        "0": {
3559 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3560 +
        }
3561 +
      },
3562 +
      "end": "(\\)|(?='''))",
3563 +
      "endCaptures": {
3564 +
        "1": {
3565 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3566 +
        },
3567 +
        "2": {
3568 +
          "name": "invalid.illegal.newline.python"
3569 +
        }
3570 +
      },
3571 +
      "patterns": [
3572 +
        {
3573 +
          "include": "#single-three-regexp-expression"
3574 +
        },
3575 +
        {
3576 +
          "include": "#comments-string-single-three"
3577 +
        }
3578 +
      ]
3579 +
    },
3580 +
    "single-three-regexp-parentheses-non-capturing": {
3581 +
      "begin": "\\(\\?:",
3582 +
      "beginCaptures": {
3583 +
        "0": {
3584 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3585 +
        }
3586 +
      },
3587 +
      "end": "(\\)|(?='''))",
3588 +
      "endCaptures": {
3589 +
        "1": {
3590 +
          "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3591 +
        },
3592 +
        "2": {
3593 +
          "name": "invalid.illegal.newline.python"
3594 +
        }
3595 +
      },
3596 +
      "patterns": [
3597 +
        {
3598 +
          "include": "#single-three-regexp-expression"
3599 +
        },
3600 +
        {
3601 +
          "include": "#comments-string-single-three"
3602 +
        }
3603 +
      ]
3604 +
    },
3605 +
    "special-names": {
3606 +
      "match": "\\b(_*\\p{upper}[_\\d]*\\p{upper})[[:upper:]\\d]*(_\\w*)?\\b",
3607 +
      "name": "constant.other.caps.python"
3608 +
    },
3609 +
    "special-variables": {
3610 +
      "captures": {
3611 +
        "1": {
3612 +
          "name": "variable.language.special.self.python"
3613 +
        },
3614 +
        "2": {
3615 +
          "name": "variable.language.special.cls.python"
3616 +
        }
3617 +
      },
3618 +
      "match": "\\b(?<!\\.)(?:(self)|(cls))\\b"
3619 +
    },
3620 +
    "statement": {
3621 +
      "patterns": [
3622 +
        {
3623 +
          "include": "#import"
3624 +
        },
3625 +
        {
3626 +
          "include": "#class-declaration"
3627 +
        },
3628 +
        {
3629 +
          "include": "#function-declaration"
3630 +
        },
3631 +
        {
3632 +
          "include": "#generator"
3633 +
        },
3634 +
        {
3635 +
          "include": "#statement-keyword"
3636 +
        },
3637 +
        {
3638 +
          "include": "#assignment-operator"
3639 +
        },
3640 +
        {
3641 +
          "include": "#decorator"
3642 +
        },
3643 +
        {
3644 +
          "include": "#docstring-statement"
3645 +
        },
3646 +
        {
3647 +
          "include": "#semicolon"
3648 +
        }
3649 +
      ]
3650 +
    },
3651 +
    "statement-keyword": {
3652 +
      "patterns": [
3653 +
        {
3654 +
          "match": "\\b((async\\s+)?\\s*def)\\b",
3655 +
          "name": "storage.type.function.python"
3656 +
        },
3657 +
        {
3658 +
          "match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])",
3659 +
          "name": "keyword.control.flow.python"
3660 +
        },
3661 +
        {
3662 +
          "match": "\\b(?<!\\.)as\\b",
3663 +
          "name": "keyword.control.import.python"
3664 +
        },
3665 +
        {
3666 +
          "match": "\\b(?<!\\.)(async|continue|del|assert|break|finally|for|from|elif|else|if|except|pass|raise|return|try|while|with)\\b",
3667 +
          "name": "keyword.control.flow.python"
3668 +
        },
3669 +
        {
3670 +
          "match": "\\b(?<!\\.)(global|nonlocal)\\b",
3671 +
          "name": "storage.modifier.declaration.python"
3672 +
        },
3673 +
        {
3674 +
          "match": "\\b(?<!\\.)(class)\\b",
3675 +
          "name": "storage.type.class.python"
3676 +
        },
3677 +
        {
3678 +
          "captures": {
3679 +
            "1": {
3680 +
              "name": "keyword.control.flow.python"
3681 +
            }
3682 +
          },
3683 +
          "match": "^\\s*(case|match)(?=\\s*([-\"#'(+:\\[{\\w\\d]|$))\\b"
3684 +
        }
3685 +
      ]
3686 +
    },
3687 +
    "string": {
3688 +
      "patterns": [
3689 +
        {
3690 +
          "include": "#string-quoted-multi-line"
3691 +
        },
3692 +
        {
3693 +
          "include": "#string-quoted-single-line"
3694 +
        },
3695 +
        {
3696 +
          "include": "#string-bin-quoted-multi-line"
3697 +
        },
3698 +
        {
3699 +
          "include": "#string-bin-quoted-single-line"
3700 +
        },
3701 +
        {
3702 +
          "include": "#string-raw-quoted-multi-line"
3703 +
        },
3704 +
        {
3705 +
          "include": "#string-raw-quoted-single-line"
3706 +
        },
3707 +
        {
3708 +
          "include": "#string-raw-bin-quoted-multi-line"
3709 +
        },
3710 +
        {
3711 +
          "include": "#string-raw-bin-quoted-single-line"
3712 +
        },
3713 +
        {
3714 +
          "include": "#fstring-fnorm-quoted-multi-line"
3715 +
        },
3716 +
        {
3717 +
          "include": "#fstring-fnorm-quoted-single-line"
3718 +
        },
3719 +
        {
3720 +
          "include": "#fstring-normf-quoted-multi-line"
3721 +
        },
3722 +
        {
3723 +
          "include": "#fstring-normf-quoted-single-line"
3724 +
        },
3725 +
        {
3726 +
          "include": "#fstring-raw-quoted-multi-line"
3727 +
        },
3728 +
        {
3729 +
          "include": "#fstring-raw-quoted-single-line"
3730 +
        }
3731 +
      ]
3732 +
    },
3733 +
    "string-bin-quoted-multi-line": {
3734 +
      "begin": "\\b([Bb])('''|\"\"\")",
3735 +
      "beginCaptures": {
3736 +
        "1": {
3737 +
          "name": "storage.type.string.python"
3738 +
        },
3739 +
        "2": {
3740 +
          "name": "punctuation.definition.string.begin.python"
3741 +
        }
3742 +
      },
3743 +
      "end": "(\\2)",
3744 +
      "endCaptures": {
3745 +
        "1": {
3746 +
          "name": "punctuation.definition.string.end.python"
3747 +
        },
3748 +
        "2": {
3749 +
          "name": "invalid.illegal.newline.python"
3750 +
        }
3751 +
      },
3752 +
      "name": "string.quoted.binary.multi.python",
3753 +
      "patterns": [
3754 +
        {
3755 +
          "include": "#string-entity"
3756 +
        }
3757 +
      ]
3758 +
    },
3759 +
    "string-bin-quoted-single-line": {
3760 +
      "begin": "\\b([Bb])(([\"']))",
3761 +
      "beginCaptures": {
3762 +
        "1": {
3763 +
          "name": "storage.type.string.python"
3764 +
        },
3765 +
        "2": {
3766 +
          "name": "punctuation.definition.string.begin.python"
3767 +
        }
3768 +
      },
3769 +
      "end": "(\\2)|((?<!\\\\)\\n)",
3770 +
      "endCaptures": {
3771 +
        "1": {
3772 +
          "name": "punctuation.definition.string.end.python"
3773 +
        },
3774 +
        "2": {
3775 +
          "name": "invalid.illegal.newline.python"
3776 +
        }
3777 +
      },
3778 +
      "name": "string.quoted.binary.single.python",
3779 +
      "patterns": [
3780 +
        {
3781 +
          "include": "#string-entity"
3782 +
        }
3783 +
      ]
3784 +
    },
3785 +
    "string-brace-formatting": {
3786 +
      "patterns": [
3787 +
        {
3788 +
          "captures": {
3789 +
            "1": {
3790 +
              "name": "constant.character.format.placeholder.other.python"
3791 +
            },
3792 +
            "3": {
3793 +
              "name": "storage.type.format.python"
3794 +
            },
3795 +
            "4": {
3796 +
              "name": "storage.type.format.python"
3797 +
            }
3798 +
          },
3799 +
          "match": "(\\{\\{|}}|\\{\\w*(\\.[_[:alpha:]]\\w*|\\[[^]\"']+])*(![ars])?(:\\w?[<=>^]?[- +]?#?\\d*,?(\\.\\d+)?[%EFGXb-gnosx]?)?})",
3800 +
          "name": "meta.format.brace.python"
3801 +
        },
3802 +
        {
3803 +
          "captures": {
3804 +
            "1": {
3805 +
              "name": "constant.character.format.placeholder.other.python"
3806 +
            },
3807 +
            "3": {
3808 +
              "name": "storage.type.format.python"
3809 +
            },
3810 +
            "4": {
3811 +
              "name": "storage.type.format.python"
3812 +
            }
3813 +
          },
3814 +
          "match": "(\\{\\w*(\\.[_[:alpha:]]\\w*|\\[[^]\"']+])*(![ars])?(:)[^\\n\"'{}]*(?:\\{[^\\n\"'}]*?}[^\\n\"'{}]*)*})",
3815 +
          "name": "meta.format.brace.python"
3816 +
        }
3817 +
      ]
3818 +
    },
3819 +
    "string-consume-escape": {
3820 +
      "match": "\\\\[\\n\"'\\\\]"
3821 +
    },
3822 +
    "string-entity": {
3823 +
      "patterns": [
3824 +
        {
3825 +
          "include": "#escape-sequence"
3826 +
        },
3827 +
        {
3828 +
          "include": "#string-line-continuation"
3829 +
        },
3830 +
        {
3831 +
          "include": "#string-formatting"
3832 +
        }
3833 +
      ]
3834 +
    },
3835 +
    "string-formatting": {
3836 +
      "captures": {
3837 +
        "1": {
3838 +
          "name": "constant.character.format.placeholder.other.python"
3839 +
        }
3840 +
      },
3841 +
      "match": "(%(\\([\\w\\s]*\\))?[- #+0]*(\\d+|\\*)?(\\.(\\d+|\\*))?([Lhl])?[%EFGXa-giorsux])",
3842 +
      "name": "meta.format.percent.python"
3843 +
    },
3844 +
    "string-line-continuation": {
3845 +
      "match": "\\\\$",
3846 +
      "name": "constant.language.python"
3847 +
    },
3848 +
    "string-multi-bad-brace1-formatting-raw": {
3849 +
      "begin": "(?=\\{%(.*?(?!'''|\"\"\"))%})",
3850 +
      "end": "(?='''|\"\"\")",
3851 +
      "patterns": [
3852 +
        {
3853 +
          "include": "#string-consume-escape"
3854 +
        }
3855 +
      ]
3856 +
    },
3857 +
    "string-multi-bad-brace1-formatting-unicode": {
3858 +
      "begin": "(?=\\{%(.*?(?!'''|\"\"\"))%})",
3859 +
      "end": "(?='''|\"\"\")",
3860 +
      "patterns": [
3861 +
        {
3862 +
          "include": "#escape-sequence-unicode"
3863 +
        },
3864 +
        {
3865 +
          "include": "#escape-sequence"
3866 +
        },
3867 +
        {
3868 +
          "include": "#string-line-continuation"
3869 +
        }
3870 +
      ]
3871 +
    },
3872 +
    "string-multi-bad-brace2-formatting-raw": {
3873 +
      "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!.:\\[}\\w]).*?(?!'''|\"\"\")})",
3874 +
      "end": "(?='''|\"\"\")",
3875 +
      "patterns": [
3876 +
        {
3877 +
          "include": "#string-consume-escape"
3878 +
        },
3879 +
        {
3880 +
          "include": "#string-formatting"
3881 +
        }
3882 +
      ]
3883 +
    },
3884 +
    "string-multi-bad-brace2-formatting-unicode": {
3885 +
      "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!.:\\[}\\w]).*?(?!'''|\"\"\")})",
3886 +
      "end": "(?='''|\"\"\")",
3887 +
      "patterns": [
3888 +
        {
3889 +
          "include": "#escape-sequence-unicode"
3890 +
        },
3891 +
        {
3892 +
          "include": "#string-entity"
3893 +
        }
3894 +
      ]
3895 +
    },
3896 +
    "string-quoted-multi-line": {
3897 +
      "begin": "(?:\\b([Rr])(?=[Uu]))?([Uu])?('''|\"\"\")",
3898 +
      "beginCaptures": {
3899 +
        "1": {
3900 +
          "name": "invalid.illegal.prefix.python"
3901 +
        },
3902 +
        "2": {
3903 +
          "name": "storage.type.string.python"
3904 +
        },
3905 +
        "3": {
3906 +
          "name": "punctuation.definition.string.begin.python"
3907 +
        }
3908 +
      },
3909 +
      "end": "(\\3)",
3910 +
      "endCaptures": {
3911 +
        "1": {
3912 +
          "name": "punctuation.definition.string.end.python"
3913 +
        },
3914 +
        "2": {
3915 +
          "name": "invalid.illegal.newline.python"
3916 +
        }
3917 +
      },
3918 +
      "name": "string.quoted.multi.python",
3919 +
      "patterns": [
3920 +
        {
3921 +
          "include": "#string-multi-bad-brace1-formatting-unicode"
3922 +
        },
3923 +
        {
3924 +
          "include": "#string-multi-bad-brace2-formatting-unicode"
3925 +
        },
3926 +
        {
3927 +
          "include": "#string-unicode-guts"
3928 +
        }
3929 +
      ]
3930 +
    },
3931 +
    "string-quoted-single-line": {
3932 +
      "begin": "(?:\\b([Rr])(?=[Uu]))?([Uu])?(([\"']))",
3933 +
      "beginCaptures": {
3934 +
        "1": {
3935 +
          "name": "invalid.illegal.prefix.python"
3936 +
        },
3937 +
        "2": {
3938 +
          "name": "storage.type.string.python"
3939 +
        },
3940 +
        "3": {
3941 +
          "name": "punctuation.definition.string.begin.python"
3942 +
        }
3943 +
      },
3944 +
      "end": "(\\3)|((?<!\\\\)\\n)",
3945 +
      "endCaptures": {
3946 +
        "1": {
3947 +
          "name": "punctuation.definition.string.end.python"
3948 +
        },
3949 +
        "2": {
3950 +
          "name": "invalid.illegal.newline.python"
3951 +
        }
3952 +
      },
3953 +
      "name": "string.quoted.single.python",
3954 +
      "patterns": [
3955 +
        {
3956 +
          "include": "#string-single-bad-brace1-formatting-unicode"
3957 +
        },
3958 +
        {
3959 +
          "include": "#string-single-bad-brace2-formatting-unicode"
3960 +
        },
3961 +
        {
3962 +
          "include": "#string-unicode-guts"
3963 +
        }
3964 +
      ]
3965 +
    },
3966 +
    "string-raw-bin-guts": {
3967 +
      "patterns": [
3968 +
        {
3969 +
          "include": "#string-consume-escape"
3970 +
        },
3971 +
        {
3972 +
          "include": "#string-formatting"
3973 +
        }
3974 +
      ]
3975 +
    },
3976 +
    "string-raw-bin-quoted-multi-line": {
3977 +
      "begin": "\\b(R[Bb]|[Bb]R)('''|\"\"\")",
3978 +
      "beginCaptures": {
3979 +
        "1": {
3980 +
          "name": "storage.type.string.python"
3981 +
        },
3982 +
        "2": {
3983 +
          "name": "punctuation.definition.string.begin.python"
3984 +
        }
3985 +
      },
3986 +
      "end": "(\\2)",
3987 +
      "endCaptures": {
3988 +
        "1": {
3989 +
          "name": "punctuation.definition.string.end.python"
3990 +
        },
3991 +
        "2": {
3992 +
          "name": "invalid.illegal.newline.python"
3993 +
        }
3994 +
      },
3995 +
      "name": "string.quoted.raw.binary.multi.python",
3996 +
      "patterns": [
3997 +
        {
3998 +
          "include": "#string-raw-bin-guts"
3999 +
        }
4000 +
      ]
4001 +
    },
4002 +
    "string-raw-bin-quoted-single-line": {
4003 +
      "begin": "\\b(R[Bb]|[Bb]R)(([\"']))",
4004 +
      "beginCaptures": {
4005 +
        "1": {
4006 +
          "name": "storage.type.string.python"
4007 +
        },
4008 +
        "2": {
4009 +
          "name": "punctuation.definition.string.begin.python"
4010 +
        }
4011 +
      },
4012 +
      "end": "(\\2)|((?<!\\\\)\\n)",
4013 +
      "endCaptures": {
4014 +
        "1": {
4015 +
          "name": "punctuation.definition.string.end.python"
4016 +
        },
4017 +
        "2": {
4018 +
          "name": "invalid.illegal.newline.python"
4019 +
        }
4020 +
      },
4021 +
      "name": "string.quoted.raw.binary.single.python",
4022 +
      "patterns": [
4023 +
        {
4024 +
          "include": "#string-raw-bin-guts"
4025 +
        }
4026 +
      ]
4027 +
    },
4028 +
    "string-raw-guts": {
4029 +
      "patterns": [
4030 +
        {
4031 +
          "include": "#string-consume-escape"
4032 +
        },
4033 +
        {
4034 +
          "include": "#string-formatting"
4035 +
        },
4036 +
        {
4037 +
          "include": "#string-brace-formatting"
4038 +
        }
4039 +
      ]
4040 +
    },
4041 +
    "string-raw-quoted-multi-line": {
4042 +
      "begin": "\\b(([Uu]R)|(R))('''|\"\"\")",
4043 +
      "beginCaptures": {
4044 +
        "2": {
4045 +
          "name": "invalid.deprecated.prefix.python"
4046 +
        },
4047 +
        "3": {
4048 +
          "name": "storage.type.string.python"
4049 +
        },
4050 +
        "4": {
4051 +
          "name": "punctuation.definition.string.begin.python"
4052 +
        }
4053 +
      },
4054 +
      "end": "(\\4)",
4055 +
      "endCaptures": {
4056 +
        "1": {
4057 +
          "name": "punctuation.definition.string.end.python"
4058 +
        },
4059 +
        "2": {
4060 +
          "name": "invalid.illegal.newline.python"
4061 +
        }
4062 +
      },
4063 +
      "name": "string.quoted.raw.multi.python",
4064 +
      "patterns": [
4065 +
        {
4066 +
          "include": "#string-multi-bad-brace1-formatting-raw"
4067 +
        },
4068 +
        {
4069 +
          "include": "#string-multi-bad-brace2-formatting-raw"
4070 +
        },
4071 +
        {
4072 +
          "include": "#string-raw-guts"
4073 +
        }
4074 +
      ]
4075 +
    },
4076 +
    "string-raw-quoted-single-line": {
4077 +
      "begin": "\\b(([Uu]R)|(R))(([\"']))",
4078 +
      "beginCaptures": {
4079 +
        "2": {
4080 +
          "name": "invalid.deprecated.prefix.python"
4081 +
        },
4082 +
        "3": {
4083 +
          "name": "storage.type.string.python"
4084 +
        },
4085 +
        "4": {
4086 +
          "name": "punctuation.definition.string.begin.python"
4087 +
        }
4088 +
      },
4089 +
      "end": "(\\4)|((?<!\\\\)\\n)",
4090 +
      "endCaptures": {
4091 +
        "1": {
4092 +
          "name": "punctuation.definition.string.end.python"
4093 +
        },
4094 +
        "2": {
4095 +
          "name": "invalid.illegal.newline.python"
4096 +
        }
4097 +
      },
4098 +
      "name": "string.quoted.raw.single.python",
4099 +
      "patterns": [
4100 +
        {
4101 +
          "include": "#string-single-bad-brace1-formatting-raw"
4102 +
        },
4103 +
        {
4104 +
          "include": "#string-single-bad-brace2-formatting-raw"
4105 +
        },
4106 +
        {
4107 +
          "include": "#string-raw-guts"
4108 +
        }
4109 +
      ]
4110 +
    },
4111 +
    "string-single-bad-brace1-formatting-raw": {
4112 +
      "begin": "(?=\\{%(.*?(?!([\"'])|((?<!\\\\)\\n)))%})",
4113 +
      "end": "(?=([\"'])|((?<!\\\\)\\n))",
4114 +
      "patterns": [
4115 +
        {
4116 +
          "include": "#string-consume-escape"
4117 +
        }
4118 +
      ]
4119 +
    },
4120 +
    "string-single-bad-brace1-formatting-unicode": {
4121 +
      "begin": "(?=\\{%(.*?(?!([\"'])|((?<!\\\\)\\n)))%})",
4122 +
      "end": "(?=([\"'])|((?<!\\\\)\\n))",
4123 +
      "patterns": [
4124 +
        {
4125 +
          "include": "#escape-sequence-unicode"
4126 +
        },
4127 +
        {
4128 +
          "include": "#escape-sequence"
4129 +
        },
4130 +
        {
4131 +
          "include": "#string-line-continuation"
4132 +
        }
4133 +
      ]
4134 +
    },
4135 +
    "string-single-bad-brace2-formatting-raw": {
4136 +
      "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!([\"'])|((?<!\\\\)\\n))[^!.:\\[}\\w]).*?(?!([\"'])|((?<!\\\\)\\n))})",
4137 +
      "end": "(?=([\"'])|((?<!\\\\)\\n))",
4138 +
      "patterns": [
4139 +
        {
4140 +
          "include": "#string-consume-escape"
4141 +
        },
4142 +
        {
4143 +
          "include": "#string-formatting"
4144 +
        }
4145 +
      ]
4146 +
    },
4147 +
    "string-single-bad-brace2-formatting-unicode": {
4148 +
      "begin": "(?!\\{\\{)(?=\\{(\\w*?(?!([\"'])|((?<!\\\\)\\n))[^!.:\\[}\\w]).*?(?!([\"'])|((?<!\\\\)\\n))})",
4149 +
      "end": "(?=([\"'])|((?<!\\\\)\\n))",
4150 +
      "patterns": [
4151 +
        {
4152 +
          "include": "#escape-sequence-unicode"
4153 +
        },
4154 +
        {
4155 +
          "include": "#string-entity"
4156 +
        }
4157 +
      ]
4158 +
    },
4159 +
    "string-unicode-guts": {
4160 +
      "patterns": [
4161 +
        {
4162 +
          "include": "#escape-sequence-unicode"
4163 +
        },
4164 +
        {
4165 +
          "include": "#string-entity"
4166 +
        },
4167 +
        {
4168 +
          "include": "#string-brace-formatting"
4169 +
        }
4170 +
      ]
4171 +
    }
4172 +
  },
4173 +
  "scopeName": "source.python"
4174 +
}
crates/highlight/syntaxes/ruby.json added +3114 -0
1 +
{
2 +
  "displayName": "Ruby",
3 +
  "name": "ruby",
4 +
  "patterns": [
5 +
    {
6 +
      "captures": {
7 +
        "1": {
8 +
          "name": "keyword.control.class.ruby"
9 +
        },
10 +
        "11": {
11 +
          "name": "punctuation.separator.namespace.ruby"
12 +
        },
13 +
        "2": {
14 +
          "name": "entity.name.type.class.ruby"
15 +
        },
16 +
        "5": {
17 +
          "name": "punctuation.separator.namespace.ruby"
18 +
        },
19 +
        "7": {
20 +
          "name": "punctuation.separator.inheritance.ruby"
21 +
        },
22 +
        "8": {
23 +
          "name": "entity.other.inherited-class.ruby"
24 +
        }
25 +
      },
26 +
      "match": "\\b(class)\\s+(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*)\\s*((<)\\s*(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*))?",
27 +
      "name": "meta.class.ruby"
28 +
    },
29 +
    {
30 +
      "captures": {
31 +
        "1": {
32 +
          "name": "keyword.control.module.ruby"
33 +
        },
34 +
        "2": {
35 +
          "name": "entity.name.type.module.ruby"
36 +
        },
37 +
        "5": {
38 +
          "name": "punctuation.separator.namespace.ruby"
39 +
        }
40 +
      },
41 +
      "match": "\\b(module)\\s+(([0-9A-Z_a-z]+)((::)[0-9A-Z_a-z]+)*)",
42 +
      "name": "meta.module.ruby"
43 +
    },
44 +
    {
45 +
      "captures": {
46 +
        "1": {
47 +
          "name": "keyword.control.class.ruby"
48 +
        },
49 +
        "2": {
50 +
          "name": "punctuation.separator.inheritance.ruby"
51 +
        }
52 +
      },
53 +
      "match": "\\b(class)\\s*(<<)\\s*",
54 +
      "name": "meta.class.ruby"
55 +
    },
56 +
    {
57 +
      "match": "(?<!\\.)\\belse(\\s)+if\\b",
58 +
      "name": "invalid.deprecated.ruby"
59 +
    },
60 +
    {
61 +
      "captures": {
62 +
        "1": {
63 +
          "name": "variable.ruby"
64 +
        },
65 +
        "2": {
66 +
          "name": "keyword.operator.assignment.augmented.ruby"
67 +
        }
68 +
      },
69 +
      "match": "^\\s*([_a-z][0-9A-Z_a-z]*)\\s*((&&|\\|\\|)=)"
70 +
    },
71 +
    {
72 +
      "captures": {
73 +
        "1": {
74 +
          "name": "keyword.control.ruby"
75 +
        },
76 +
        "3": {
77 +
          "name": "variable.ruby"
78 +
        },
79 +
        "4": {
80 +
          "name": "keyword.operator.assignment.augmented.ruby"
81 +
        }
82 +
      },
83 +
      "match": "(?<!\\.)\\b(case|if|elsif|unless|until|while)\\b\\s*(\\()*?\\s*([_a-z][0-9A-Z_a-z]*)\\s*((&&|\\|\\|)=)"
84 +
    },
85 +
    {
86 +
      "captures": {
87 +
        "1": {
88 +
          "name": "variable.ruby"
89 +
        },
90 +
        "2": {
91 +
          "name": "keyword.operator.assignment.augmented.ruby"
92 +
        }
93 +
      },
94 +
      "match": "^\\s*([_a-z][0-9A-Z_a-z]*)\\s*(([-%*+/]|\\*\\*|[\\&^|]|<<|>>)=)"
95 +
    },
96 +
    {
97 +
      "captures": {
98 +
        "1": {
99 +
          "name": "keyword.control.ruby"
100 +
        },
101 +
        "3": {
102 +
          "name": "variable.ruby"
103 +
        },
104 +
        "4": {
105 +
          "name": "keyword.operator.assignment.augmented.ruby"
106 +
        }
107 +
      },
108 +
      "match": "(?<!\\.)\\b(case|if|elsif|unless|until|while)\\b\\s*(\\()*?\\s*([_a-z][0-9A-Z_a-z]*)\\s*(([-%*+/]|\\*\\*|[\\&^|]|<<|>>)=)"
109 +
    },
110 +
    {
111 +
      "captures": {
112 +
        "1": {
113 +
          "name": "variable.ruby"
114 +
        }
115 +
      },
116 +
      "match": "^\\s*([_a-z][0-9A-Z_a-z]*)\\s*(?==[^=>])"
117 +
    },
118 +
    {
119 +
      "captures": {
120 +
        "1": {
121 +
          "name": "keyword.control.ruby"
122 +
        },
123 +
        "3": {
124 +
          "name": "variable.ruby"
125 +
        }
126 +
      },
127 +
      "match": "(?<!\\.)\\b(case|if|elsif|unless|until|while)\\b\\s*(\\()*?\\s*([_a-z][0-9A-Z_a-z]*)\\s*=[^=>]"
128 +
    },
129 +
    {
130 +
      "captures": {
131 +
        "1": {
132 +
          "name": "punctuation.definition.constant.hashkey.ruby"
133 +
        }
134 +
      },
135 +
      "match": "(?>[A-Z_a-z]\\w*[!?]?)(:)(?!:)",
136 +
      "name": "constant.language.symbol.hashkey.ruby"
137 +
    },
138 +
    {
139 +
      "captures": {
140 +
        "1": {
141 +
          "name": "punctuation.definition.constant.ruby"
142 +
        }
143 +
      },
144 +
      "match": "(?<!:)(:)(?>[A-Z_a-z]\\w*[!?]?)(?=\\s*=>)",
145 +
      "name": "constant.language.symbol.hashkey.ruby"
146 +
    },
147 +
    {
148 +
      "match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\b(?![!?])",
149 +
      "name": "keyword.control.ruby"
150 +
    },
151 +
    {
152 +
      "match": "(?<!\\.)\\bdo\\b",
153 +
      "name": "keyword.control.start-block.ruby"
154 +
    },
155 +
    {
156 +
      "match": "(?<=\\{)(\\s+)",
157 +
      "name": "meta.syntax.ruby.start-block"
158 +
    },
159 +
    {
160 +
      "match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\b(?![!?])|\\bdefined\\?|\\b(block_given|iterator)\\?",
161 +
      "name": "keyword.control.pseudo-method.ruby"
162 +
    },
163 +
    {
164 +
      "match": "\\bnil\\b(?![!?])",
165 +
      "name": "constant.language.nil.ruby"
166 +
    },
167 +
    {
168 +
      "match": "\\b(true|false)\\b(?![!?])",
169 +
      "name": "constant.language.boolean.ruby"
170 +
    },
171 +
    {
172 +
      "match": "\\b(__(FILE|LINE)__)\\b(?![!?])",
173 +
      "name": "variable.language.ruby"
174 +
    },
175 +
    {
176 +
      "match": "\\bself\\b(?![!?])",
177 +
      "name": "variable.language.self.ruby"
178 +
    },
179 +
    {
180 +
      "match": "\\b(initialize|new|loop|include|extend|prepend|raise|fail|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\b(?![!?])",
181 +
      "name": "keyword.other.special-method.ruby"
182 +
    },
183 +
    {
184 +
      "begin": "\\b(?<!\\.|::)(require(?:|_relative))\\b(?![!?])",
185 +
      "captures": {
186 +
        "1": {
187 +
          "name": "keyword.other.special-method.ruby"
188 +
        }
189 +
      },
190 +
      "end": "$|(?=[#}])",
191 +
      "name": "meta.require.ruby",
192 +
      "patterns": [
193 +
        {
194 +
          "include": "$self"
195 +
        }
196 +
      ]
197 +
    },
198 +
    {
199 +
      "captures": {
200 +
        "1": {
201 +
          "name": "punctuation.definition.variable.ruby"
202 +
        }
203 +
      },
204 +
      "match": "(@)[A-Z_a-z]\\w*",
205 +
      "name": "variable.other.readwrite.instance.ruby"
206 +
    },
207 +
    {
208 +
      "captures": {
209 +
        "1": {
210 +
          "name": "punctuation.definition.variable.ruby"
211 +
        }
212 +
      },
213 +
      "match": "(@@)[A-Z_a-z]\\w*",
214 +
      "name": "variable.other.readwrite.class.ruby"
215 +
    },
216 +
    {
217 +
      "captures": {
218 +
        "1": {
219 +
          "name": "punctuation.definition.variable.ruby"
220 +
        }
221 +
      },
222 +
      "match": "(\\$)[A-Z_a-z]\\w*",
223 +
      "name": "variable.other.readwrite.global.ruby"
224 +
    },
225 +
    {
226 +
      "captures": {
227 +
        "1": {
228 +
          "name": "punctuation.definition.variable.ruby"
229 +
        }
230 +
      },
231 +
      "match": "(\\$)([!\\&'+@`]|\\d+|[\"$*,./:-?\\\\_~]|-[0FIadilpv])",
232 +
      "name": "variable.other.readwrite.global.pre-defined.ruby"
233 +
    },
234 +
    {
235 +
      "begin": "\\b(ENV)\\[",
236 +
      "beginCaptures": {
237 +
        "1": {
238 +
          "name": "variable.other.constant.ruby"
239 +
        }
240 +
      },
241 +
      "end": "]",
242 +
      "name": "meta.environment-variable.ruby",
243 +
      "patterns": [
244 +
        {
245 +
          "include": "$self"
246 +
        }
247 +
      ]
248 +
    },
249 +
    {
250 +
      "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
251 +
      "name": "support.class.ruby"
252 +
    },
253 +
    {
254 +
      "match": "\\b((abort|at_exit|autoload|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|printf??|proc|putc|puts|rand|readlines??|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b(?![!?])|autoload\\?|exit!)",
255 +
      "name": "support.function.kernel.ruby"
256 +
    },
257 +
    {
258 +
      "match": "\\b[A-Z_]\\w*\\b",
259 +
      "name": "variable.other.constant.ruby"
260 +
    },
261 +
    {
262 +
      "begin": "(->)\\(",
263 +
      "beginCaptures": {
264 +
        "1": {
265 +
          "name": "support.function.kernel.ruby"
266 +
        }
267 +
      },
268 +
      "end": "\\)",
269 +
      "patterns": [
270 +
        {
271 +
          "begin": "(?=[\\&*A-Z_a-z])",
272 +
          "end": "(?=[),])",
273 +
          "patterns": [
274 +
            {
275 +
              "include": "#method_parameters"
276 +
            }
277 +
          ]
278 +
        },
279 +
        {
280 +
          "include": "#method_parameters"
281 +
        }
282 +
      ]
283 +
    },
284 +
    {
285 +
      "begin": "(?=def\\b)(?<=^|\\s)(def)\\s+((?>[A-Z_a-z]\\w*(?>\\.|::))?(?>[A-Z_a-z]\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\&/`|]|\\*\\*?|=?~|[-+]@?|\\[]=?))\\s*(\\()",
286 +
      "beginCaptures": {
287 +
        "1": {
288 +
          "name": "keyword.control.def.ruby"
289 +
        },
290 +
        "2": {
291 +
          "name": "entity.name.function.ruby"
292 +
        },
293 +
        "3": {
294 +
          "name": "punctuation.definition.parameters.ruby"
295 +
        }
296 +
      },
297 +
      "end": "\\)",
298 +
      "endCaptures": {
299 +
        "0": {
300 +
          "name": "punctuation.definition.parameters.ruby"
301 +
        }
302 +
      },
303 +
      "name": "meta.function.method.with-arguments.ruby",
304 +
      "patterns": [
305 +
        {
306 +
          "begin": "(?=[\\&*A-Z_a-z])",
307 +
          "end": "(?=[),])",
308 +
          "patterns": [
309 +
            {
310 +
              "include": "#method_parameters"
311 +
            }
312 +
          ]
313 +
        },
314 +
        {
315 +
          "include": "#method_parameters"
316 +
        }
317 +
      ]
318 +
    },
319 +
    {
320 +
      "begin": "(?=def\\b)(?<=^|\\s)(def)\\s+((?>[A-Z_a-z]\\w*(?>\\.|::))?(?>[A-Z_a-z]\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\&/`|]|\\*\\*?|=?~|[-+]@?|\\[]=?))[\\t ](?=[\\t ]*[^#;\\s])",
321 +
      "beginCaptures": {
322 +
        "1": {
323 +
          "name": "keyword.control.def.ruby"
324 +
        },
325 +
        "2": {
326 +
          "name": "entity.name.function.ruby"
327 +
        }
328 +
      },
329 +
      "end": "(?=;)|(?<=[]!\"')?`}\\w])(?=\\s*#|\\s*$)",
330 +
      "name": "meta.function.method.with-arguments.ruby",
331 +
      "patterns": [
332 +
        {
333 +
          "begin": "(?=[\\&*A-Z_a-z])",
334 +
          "end": "(?=[,;]|\\s*#|\\s*$)",
335 +
          "patterns": [
336 +
            {
337 +
              "include": "#method_parameters"
338 +
            }
339 +
          ]
340 +
        },
341 +
        {
342 +
          "include": "#method_parameters"
343 +
        }
344 +
      ]
345 +
    },
346 +
    {
347 +
      "captures": {
348 +
        "1": {
349 +
          "name": "keyword.control.def.ruby"
350 +
        },
351 +
        "3": {
352 +
          "name": "entity.name.function.ruby"
353 +
        }
354 +
      },
355 +
      "match": "(?=def\\b)(?<=^|\\s)(def)\\b(\\s+((?>[A-Z_a-z]\\w*(?>\\.|::))?(?>[A-Z_a-z]\\w*(?>[!?]|=(?!>))?|===?|!=|>[=>]?|<=>|<[<=]?|[%\\&/`|]|\\*\\*?|=?~|[-+]@?|\\[]=?)))?",
356 +
      "name": "meta.function.method.without-arguments.ruby"
357 +
    },
358 +
    {
359 +
      "match": "\\b(\\d(?>_?\\d)*(\\.(?![^\\s\\d])(?>_?\\d)*)?([Ee][-+]?\\d(?>_?\\d)*)?|0(?:[Xx]\\h(?>_?\\h)*|[Oo]?[0-7](?>_?[0-7])*|[Bb][01](?>_?[01])*|[Dd]\\d(?>_?\\d)*))\\b",
360 +
      "name": "constant.numeric.ruby"
361 +
    },
362 +
    {
363 +
      "begin": ":'",
364 +
      "beginCaptures": {
365 +
        "0": {
366 +
          "name": "punctuation.definition.symbol.begin.ruby"
367 +
        }
368 +
      },
369 +
      "end": "'",
370 +
      "endCaptures": {
371 +
        "0": {
372 +
          "name": "punctuation.definition.symbol.end.ruby"
373 +
        }
374 +
      },
375 +
      "name": "constant.language.symbol.ruby",
376 +
      "patterns": [
377 +
        {
378 +
          "match": "\\\\['\\\\]",
379 +
          "name": "constant.character.escape.ruby"
380 +
        }
381 +
      ]
382 +
    },
383 +
    {
384 +
      "begin": ":\"",
385 +
      "beginCaptures": {
386 +
        "0": {
387 +
          "name": "punctuation.section.symbol.begin.ruby"
388 +
        }
389 +
      },
390 +
      "end": "\"",
391 +
      "endCaptures": {
392 +
        "0": {
393 +
          "name": "punctuation.section.symbol.end.ruby"
394 +
        }
395 +
      },
396 +
      "name": "constant.language.symbol.interpolated.ruby",
397 +
      "patterns": [
398 +
        {
399 +
          "include": "#interpolated_ruby"
400 +
        },
401 +
        {
402 +
          "include": "#escaped_char"
403 +
        }
404 +
      ]
405 +
    },
406 +
    {
407 +
      "match": "(?<!\\()/=",
408 +
      "name": "keyword.operator.assignment.augmented.ruby"
409 +
    },
410 +
    {
411 +
      "begin": "'",
412 +
      "beginCaptures": {
413 +
        "0": {
414 +
          "name": "punctuation.definition.string.begin.ruby"
415 +
        }
416 +
      },
417 +
      "end": "'",
418 +
      "endCaptures": {
419 +
        "0": {
420 +
          "name": "punctuation.definition.string.end.ruby"
421 +
        }
422 +
      },
423 +
      "name": "string.quoted.single.ruby",
424 +
      "patterns": [
425 +
        {
426 +
          "match": "\\\\['\\\\]",
427 +
          "name": "constant.character.escape.ruby"
428 +
        }
429 +
      ]
430 +
    },
431 +
    {
432 +
      "begin": "\"",
433 +
      "beginCaptures": {
434 +
        "0": {
435 +
          "name": "punctuation.definition.string.begin.ruby"
436 +
        }
437 +
      },
438 +
      "end": "\"",
439 +
      "endCaptures": {
440 +
        "0": {
441 +
          "name": "punctuation.definition.string.end.ruby"
442 +
        }
443 +
      },
444 +
      "name": "string.quoted.double.interpolated.ruby",
445 +
      "patterns": [
446 +
        {
447 +
          "include": "#interpolated_ruby"
448 +
        },
449 +
        {
450 +
          "include": "#escaped_char"
451 +
        }
452 +
      ]
453 +
    },
454 +
    {
455 +
      "begin": "(?<!\\.)`",
456 +
      "beginCaptures": {
457 +
        "0": {
458 +
          "name": "punctuation.definition.string.begin.ruby"
459 +
        }
460 +
      },
461 +
      "end": "`",
462 +
      "endCaptures": {
463 +
        "0": {
464 +
          "name": "punctuation.definition.string.end.ruby"
465 +
        }
466 +
      },
467 +
      "name": "string.interpolated.ruby",
468 +
      "patterns": [
469 +
        {
470 +
          "include": "#interpolated_ruby"
471 +
        },
472 +
        {
473 +
          "include": "#escaped_char"
474 +
        }
475 +
      ]
476 +
    },
477 +
    {
478 +
      "begin": "(?<![)\\w])((/))(?![*+?])(?!\\s*$)(?=(?:\\\\/|[^/])*+/[eimnosux]*\\s*(?:[]#),.:?}]|\\|\\||&&|<=>|=>|==|=~|!~|!=|;|$|if|else|elsif|then|do|end|unless|while|until|or|and))",
479 +
      "captures": {
480 +
        "1": {
481 +
          "name": "string.regexp.interpolated.ruby"
482 +
        },
483 +
        "2": {
484 +
          "name": "punctuation.section.regexp.ruby"
485 +
        }
486 +
      },
487 +
      "contentName": "string.regexp.interpolated.ruby",
488 +
      "end": "((/[eimnosux]*))",
489 +
      "patterns": [
490 +
        {
491 +
          "include": "#regex_sub"
492 +
        }
493 +
      ]
494 +
    },
495 +
    {
496 +
      "begin": "%r\\{",
497 +
      "beginCaptures": {
498 +
        "0": {
499 +
          "name": "punctuation.section.regexp.begin.ruby"
500 +
        }
501 +
      },
502 +
      "end": "}[eimnosux]*",
503 +
      "endCaptures": {
504 +
        "0": {
505 +
          "name": "punctuation.section.regexp.end.ruby"
506 +
        }
507 +
      },
508 +
      "name": "string.regexp.interpolated.ruby",
509 +
      "patterns": [
510 +
        {
511 +
          "include": "#regex_sub"
512 +
        },
513 +
        {
514 +
          "include": "#nest_curly_r"
515 +
        }
516 +
      ]
517 +
    },
518 +
    {
519 +
      "begin": "%r\\[",
520 +
      "beginCaptures": {
521 +
        "0": {
522 +
          "name": "punctuation.section.regexp.begin.ruby"
523 +
        }
524 +
      },
525 +
      "end": "][eimnosux]*",
526 +
      "endCaptures": {
527 +
        "0": {
528 +
          "name": "punctuation.section.regexp.end.ruby"
529 +
        }
530 +
      },
531 +
      "name": "string.regexp.interpolated.ruby",
532 +
      "patterns": [
533 +
        {
534 +
          "include": "#regex_sub"
535 +
        },
536 +
        {
537 +
          "include": "#nest_brackets_r"
538 +
        }
539 +
      ]
540 +
    },
541 +
    {
542 +
      "begin": "%r\\(",
543 +
      "beginCaptures": {
544 +
        "0": {
545 +
          "name": "punctuation.section.regexp.begin.ruby"
546 +
        }
547 +
      },
548 +
      "end": "\\)[eimnosux]*",
549 +
      "endCaptures": {
550 +
        "0": {
551 +
          "name": "punctuation.section.regexp.end.ruby"
552 +
        }
553 +
      },
554 +
      "name": "string.regexp.interpolated.ruby",
555 +
      "patterns": [
556 +
        {
557 +
          "include": "#regex_sub"
558 +
        },
559 +
        {
560 +
          "include": "#nest_parens_r"
561 +
        }
562 +
      ]
563 +
    },
564 +
    {
565 +
      "begin": "%r<",
566 +
      "beginCaptures": {
567 +
        "0": {
568 +
          "name": "punctuation.section.regexp.begin.ruby"
569 +
        }
570 +
      },
571 +
      "end": ">[eimnosux]*",
572 +
      "endCaptures": {
573 +
        "0": {
574 +
          "name": "punctuation.section.regexp.end.ruby"
575 +
        }
576 +
      },
577 +
      "name": "string.regexp.interpolated.ruby",
578 +
      "patterns": [
579 +
        {
580 +
          "include": "#regex_sub"
581 +
        },
582 +
        {
583 +
          "include": "#nest_ltgt_r"
584 +
        }
585 +
      ]
586 +
    },
587 +
    {
588 +
      "begin": "%r(\\W)",
589 +
      "beginCaptures": {
590 +
        "0": {
591 +
          "name": "punctuation.section.regexp.begin.ruby"
592 +
        }
593 +
      },
594 +
      "end": "\\1[eimnosux]*",
595 +
      "endCaptures": {
596 +
        "0": {
597 +
          "name": "punctuation.section.regexp.end.ruby"
598 +
        }
599 +
      },
600 +
      "name": "string.regexp.interpolated.ruby",
601 +
      "patterns": [
602 +
        {
603 +
          "include": "#regex_sub"
604 +
        }
605 +
      ]
606 +
    },
607 +
    {
608 +
      "begin": "%I\\[",
609 +
      "beginCaptures": {
610 +
        "0": {
611 +
          "name": "punctuation.section.array.begin.ruby"
612 +
        }
613 +
      },
614 +
      "end": "]",
615 +
      "endCaptures": {
616 +
        "0": {
617 +
          "name": "punctuation.section.array.end.ruby"
618 +
        }
619 +
      },
620 +
      "name": "constant.language.symbol.interpolated.ruby",
621 +
      "patterns": [
622 +
        {
623 +
          "include": "#interpolated_ruby"
624 +
        },
625 +
        {
626 +
          "include": "#escaped_char"
627 +
        },
628 +
        {
629 +
          "include": "#nest_brackets_i"
630 +
        }
631 +
      ]
632 +
    },
633 +
    {
634 +
      "begin": "%I\\(",
635 +
      "beginCaptures": {
636 +
        "0": {
637 +
          "name": "punctuation.section.array.begin.ruby"
638 +
        }
639 +
      },
640 +
      "end": "\\)",
641 +
      "endCaptures": {
642 +
        "0": {
643 +
          "name": "punctuation.section.array.end.ruby"
644 +
        }
645 +
      },
646 +
      "name": "constant.language.symbol.interpolated.ruby",
647 +
      "patterns": [
648 +
        {
649 +
          "include": "#interpolated_ruby"
650 +
        },
651 +
        {
652 +
          "include": "#escaped_char"
653 +
        },
654 +
        {
655 +
          "include": "#nest_parens_i"
656 +
        }
657 +
      ]
658 +
    },
659 +
    {
660 +
      "begin": "%I<",
661 +
      "beginCaptures": {
662 +
        "0": {
663 +
          "name": "punctuation.section.array.begin.ruby"
664 +
        }
665 +
      },
666 +
      "end": ">",
667 +
      "endCaptures": {
668 +
        "0": {
669 +
          "name": "punctuation.section.array.end.ruby"
670 +
        }
671 +
      },
672 +
      "name": "constant.language.symbol.interpolated.ruby",
673 +
      "patterns": [
674 +
        {
675 +
          "include": "#interpolated_ruby"
676 +
        },
677 +
        {
678 +
          "include": "#escaped_char"
679 +
        },
680 +
        {
681 +
          "include": "#nest_ltgt_i"
682 +
        }
683 +
      ]
684 +
    },
685 +
    {
686 +
      "begin": "%I\\{",
687 +
      "beginCaptures": {
688 +
        "0": {
689 +
          "name": "punctuation.section.array.begin.ruby"
690 +
        }
691 +
      },
692 +
      "end": "}",
693 +
      "endCaptures": {
694 +
        "0": {
695 +
          "name": "punctuation.section.array.end.ruby"
696 +
        }
697 +
      },
698 +
      "name": "constant.language.symbol.interpolated.ruby",
699 +
      "patterns": [
700 +
        {
701 +
          "include": "#interpolated_ruby"
702 +
        },
703 +
        {
704 +
          "include": "#escaped_char"
705 +
        },
706 +
        {
707 +
          "include": "#nest_curly_i"
708 +
        }
709 +
      ]
710 +
    },
711 +
    {
712 +
      "begin": "%I(\\W)",
713 +
      "beginCaptures": {
714 +
        "0": {
715 +
          "name": "punctuation.section.array.begin.ruby"
716 +
        }
717 +
      },
718 +
      "end": "\\1",
719 +
      "endCaptures": {
720 +
        "0": {
721 +
          "name": "punctuation.section.array.end.ruby"
722 +
        }
723 +
      },
724 +
      "name": "constant.language.symbol.interpolated.ruby",
725 +
      "patterns": [
726 +
        {
727 +
          "include": "#interpolated_ruby"
728 +
        },
729 +
        {
730 +
          "include": "#escaped_char"
731 +
        }
732 +
      ]
733 +
    },
734 +
    {
735 +
      "begin": "%i\\[",
736 +
      "beginCaptures": {
737 +
        "0": {
738 +
          "name": "punctuation.section.array.begin.ruby"
739 +
        }
740 +
      },
741 +
      "end": "]",
742 +
      "endCaptures": {
743 +
        "0": {
744 +
          "name": "punctuation.section.array.end.ruby"
745 +
        }
746 +
      },
747 +
      "name": "constant.language.symbol.ruby",
748 +
      "patterns": [
749 +
        {
750 +
          "match": "\\\\[]\\\\]",
751 +
          "name": "constant.character.escape.ruby"
752 +
        },
753 +
        {
754 +
          "include": "#nest_brackets"
755 +
        }
756 +
      ]
757 +
    },
758 +
    {
759 +
      "begin": "%i\\(",
760 +
      "beginCaptures": {
761 +
        "0": {
762 +
          "name": "punctuation.section.array.begin.ruby"
763 +
        }
764 +
      },
765 +
      "end": "\\)",
766 +
      "endCaptures": {
767 +
        "0": {
768 +
          "name": "punctuation.section.array.end.ruby"
769 +
        }
770 +
      },
771 +
      "name": "constant.language.symbol.ruby",
772 +
      "patterns": [
773 +
        {
774 +
          "match": "\\\\[)\\\\]",
775 +
          "name": "constant.character.escape.ruby"
776 +
        },
777 +
        {
778 +
          "include": "#nest_parens"
779 +
        }
780 +
      ]
781 +
    },
782 +
    {
783 +
      "begin": "%i<",
784 +
      "beginCaptures": {
785 +
        "0": {
786 +
          "name": "punctuation.section.array.begin.ruby"
787 +
        }
788 +
      },
789 +
      "end": ">",
790 +
      "endCaptures": {
791 +
        "0": {
792 +
          "name": "punctuation.section.array.end.ruby"
793 +
        }
794 +
      },
795 +
      "name": "constant.language.symbol.ruby",
796 +
      "patterns": [
797 +
        {
798 +
          "match": "\\\\[>\\\\]",
799 +
          "name": "constant.character.escape.ruby"
800 +
        },
801 +
        {
802 +
          "include": "#nest_ltgt"
803 +
        }
804 +
      ]
805 +
    },
806 +
    {
807 +
      "begin": "%i\\{",
808 +
      "beginCaptures": {
809 +
        "0": {
810 +
          "name": "punctuation.section.array.begin.ruby"
811 +
        }
812 +
      },
813 +
      "end": "}",
814 +
      "endCaptures": {
815 +
        "0": {
816 +
          "name": "punctuation.section.array.end.ruby"
817 +
        }
818 +
      },
819 +
      "name": "constant.language.symbol.ruby",
820 +
      "patterns": [
821 +
        {
822 +
          "match": "\\\\[\\\\}]",
823 +
          "name": "constant.character.escape.ruby"
824 +
        },
825 +
        {
826 +
          "include": "#nest_curly"
827 +
        }
828 +
      ]
829 +
    },
830 +
    {
831 +
      "begin": "%i(\\W)",
832 +
      "beginCaptures": {
833 +
        "0": {
834 +
          "name": "punctuation.section.array.begin.ruby"
835 +
        }
836 +
      },
837 +
      "end": "\\1",
838 +
      "endCaptures": {
839 +
        "0": {
840 +
          "name": "punctuation.section.array.end.ruby"
841 +
        }
842 +
      },
843 +
      "name": "constant.language.symbol.ruby",
844 +
      "patterns": [
845 +
        {
846 +
          "match": "\\\\."
847 +
        }
848 +
      ]
849 +
    },
850 +
    {
851 +
      "begin": "%W\\[",
852 +
      "beginCaptures": {
853 +
        "0": {
854 +
          "name": "punctuation.section.array.begin.ruby"
855 +
        }
856 +
      },
857 +
      "end": "]",
858 +
      "endCaptures": {
859 +
        "0": {
860 +
          "name": "punctuation.section.array.end.ruby"
861 +
        }
862 +
      },
863 +
      "name": "string.quoted.other.interpolated.ruby",
864 +
      "patterns": [
865 +
        {
866 +
          "include": "#interpolated_ruby"
867 +
        },
868 +
        {
869 +
          "include": "#escaped_char"
870 +
        },
871 +
        {
872 +
          "include": "#nest_brackets_i"
873 +
        }
874 +
      ]
875 +
    },
876 +
    {
877 +
      "begin": "%W\\(",
878 +
      "beginCaptures": {
879 +
        "0": {
880 +
          "name": "punctuation.section.array.begin.ruby"
881 +
        }
882 +
      },
883 +
      "end": "\\)",
884 +
      "endCaptures": {
885 +
        "0": {
886 +
          "name": "punctuation.section.array.end.ruby"
887 +
        }
888 +
      },
889 +
      "name": "string.quoted.other.interpolated.ruby",
890 +
      "patterns": [
891 +
        {
892 +
          "include": "#interpolated_ruby"
893 +
        },
894 +
        {
895 +
          "include": "#escaped_char"
896 +
        },
897 +
        {
898 +
          "include": "#nest_parens_i"
899 +
        }
900 +
      ]
901 +
    },
902 +
    {
903 +
      "begin": "%W<",
904 +
      "beginCaptures": {
905 +
        "0": {
906 +
          "name": "punctuation.section.array.begin.ruby"
907 +
        }
908 +
      },
909 +
      "end": ">",
910 +
      "endCaptures": {
911 +
        "0": {
912 +
          "name": "punctuation.section.array.end.ruby"
913 +
        }
914 +
      },
915 +
      "name": "string.quoted.other.interpolated.ruby",
916 +
      "patterns": [
917 +
        {
918 +
          "include": "#interpolated_ruby"
919 +
        },
920 +
        {
921 +
          "include": "#escaped_char"
922 +
        },
923 +
        {
924 +
          "include": "#nest_ltgt_i"
925 +
        }
926 +
      ]
927 +
    },
928 +
    {
929 +
      "begin": "%W\\{",
930 +
      "beginCaptures": {
931 +
        "0": {
932 +
          "name": "punctuation.section.array.begin.ruby"
933 +
        }
934 +
      },
935 +
      "end": "}",
936 +
      "endCaptures": {
937 +
        "0": {
938 +
          "name": "punctuation.section.array.end.ruby"
939 +
        }
940 +
      },
941 +
      "name": "string.quoted.other.interpolated.ruby",
942 +
      "patterns": [
943 +
        {
944 +
          "include": "#interpolated_ruby"
945 +
        },
946 +
        {
947 +
          "include": "#escaped_char"
948 +
        },
949 +
        {
950 +
          "include": "#nest_curly_i"
951 +
        }
952 +
      ]
953 +
    },
954 +
    {
955 +
      "begin": "%W(\\W)",
956 +
      "beginCaptures": {
957 +
        "0": {
958 +
          "name": "punctuation.section.array.begin.ruby"
959 +
        }
960 +
      },
961 +
      "end": "\\1",
962 +
      "endCaptures": {
963 +
        "0": {
964 +
          "name": "punctuation.section.array.end.ruby"
965 +
        }
966 +
      },
967 +
      "name": "string.quoted.other.interpolated.ruby",
968 +
      "patterns": [
969 +
        {
970 +
          "include": "#interpolated_ruby"
971 +
        },
972 +
        {
973 +
          "include": "#escaped_char"
974 +
        }
975 +
      ]
976 +
    },
977 +
    {
978 +
      "begin": "%w\\[",
979 +
      "beginCaptures": {
980 +
        "0": {
981 +
          "name": "punctuation.section.array.begin.ruby"
982 +
        }
983 +
      },
984 +
      "end": "]",
985 +
      "endCaptures": {
986 +
        "0": {
987 +
          "name": "punctuation.section.array.end.ruby"
988 +
        }
989 +
      },
990 +
      "name": "string.quoted.other.ruby",
991 +
      "patterns": [
992 +
        {
993 +
          "match": "\\\\[]\\\\]",
994 +
          "name": "constant.character.escape.ruby"
995 +
        },
996 +
        {
997 +
          "include": "#nest_brackets"
998 +
        }
999 +
      ]
1000 +
    },
1001 +
    {
1002 +
      "begin": "%w\\(",
1003 +
      "beginCaptures": {
1004 +
        "0": {
1005 +
          "name": "punctuation.section.array.begin.ruby"
1006 +
        }
1007 +
      },
1008 +
      "end": "\\)",
1009 +
      "endCaptures": {
1010 +
        "0": {
1011 +
          "name": "punctuation.section.array.end.ruby"
1012 +
        }
1013 +
      },
1014 +
      "name": "string.quoted.other.ruby",
1015 +
      "patterns": [
1016 +
        {
1017 +
          "match": "\\\\[)\\\\]",
1018 +
          "name": "constant.character.escape.ruby"
1019 +
        },
1020 +
        {
1021 +
          "include": "#nest_parens"
1022 +
        }
1023 +
      ]
1024 +
    },
1025 +
    {
1026 +
      "begin": "%w<",
1027 +
      "beginCaptures": {
1028 +
        "0": {
1029 +
          "name": "punctuation.section.array.begin.ruby"
1030 +
        }
1031 +
      },
1032 +
      "end": ">",
1033 +
      "endCaptures": {
1034 +
        "0": {
1035 +
          "name": "punctuation.section.array.end.ruby"
1036 +
        }
1037 +
      },
1038 +
      "name": "string.quoted.other.ruby",
1039 +
      "patterns": [
1040 +
        {
1041 +
          "match": "\\\\[>\\\\]",
1042 +
          "name": "constant.character.escape.ruby"
1043 +
        },
1044 +
        {
1045 +
          "include": "#nest_ltgt"
1046 +
        }
1047 +
      ]
1048 +
    },
1049 +
    {
1050 +
      "begin": "%w\\{",
1051 +
      "beginCaptures": {
1052 +
        "0": {
1053 +
          "name": "punctuation.section.array.begin.ruby"
1054 +
        }
1055 +
      },
1056 +
      "end": "}",
1057 +
      "endCaptures": {
1058 +
        "0": {
1059 +
          "name": "punctuation.section.array.end.ruby"
1060 +
        }
1061 +
      },
1062 +
      "name": "string.quoted.other.ruby",
1063 +
      "patterns": [
1064 +
        {
1065 +
          "match": "\\\\[\\\\}]",
1066 +
          "name": "constant.character.escape.ruby"
1067 +
        },
1068 +
        {
1069 +
          "include": "#nest_curly"
1070 +
        }
1071 +
      ]
1072 +
    },
1073 +
    {
1074 +
      "begin": "%w(\\W)",
1075 +
      "beginCaptures": {
1076 +
        "0": {
1077 +
          "name": "punctuation.section.array.begin.ruby"
1078 +
        }
1079 +
      },
1080 +
      "end": "\\1",
1081 +
      "endCaptures": {
1082 +
        "0": {
1083 +
          "name": "punctuation.section.array.end.ruby"
1084 +
        }
1085 +
      },
1086 +
      "name": "string.quoted.other.ruby",
1087 +
      "patterns": [
1088 +
        {
1089 +
          "match": "\\\\."
1090 +
        }
1091 +
      ]
1092 +
    },
1093 +
    {
1094 +
      "begin": "%[Qx]?\\(",
1095 +
      "beginCaptures": {
1096 +
        "0": {
1097 +
          "name": "punctuation.definition.string.begin.ruby"
1098 +
        }
1099 +
      },
1100 +
      "end": "\\)",
1101 +
      "endCaptures": {
1102 +
        "0": {
1103 +
          "name": "punctuation.definition.string.end.ruby"
1104 +
        }
1105 +
      },
1106 +
      "name": "string.quoted.other.interpolated.ruby",
1107 +
      "patterns": [
1108 +
        {
1109 +
          "include": "#interpolated_ruby"
1110 +
        },
1111 +
        {
1112 +
          "include": "#escaped_char"
1113 +
        },
1114 +
        {
1115 +
          "include": "#nest_parens_i"
1116 +
        }
1117 +
      ]
1118 +
    },
1119 +
    {
1120 +
      "begin": "%[Qx]?\\[",
1121 +
      "beginCaptures": {
1122 +
        "0": {
1123 +
          "name": "punctuation.definition.string.begin.ruby"
1124 +
        }
1125 +
      },
1126 +
      "end": "]",
1127 +
      "endCaptures": {
1128 +
        "0": {
1129 +
          "name": "punctuation.definition.string.end.ruby"
1130 +
        }
1131 +
      },
1132 +
      "name": "string.quoted.other.interpolated.ruby",
1133 +
      "patterns": [
1134 +
        {
1135 +
          "include": "#interpolated_ruby"
1136 +
        },
1137 +
        {
1138 +
          "include": "#escaped_char"
1139 +
        },
1140 +
        {
1141 +
          "include": "#nest_brackets_i"
1142 +
        }
1143 +
      ]
1144 +
    },
1145 +
    {
1146 +
      "begin": "%[Qx]?\\{",
1147 +
      "beginCaptures": {
1148 +
        "0": {
1149 +
          "name": "punctuation.definition.string.begin.ruby"
1150 +
        }
1151 +
      },
1152 +
      "end": "}",
1153 +
      "endCaptures": {
1154 +
        "0": {
1155 +
          "name": "punctuation.definition.string.end.ruby"
1156 +
        }
1157 +
      },
1158 +
      "name": "string.quoted.other.interpolated.ruby",
1159 +
      "patterns": [
1160 +
        {
1161 +
          "include": "#interpolated_ruby"
1162 +
        },
1163 +
        {
1164 +
          "include": "#escaped_char"
1165 +
        },
1166 +
        {
1167 +
          "include": "#nest_curly_i"
1168 +
        }
1169 +
      ]
1170 +
    },
1171 +
    {
1172 +
      "begin": "%[Qx]?<",
1173 +
      "beginCaptures": {
1174 +
        "0": {
1175 +
          "name": "punctuation.definition.string.begin.ruby"
1176 +
        }
1177 +
      },
1178 +
      "end": ">",
1179 +
      "endCaptures": {
1180 +
        "0": {
1181 +
          "name": "punctuation.definition.string.end.ruby"
1182 +
        }
1183 +
      },
1184 +
      "name": "string.quoted.other.interpolated.ruby",
1185 +
      "patterns": [
1186 +
        {
1187 +
          "include": "#interpolated_ruby"
1188 +
        },
1189 +
        {
1190 +
          "include": "#escaped_char"
1191 +
        },
1192 +
        {
1193 +
          "include": "#nest_ltgt_i"
1194 +
        }
1195 +
      ]
1196 +
    },
1197 +
    {
1198 +
      "begin": "%[Qx](\\W)",
1199 +
      "beginCaptures": {
1200 +
        "0": {
1201 +
          "name": "punctuation.definition.string.begin.ruby"
1202 +
        }
1203 +
      },
1204 +
      "end": "\\1",
1205 +
      "endCaptures": {
1206 +
        "0": {
1207 +
          "name": "punctuation.definition.string.end.ruby"
1208 +
        }
1209 +
      },
1210 +
      "name": "string.quoted.other.interpolated.ruby",
1211 +
      "patterns": [
1212 +
        {
1213 +
          "include": "#interpolated_ruby"
1214 +
        },
1215 +
        {
1216 +
          "include": "#escaped_char"
1217 +
        }
1218 +
      ]
1219 +
    },
1220 +
    {
1221 +
      "begin": "%([^=\\w\\s])",
1222 +
      "beginCaptures": {
1223 +
        "0": {
1224 +
          "name": "punctuation.definition.string.begin.ruby"
1225 +
        }
1226 +
      },
1227 +
      "end": "\\1",
1228 +
      "endCaptures": {
1229 +
        "0": {
1230 +
          "name": "punctuation.definition.string.end.ruby"
1231 +
        }
1232 +
      },
1233 +
      "name": "string.quoted.other.interpolated.ruby",
1234 +
      "patterns": [
1235 +
        {
1236 +
          "include": "#interpolated_ruby"
1237 +
        },
1238 +
        {
1239 +
          "include": "#escaped_char"
1240 +
        }
1241 +
      ]
1242 +
    },
1243 +
    {
1244 +
      "begin": "%q\\(",
1245 +
      "beginCaptures": {
1246 +
        "0": {
1247 +
          "name": "punctuation.definition.string.begin.ruby"
1248 +
        }
1249 +
      },
1250 +
      "end": "\\)",
1251 +
      "endCaptures": {
1252 +
        "0": {
1253 +
          "name": "punctuation.definition.string.end.ruby"
1254 +
        }
1255 +
      },
1256 +
      "name": "string.quoted.other.ruby",
1257 +
      "patterns": [
1258 +
        {
1259 +
          "match": "\\\\[)\\\\]",
1260 +
          "name": "constant.character.escape.ruby"
1261 +
        },
1262 +
        {
1263 +
          "include": "#nest_parens"
1264 +
        }
1265 +
      ]
1266 +
    },
1267 +
    {
1268 +
      "begin": "%q<",
1269 +
      "beginCaptures": {
1270 +
        "0": {
1271 +
          "name": "punctuation.definition.string.begin.ruby"
1272 +
        }
1273 +
      },
1274 +
      "end": ">",
1275 +
      "endCaptures": {
1276 +
        "0": {
1277 +
          "name": "punctuation.definition.string.end.ruby"
1278 +
        }
1279 +
      },
1280 +
      "name": "string.quoted.other.ruby",
1281 +
      "patterns": [
1282 +
        {
1283 +
          "match": "\\\\[>\\\\]",
1284 +
          "name": "constant.character.escape.ruby"
1285 +
        },
1286 +
        {
1287 +
          "include": "#nest_ltgt"
1288 +
        }
1289 +
      ]
1290 +
    },
1291 +
    {
1292 +
      "begin": "%q\\[",
1293 +
      "beginCaptures": {
1294 +
        "0": {
1295 +
          "name": "punctuation.definition.string.begin.ruby"
1296 +
        }
1297 +
      },
1298 +
      "end": "]",
1299 +
      "endCaptures": {
1300 +
        "0": {
1301 +
          "name": "punctuation.definition.string.end.ruby"
1302 +
        }
1303 +
      },
1304 +
      "name": "string.quoted.other.ruby",
1305 +
      "patterns": [
1306 +
        {
1307 +
          "match": "\\\\[]\\\\]",
1308 +
          "name": "constant.character.escape.ruby"
1309 +
        },
1310 +
        {
1311 +
          "include": "#nest_brackets"
1312 +
        }
1313 +
      ]
1314 +
    },
1315 +
    {
1316 +
      "begin": "%q\\{",
1317 +
      "beginCaptures": {
1318 +
        "0": {
1319 +
          "name": "punctuation.definition.string.begin.ruby"
1320 +
        }
1321 +
      },
1322 +
      "end": "}",
1323 +
      "endCaptures": {
1324 +
        "0": {
1325 +
          "name": "punctuation.definition.string.end.ruby"
1326 +
        }
1327 +
      },
1328 +
      "name": "string.quoted.other.ruby",
1329 +
      "patterns": [
1330 +
        {
1331 +
          "match": "\\\\[\\\\}]",
1332 +
          "name": "constant.character.escape.ruby"
1333 +
        },
1334 +
        {
1335 +
          "include": "#nest_curly"
1336 +
        }
1337 +
      ]
1338 +
    },
1339 +
    {
1340 +
      "begin": "%q(\\W)",
1341 +
      "beginCaptures": {
1342 +
        "0": {
1343 +
          "name": "punctuation.definition.string.begin.ruby"
1344 +
        }
1345 +
      },
1346 +
      "end": "\\1",
1347 +
      "endCaptures": {
1348 +
        "0": {
1349 +
          "name": "punctuation.definition.string.end.ruby"
1350 +
        }
1351 +
      },
1352 +
      "name": "string.quoted.other.ruby",
1353 +
      "patterns": [
1354 +
        {
1355 +
          "match": "\\\\."
1356 +
        }
1357 +
      ]
1358 +
    },
1359 +
    {
1360 +
      "begin": "%s\\(",
1361 +
      "beginCaptures": {
1362 +
        "0": {
1363 +
          "name": "punctuation.definition.symbol.begin.ruby"
1364 +
        }
1365 +
      },
1366 +
      "end": "\\)",
1367 +
      "endCaptures": {
1368 +
        "0": {
1369 +
          "name": "punctuation.definition.symbol.end.ruby"
1370 +
        }
1371 +
      },
1372 +
      "name": "constant.language.symbol.ruby",
1373 +
      "patterns": [
1374 +
        {
1375 +
          "match": "\\\\[)\\\\]",
1376 +
          "name": "constant.character.escape.ruby"
1377 +
        },
1378 +
        {
1379 +
          "include": "#nest_parens"
1380 +
        }
1381 +
      ]
1382 +
    },
1383 +
    {
1384 +
      "begin": "%s<",
1385 +
      "beginCaptures": {
1386 +
        "0": {
1387 +
          "name": "punctuation.definition.symbol.begin.ruby"
1388 +
        }
1389 +
      },
1390 +
      "end": ">",
1391 +
      "endCaptures": {
1392 +
        "0": {
1393 +
          "name": "punctuation.definition.symbol.end.ruby"
1394 +
        }
1395 +
      },
1396 +
      "name": "constant.language.symbol.ruby",
1397 +
      "patterns": [
1398 +
        {
1399 +
          "match": "\\\\[>\\\\]",
1400 +
          "name": "constant.character.escape.ruby"
1401 +
        },
1402 +
        {
1403 +
          "include": "#nest_ltgt"
1404 +
        }
1405 +
      ]
1406 +
    },
1407 +
    {
1408 +
      "begin": "%s\\[",
1409 +
      "beginCaptures": {
1410 +
        "0": {
1411 +
          "name": "punctuation.definition.symbol.begin.ruby"
1412 +
        }
1413 +
      },
1414 +
      "end": "]",
1415 +
      "endCaptures": {
1416 +
        "0": {
1417 +
          "name": "punctuation.definition.symbol.end.ruby"
1418 +
        }
1419 +
      },
1420 +
      "name": "constant.language.symbol.ruby",
1421 +
      "patterns": [
1422 +
        {
1423 +
          "match": "\\\\[]\\\\]",
1424 +
          "name": "constant.character.escape.ruby"
1425 +
        },
1426 +
        {
1427 +
          "include": "#nest_brackets"
1428 +
        }
1429 +
      ]
1430 +
    },
1431 +
    {
1432 +
      "begin": "%s\\{",
1433 +
      "beginCaptures": {
1434 +
        "0": {
1435 +
          "name": "punctuation.definition.symbol.begin.ruby"
1436 +
        }
1437 +
      },
1438 +
      "end": "}",
1439 +
      "endCaptures": {
1440 +
        "0": {
1441 +
          "name": "punctuation.definition.symbol.end.ruby"
1442 +
        }
1443 +
      },
1444 +
      "name": "constant.language.symbol.ruby",
1445 +
      "patterns": [
1446 +
        {
1447 +
          "match": "\\\\[\\\\}]",
1448 +
          "name": "constant.character.escape.ruby"
1449 +
        },
1450 +
        {
1451 +
          "include": "#nest_curly"
1452 +
        }
1453 +
      ]
1454 +
    },
1455 +
    {
1456 +
      "begin": "%s(\\W)",
1457 +
      "beginCaptures": {
1458 +
        "0": {
1459 +
          "name": "punctuation.definition.symbol.begin.ruby"
1460 +
        }
1461 +
      },
1462 +
      "end": "\\1",
1463 +
      "endCaptures": {
1464 +
        "0": {
1465 +
          "name": "punctuation.definition.symbol.end.ruby"
1466 +
        }
1467 +
      },
1468 +
      "name": "constant.language.symbol.ruby",
1469 +
      "patterns": [
1470 +
        {
1471 +
          "match": "\\\\."
1472 +
        }
1473 +
      ]
1474 +
    },
1475 +
    {
1476 +
      "captures": {
1477 +
        "1": {
1478 +
          "name": "punctuation.definition.constant.ruby"
1479 +
        }
1480 +
      },
1481 +
      "match": "(?<!:)(:)(?>[$A-Z_a-z]\\w*(?>[!?]|=(?![=>]))?|===?|<=>|>[=>]?|<[<=]?|[%\\&/`|]|\\*\\*?|=?~|[-+]@?|\\[]=?|@@?[A-Z_a-z]\\w*)",
1482 +
      "name": "constant.language.symbol.ruby"
1483 +
    },
1484 +
    {
1485 +
      "begin": "^=begin",
1486 +
      "captures": {
1487 +
        "0": {
1488 +
          "name": "punctuation.definition.comment.ruby"
1489 +
        }
1490 +
      },
1491 +
      "end": "^=end",
1492 +
      "name": "comment.block.documentation.ruby"
1493 +
    },
1494 +
    {
1495 +
      "include": "#yard"
1496 +
    },
1497 +
    {
1498 +
      "begin": "(^[\\t ]+)?(?=#)",
1499 +
      "beginCaptures": {
1500 +
        "1": {
1501 +
          "name": "punctuation.whitespace.comment.leading.ruby"
1502 +
        }
1503 +
      },
1504 +
      "end": "(?!\\G)",
1505 +
      "patterns": [
1506 +
        {
1507 +
          "begin": "#",
1508 +
          "beginCaptures": {
1509 +
            "0": {
1510 +
              "name": "punctuation.definition.comment.ruby"
1511 +
            }
1512 +
          },
1513 +
          "end": "\\n",
1514 +
          "name": "comment.line.number-sign.ruby"
1515 +
        }
1516 +
      ]
1517 +
    },
1518 +
    {
1519 +
      "match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^0CMx])|(\\\\[CM]-)+\\w|[^\\\\\\s])",
1520 +
      "name": "constant.numeric.ruby"
1521 +
    },
1522 +
    {
1523 +
      "begin": "^__END__\\n",
1524 +
      "captures": {
1525 +
        "0": {
1526 +
          "name": "string.unquoted.program-block.ruby"
1527 +
        }
1528 +
      },
1529 +
      "contentName": "text.plain",
1530 +
      "end": "(?=not)impossible",
1531 +
      "patterns": [
1532 +
        {
1533 +
          "begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))",
1534 +
          "end": "(?=not)impossible",
1535 +
          "name": "text.html.embedded.ruby",
1536 +
          "patterns": [
1537 +
            {
1538 +
              "include": "text.html.basic"
1539 +
            }
1540 +
          ]
1541 +
        }
1542 +
      ]
1543 +
    },
1544 +
    {
1545 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)HTML)\\b\\1))",
1546 +
      "end": "^\\s*((?:[_\\w]+_|)HTML)$\\n?",
1547 +
      "endCaptures": {
1548 +
        "0": {
1549 +
          "name": "string.definition.end.ruby"
1550 +
        }
1551 +
      },
1552 +
      "name": "meta.embedded.block.html",
1553 +
      "patterns": [
1554 +
        {
1555 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)HTML)\\b\\1)",
1556 +
          "beginCaptures": {
1557 +
            "0": {
1558 +
              "name": "string.definition.begin.ruby"
1559 +
            }
1560 +
          },
1561 +
          "contentName": "text.html",
1562 +
          "patterns": [
1563 +
            {
1564 +
              "include": "#heredoc"
1565 +
            },
1566 +
            {
1567 +
              "include": "#interpolated_ruby"
1568 +
            },
1569 +
            {
1570 +
              "include": "text.html.basic"
1571 +
            },
1572 +
            {
1573 +
              "include": "#escaped_char"
1574 +
            }
1575 +
          ],
1576 +
          "while": "^(?!\\s*((?:[_\\w]+_|)HTML)\\s*$)"
1577 +
        }
1578 +
      ]
1579 +
    },
1580 +
    {
1581 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)HAML)\\b\\1))",
1582 +
      "end": "^\\s*((?:[_\\w]+_|)HAML)$\\n?",
1583 +
      "endCaptures": {
1584 +
        "0": {
1585 +
          "name": "string.definition.end.ruby"
1586 +
        }
1587 +
      },
1588 +
      "name": "meta.embedded.block.haml",
1589 +
      "patterns": [
1590 +
        {
1591 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)HAML)\\b\\1)",
1592 +
          "beginCaptures": {
1593 +
            "0": {
1594 +
              "name": "string.definition.begin.ruby"
1595 +
            }
1596 +
          },
1597 +
          "contentName": "text.haml",
1598 +
          "patterns": [
1599 +
            {
1600 +
              "include": "#heredoc"
1601 +
            },
1602 +
            {
1603 +
              "include": "#interpolated_ruby"
1604 +
            },
1605 +
            {
1606 +
              "include": "text.haml"
1607 +
            },
1608 +
            {
1609 +
              "include": "#escaped_char"
1610 +
            }
1611 +
          ],
1612 +
          "while": "^(?!\\s*((?:[_\\w]+_|)HAML)\\s*$)"
1613 +
        }
1614 +
      ]
1615 +
    },
1616 +
    {
1617 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)XML)\\b\\1))",
1618 +
      "end": "^\\s*((?:[_\\w]+_|)XML)$\\n?",
1619 +
      "endCaptures": {
1620 +
        "0": {
1621 +
          "name": "string.definition.end.ruby"
1622 +
        }
1623 +
      },
1624 +
      "name": "meta.embedded.block.xml",
1625 +
      "patterns": [
1626 +
        {
1627 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)XML)\\b\\1)",
1628 +
          "beginCaptures": {
1629 +
            "0": {
1630 +
              "name": "string.definition.begin.ruby"
1631 +
            }
1632 +
          },
1633 +
          "contentName": "text.xml",
1634 +
          "patterns": [
1635 +
            {
1636 +
              "include": "#heredoc"
1637 +
            },
1638 +
            {
1639 +
              "include": "#interpolated_ruby"
1640 +
            },
1641 +
            {
1642 +
              "include": "text.xml"
1643 +
            },
1644 +
            {
1645 +
              "include": "#escaped_char"
1646 +
            }
1647 +
          ],
1648 +
          "while": "^(?!\\s*((?:[_\\w]+_|)XML)\\s*$)"
1649 +
        }
1650 +
      ]
1651 +
    },
1652 +
    {
1653 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SQL)\\b\\1))",
1654 +
      "end": "^\\s*((?:[_\\w]+_|)SQL)$\\n?",
1655 +
      "endCaptures": {
1656 +
        "0": {
1657 +
          "name": "string.definition.end.ruby"
1658 +
        }
1659 +
      },
1660 +
      "name": "meta.embedded.block.sql",
1661 +
      "patterns": [
1662 +
        {
1663 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SQL)\\b\\1)",
1664 +
          "beginCaptures": {
1665 +
            "0": {
1666 +
              "name": "string.definition.begin.ruby"
1667 +
            }
1668 +
          },
1669 +
          "contentName": "source.sql",
1670 +
          "patterns": [
1671 +
            {
1672 +
              "include": "#heredoc"
1673 +
            },
1674 +
            {
1675 +
              "include": "#interpolated_ruby"
1676 +
            },
1677 +
            {
1678 +
              "include": "source.sql"
1679 +
            },
1680 +
            {
1681 +
              "include": "#escaped_char"
1682 +
            }
1683 +
          ],
1684 +
          "while": "^(?!\\s*((?:[_\\w]+_|)SQL)\\s*$)"
1685 +
        }
1686 +
      ]
1687 +
    },
1688 +
    {
1689 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)G(?:RAPHQL|QL))\\b\\1))",
1690 +
      "end": "^\\s*((?:[_\\w]+_|)G(?:RAPHQL|QL))$\\n?",
1691 +
      "endCaptures": {
1692 +
        "0": {
1693 +
          "name": "string.definition.end.ruby"
1694 +
        }
1695 +
      },
1696 +
      "name": "meta.embedded.block.graphql",
1697 +
      "patterns": [
1698 +
        {
1699 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)G(?:RAPHQL|QL))\\b\\1)",
1700 +
          "beginCaptures": {
1701 +
            "0": {
1702 +
              "name": "string.definition.begin.ruby"
1703 +
            }
1704 +
          },
1705 +
          "contentName": "source.graphql",
1706 +
          "patterns": [
1707 +
            {
1708 +
              "include": "#heredoc"
1709 +
            },
1710 +
            {
1711 +
              "include": "#interpolated_ruby"
1712 +
            },
1713 +
            {
1714 +
              "include": "source.graphql"
1715 +
            },
1716 +
            {
1717 +
              "include": "#escaped_char"
1718 +
            }
1719 +
          ],
1720 +
          "while": "^(?!\\s*((?:[_\\w]+_|)G(?:RAPHQL|QL))\\s*$)"
1721 +
        }
1722 +
      ]
1723 +
    },
1724 +
    {
1725 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)CSS)\\b\\1))",
1726 +
      "end": "^\\s*((?:[_\\w]+_|)CSS)$\\n?",
1727 +
      "endCaptures": {
1728 +
        "0": {
1729 +
          "name": "string.definition.end.ruby"
1730 +
        }
1731 +
      },
1732 +
      "name": "meta.embedded.block.css",
1733 +
      "patterns": [
1734 +
        {
1735 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)CSS)\\b\\1)",
1736 +
          "beginCaptures": {
1737 +
            "0": {
1738 +
              "name": "string.definition.begin.ruby"
1739 +
            }
1740 +
          },
1741 +
          "contentName": "source.css",
1742 +
          "patterns": [
1743 +
            {
1744 +
              "include": "#heredoc"
1745 +
            },
1746 +
            {
1747 +
              "include": "#interpolated_ruby"
1748 +
            },
1749 +
            {
1750 +
              "include": "source.css"
1751 +
            },
1752 +
            {
1753 +
              "include": "#escaped_char"
1754 +
            }
1755 +
          ],
1756 +
          "while": "^(?!\\s*((?:[_\\w]+_|)CSS)\\s*$)"
1757 +
        }
1758 +
      ]
1759 +
    },
1760 +
    {
1761 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)CPP)\\b\\1))",
1762 +
      "end": "^\\s*((?:[_\\w]+_|)CPP)$\\n?",
1763 +
      "endCaptures": {
1764 +
        "0": {
1765 +
          "name": "string.definition.end.ruby"
1766 +
        }
1767 +
      },
1768 +
      "name": "meta.embedded.block.cpp",
1769 +
      "patterns": [
1770 +
        {
1771 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)CPP)\\b\\1)",
1772 +
          "beginCaptures": {
1773 +
            "0": {
1774 +
              "name": "string.definition.begin.ruby"
1775 +
            }
1776 +
          },
1777 +
          "contentName": "source.cpp",
1778 +
          "patterns": [
1779 +
            {
1780 +
              "include": "#heredoc"
1781 +
            },
1782 +
            {
1783 +
              "include": "#interpolated_ruby"
1784 +
            },
1785 +
            {
1786 +
              "include": "source.cpp"
1787 +
            },
1788 +
            {
1789 +
              "include": "#escaped_char"
1790 +
            }
1791 +
          ],
1792 +
          "while": "^(?!\\s*((?:[_\\w]+_|)CPP)\\s*$)"
1793 +
        }
1794 +
      ]
1795 +
    },
1796 +
    {
1797 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)C)\\b\\1))",
1798 +
      "end": "^\\s*((?:[_\\w]+_|)C)$\\n?",
1799 +
      "endCaptures": {
1800 +
        "0": {
1801 +
          "name": "string.definition.end.ruby"
1802 +
        }
1803 +
      },
1804 +
      "name": "meta.embedded.block.c",
1805 +
      "patterns": [
1806 +
        {
1807 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)C)\\b\\1)",
1808 +
          "beginCaptures": {
1809 +
            "0": {
1810 +
              "name": "string.definition.begin.ruby"
1811 +
            }
1812 +
          },
1813 +
          "contentName": "source.c",
1814 +
          "patterns": [
1815 +
            {
1816 +
              "include": "#heredoc"
1817 +
            },
1818 +
            {
1819 +
              "include": "#interpolated_ruby"
1820 +
            },
1821 +
            {
1822 +
              "include": "source.c"
1823 +
            },
1824 +
            {
1825 +
              "include": "#escaped_char"
1826 +
            }
1827 +
          ],
1828 +
          "while": "^(?!\\s*((?:[_\\w]+_|)C)\\s*$)"
1829 +
        }
1830 +
      ]
1831 +
    },
1832 +
    {
1833 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)J(?:S|AVASCRIPT))\\b\\1))",
1834 +
      "end": "^\\s*((?:[_\\w]+_|)J(?:S|AVASCRIPT))$\\n?",
1835 +
      "endCaptures": {
1836 +
        "0": {
1837 +
          "name": "string.definition.end.ruby"
1838 +
        }
1839 +
      },
1840 +
      "name": "meta.embedded.block.js",
1841 +
      "patterns": [
1842 +
        {
1843 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)J(?:S|AVASCRIPT))\\b\\1)",
1844 +
          "beginCaptures": {
1845 +
            "0": {
1846 +
              "name": "string.definition.begin.ruby"
1847 +
            }
1848 +
          },
1849 +
          "contentName": "source.js",
1850 +
          "patterns": [
1851 +
            {
1852 +
              "include": "#heredoc"
1853 +
            },
1854 +
            {
1855 +
              "include": "#interpolated_ruby"
1856 +
            },
1857 +
            {
1858 +
              "include": "source.js"
1859 +
            },
1860 +
            {
1861 +
              "include": "#escaped_char"
1862 +
            }
1863 +
          ],
1864 +
          "while": "^(?!\\s*((?:[_\\w]+_|)J(?:S|AVASCRIPT))\\s*$)"
1865 +
        }
1866 +
      ]
1867 +
    },
1868 +
    {
1869 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
1870 +
      "end": "^\\s*((?:[_\\w]+_|)JQUERY)$\\n?",
1871 +
      "endCaptures": {
1872 +
        "0": {
1873 +
          "name": "string.definition.end.ruby"
1874 +
        }
1875 +
      },
1876 +
      "name": "meta.embedded.block.js.jquery",
1877 +
      "patterns": [
1878 +
        {
1879 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
1880 +
          "beginCaptures": {
1881 +
            "0": {
1882 +
              "name": "string.definition.begin.ruby"
1883 +
            }
1884 +
          },
1885 +
          "contentName": "source.js.jquery",
1886 +
          "patterns": [
1887 +
            {
1888 +
              "include": "#heredoc"
1889 +
            },
1890 +
            {
1891 +
              "include": "#interpolated_ruby"
1892 +
            },
1893 +
            {
1894 +
              "include": "source.js.jquery"
1895 +
            },
1896 +
            {
1897 +
              "include": "#escaped_char"
1898 +
            }
1899 +
          ],
1900 +
          "while": "^(?!\\s*((?:[_\\w]+_|)JQUERY)\\s*$)"
1901 +
        }
1902 +
      ]
1903 +
    },
1904 +
    {
1905 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SH(?:|ELL))\\b\\1))",
1906 +
      "end": "^\\s*((?:[_\\w]+_|)SH(?:|ELL))$\\n?",
1907 +
      "endCaptures": {
1908 +
        "0": {
1909 +
          "name": "string.definition.end.ruby"
1910 +
        }
1911 +
      },
1912 +
      "name": "meta.embedded.block.shell",
1913 +
      "patterns": [
1914 +
        {
1915 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SH(?:|ELL))\\b\\1)",
1916 +
          "beginCaptures": {
1917 +
            "0": {
1918 +
              "name": "string.definition.begin.ruby"
1919 +
            }
1920 +
          },
1921 +
          "contentName": "source.shell",
1922 +
          "patterns": [
1923 +
            {
1924 +
              "include": "#heredoc"
1925 +
            },
1926 +
            {
1927 +
              "include": "#interpolated_ruby"
1928 +
            },
1929 +
            {
1930 +
              "include": "source.shell"
1931 +
            },
1932 +
            {
1933 +
              "include": "#escaped_char"
1934 +
            }
1935 +
          ],
1936 +
          "while": "^(?!\\s*((?:[_\\w]+_|)SH(?:|ELL))\\s*$)"
1937 +
        }
1938 +
      ]
1939 +
    },
1940 +
    {
1941 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)LUA)\\b\\1))",
1942 +
      "end": "^\\s*((?:[_\\w]+_|)LUA)$\\n?",
1943 +
      "endCaptures": {
1944 +
        "0": {
1945 +
          "name": "string.definition.end.ruby"
1946 +
        }
1947 +
      },
1948 +
      "name": "meta.embedded.block.lua",
1949 +
      "patterns": [
1950 +
        {
1951 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)LUA)\\b\\1)",
1952 +
          "beginCaptures": {
1953 +
            "0": {
1954 +
              "name": "string.definition.begin.ruby"
1955 +
            }
1956 +
          },
1957 +
          "contentName": "source.lua",
1958 +
          "patterns": [
1959 +
            {
1960 +
              "include": "#heredoc"
1961 +
            },
1962 +
            {
1963 +
              "include": "#interpolated_ruby"
1964 +
            },
1965 +
            {
1966 +
              "include": "source.lua"
1967 +
            },
1968 +
            {
1969 +
              "include": "#escaped_char"
1970 +
            }
1971 +
          ],
1972 +
          "while": "^(?!\\s*((?:[_\\w]+_|)LUA)\\s*$)"
1973 +
        }
1974 +
      ]
1975 +
    },
1976 +
    {
1977 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)RUBY)\\b\\1))",
1978 +
      "end": "^\\s*((?:[_\\w]+_|)RUBY)$\\n?",
1979 +
      "endCaptures": {
1980 +
        "0": {
1981 +
          "name": "string.definition.end.ruby"
1982 +
        }
1983 +
      },
1984 +
      "name": "meta.embedded.block.ruby",
1985 +
      "patterns": [
1986 +
        {
1987 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)RUBY)\\b\\1)",
1988 +
          "beginCaptures": {
1989 +
            "0": {
1990 +
              "name": "string.definition.begin.ruby"
1991 +
            }
1992 +
          },
1993 +
          "contentName": "source.ruby",
1994 +
          "patterns": [
1995 +
            {
1996 +
              "include": "#heredoc"
1997 +
            },
1998 +
            {
1999 +
              "include": "#interpolated_ruby"
2000 +
            },
2001 +
            {
2002 +
              "include": "source.ruby"
2003 +
            },
2004 +
            {
2005 +
              "include": "#escaped_char"
2006 +
            }
2007 +
          ],
2008 +
          "while": "^(?!\\s*((?:[_\\w]+_|)RUBY)\\s*$)"
2009 +
        }
2010 +
      ]
2011 +
    },
2012 +
    {
2013 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)YA?ML)\\b\\1))",
2014 +
      "end": "^\\s*((?:[_\\w]+_|)YA?ML)$\\n?",
2015 +
      "endCaptures": {
2016 +
        "0": {
2017 +
          "name": "string.definition.end.ruby"
2018 +
        }
2019 +
      },
2020 +
      "name": "meta.embedded.block.yaml",
2021 +
      "patterns": [
2022 +
        {
2023 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)YA?ML)\\b\\1)",
2024 +
          "beginCaptures": {
2025 +
            "0": {
2026 +
              "name": "string.definition.begin.ruby"
2027 +
            }
2028 +
          },
2029 +
          "contentName": "source.yaml",
2030 +
          "patterns": [
2031 +
            {
2032 +
              "include": "#heredoc"
2033 +
            },
2034 +
            {
2035 +
              "include": "#interpolated_ruby"
2036 +
            },
2037 +
            {
2038 +
              "include": "source.yaml"
2039 +
            },
2040 +
            {
2041 +
              "include": "#escaped_char"
2042 +
            }
2043 +
          ],
2044 +
          "while": "^(?!\\s*((?:[_\\w]+_|)YA?ML)\\s*$)"
2045 +
        }
2046 +
      ]
2047 +
    },
2048 +
    {
2049 +
      "begin": "(?=(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SLIM)\\b\\1))",
2050 +
      "end": "^\\s*((?:[_\\w]+_|)SLIM)$\\n?",
2051 +
      "endCaptures": {
2052 +
        "0": {
2053 +
          "name": "string.definition.end.ruby"
2054 +
        }
2055 +
      },
2056 +
      "name": "meta.embedded.block.slim",
2057 +
      "patterns": [
2058 +
        {
2059 +
          "begin": "(?><<[-~]?([\"'`]?)((?:[_\\w]+_|)SLIM)\\b\\1)",
2060 +
          "beginCaptures": {
2061 +
            "0": {
2062 +
              "name": "string.definition.begin.ruby"
2063 +
            }
2064 +
          },
2065 +
          "contentName": "text.slim",
2066 +
          "patterns": [
2067 +
            {
2068 +
              "include": "#heredoc"
2069 +
            },
2070 +
            {
2071 +
              "include": "#interpolated_ruby"
2072 +
            },
2073 +
            {
2074 +
              "include": "text.slim"
2075 +
            },
2076 +
            {
2077 +
              "include": "#escaped_char"
2078 +
            }
2079 +
          ],
2080 +
          "while": "^(?!\\s*((?:[_\\w]+_|)SLIM)\\s*$)"
2081 +
        }
2082 +
      ]
2083 +
    },
2084 +
    {
2085 +
      "begin": "(?>=\\s*<<([\"'`]?)(\\w+)\\1)",
2086 +
      "beginCaptures": {
2087 +
        "0": {
2088 +
          "name": "string.definition.begin.ruby"
2089 +
        }
2090 +
      },
2091 +
      "contentName": "string.unquoted.heredoc.ruby",
2092 +
      "end": "^\\2$",
2093 +
      "endCaptures": {
2094 +
        "0": {
2095 +
          "name": "string.definition.end.ruby"
2096 +
        }
2097 +
      },
2098 +
      "patterns": [
2099 +
        {
2100 +
          "include": "#heredoc"
2101 +
        },
2102 +
        {
2103 +
          "include": "#interpolated_ruby"
2104 +
        },
2105 +
        {
2106 +
          "include": "#escaped_char"
2107 +
        }
2108 +
      ]
2109 +
    },
2110 +
    {
2111 +
      "begin": "(?>((<<[-~]?([\"'`]?)(\\w+)\\3,\\s?)*<<[-~]?([\"'`]?)(\\w+)\\5))(.*)",
2112 +
      "beginCaptures": {
2113 +
        "1": {
2114 +
          "name": "string.definition.begin.ruby"
2115 +
        },
2116 +
        "7": {
2117 +
          "patterns": [
2118 +
            {
2119 +
              "include": "source.ruby"
2120 +
            }
2121 +
          ]
2122 +
        }
2123 +
      },
2124 +
      "contentName": "string.unquoted.heredoc.ruby",
2125 +
      "end": "^\\s*\\6$",
2126 +
      "endCaptures": {
2127 +
        "0": {
2128 +
          "name": "string.definition.end.ruby"
2129 +
        }
2130 +
      },
2131 +
      "patterns": [
2132 +
        {
2133 +
          "include": "#heredoc"
2134 +
        },
2135 +
        {
2136 +
          "include": "#interpolated_ruby"
2137 +
        },
2138 +
        {
2139 +
          "include": "#escaped_char"
2140 +
        }
2141 +
      ]
2142 +
    },
2143 +
    {
2144 +
      "begin": "(?<=\\{|\\{\\s+|[^$0-:@-Z_a-z]do|^do|[^$0-:@-Z_a-z]do\\s+|^do\\s+)(\\|)",
2145 +
      "captures": {
2146 +
        "1": {
2147 +
          "name": "punctuation.separator.variable.ruby"
2148 +
        }
2149 +
      },
2150 +
      "end": "(?<!\\|)(\\|)(?!\\|)",
2151 +
      "name": "meta.block.parameters.ruby",
2152 +
      "patterns": [
2153 +
        {
2154 +
          "begin": "(?![(,|\\s])",
2155 +
          "end": "(?=,|\\|\\s*)",
2156 +
          "patterns": [
2157 +
            {
2158 +
              "captures": {
2159 +
                "1": {
2160 +
                  "name": "storage.type.variable.ruby"
2161 +
                },
2162 +
                "2": {
2163 +
                  "name": "variable.other.block.ruby"
2164 +
                }
2165 +
              },
2166 +
              "match": "\\G((?:&|\\*\\*?)?)([A-Z_a-z][_\\w]*)"
2167 +
            }
2168 +
          ]
2169 +
        },
2170 +
        {
2171 +
          "match": ",",
2172 +
          "name": "punctuation.separator.variable.ruby"
2173 +
        }
2174 +
      ]
2175 +
    },
2176 +
    {
2177 +
      "match": "=>",
2178 +
      "name": "punctuation.separator.key-value"
2179 +
    },
2180 +
    {
2181 +
      "match": "->",
2182 +
      "name": "support.function.kernel.ruby"
2183 +
    },
2184 +
    {
2185 +
      "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<",
2186 +
      "name": "keyword.operator.assignment.augmented.ruby"
2187 +
    },
2188 +
    {
2189 +
      "match": "<=>|<(?![<=])|>(?![<=>])|<=|>=|===?|=~|!=|!~|(?<=[\\t ])\\?",
2190 +
      "name": "keyword.operator.comparison.ruby"
2191 +
    },
2192 +
    {
2193 +
      "match": "(?<!\\.)\\b(and|not|or)\\b(?![!?])",
2194 +
      "name": "keyword.operator.logical.ruby"
2195 +
    },
2196 +
    {
2197 +
      "match": "(?<=^|[\\t !])!|&&|\\|\\||\\^",
2198 +
      "name": "keyword.operator.logical.ruby"
2199 +
    },
2200 +
    {
2201 +
      "captures": {
2202 +
        "1": {
2203 +
          "name": "keyword.operator.logical.ruby"
2204 +
        }
2205 +
      },
2206 +
      "match": "(&\\.)\\s*(?![A-Z])"
2207 +
    },
2208 +
    {
2209 +
      "match": "([%\\&]|\\*\\*|[-*+/])",
2210 +
      "name": "keyword.operator.arithmetic.ruby"
2211 +
    },
2212 +
    {
2213 +
      "match": "=",
2214 +
      "name": "keyword.operator.assignment.ruby"
2215 +
    },
2216 +
    {
2217 +
      "match": "[|~]|>>",
2218 +
      "name": "keyword.operator.other.ruby"
2219 +
    },
2220 +
    {
2221 +
      "match": ";",
2222 +
      "name": "punctuation.separator.statement.ruby"
2223 +
    },
2224 +
    {
2225 +
      "match": ",",
2226 +
      "name": "punctuation.separator.object.ruby"
2227 +
    },
2228 +
    {
2229 +
      "captures": {
2230 +
        "1": {
2231 +
          "name": "punctuation.separator.namespace.ruby"
2232 +
        }
2233 +
      },
2234 +
      "match": "(::)\\s*(?=[A-Z])"
2235 +
    },
2236 +
    {
2237 +
      "captures": {
2238 +
        "1": {
2239 +
          "name": "punctuation.separator.method.ruby"
2240 +
        }
2241 +
      },
2242 +
      "match": "(\\.|::)\\s*(?![A-Z])"
2243 +
    },
2244 +
    {
2245 +
      "match": ":",
2246 +
      "name": "punctuation.separator.other.ruby"
2247 +
    },
2248 +
    {
2249 +
      "match": "\\{",
2250 +
      "name": "punctuation.section.scope.begin.ruby"
2251 +
    },
2252 +
    {
2253 +
      "match": "}",
2254 +
      "name": "punctuation.section.scope.end.ruby"
2255 +
    },
2256 +
    {
2257 +
      "match": "\\[",
2258 +
      "name": "punctuation.section.array.begin.ruby"
2259 +
    },
2260 +
    {
2261 +
      "match": "]",
2262 +
      "name": "punctuation.section.array.end.ruby"
2263 +
    },
2264 +
    {
2265 +
      "match": "[()]",
2266 +
      "name": "punctuation.section.function.ruby"
2267 +
    },
2268 +
    {
2269 +
      "begin": "(?<=[^.]\\.|::)(?=[A-Za-z][!0-9?A-Z_a-z]*[^!0-9?A-Z_a-z])",
2270 +
      "end": "(?<=[!0-9?A-Z_a-z])(?=[^!0-9?A-Z_a-z])",
2271 +
      "name": "meta.function-call.ruby",
2272 +
      "patterns": [
2273 +
        {
2274 +
          "match": "([A-Za-z][!0-9?A-Z_a-z]*)(?=[^!0-9?A-Z_a-z])",
2275 +
          "name": "entity.name.function.ruby"
2276 +
        }
2277 +
      ]
2278 +
    },
2279 +
    {
2280 +
      "begin": "([A-Za-z]\\w*[!?]?)(\\()",
2281 +
      "beginCaptures": {
2282 +
        "1": {
2283 +
          "name": "entity.name.function.ruby"
2284 +
        },
2285 +
        "2": {
2286 +
          "name": "punctuation.section.function.ruby"
2287 +
        }
2288 +
      },
2289 +
      "end": "(\\))",
2290 +
      "endCaptures": {
2291 +
        "1": {
2292 +
          "name": "punctuation.section.function.ruby"
2293 +
        }
2294 +
      },
2295 +
      "name": "meta.function-call.ruby",
2296 +
      "patterns": [
2297 +
        {
2298 +
          "include": "$self"
2299 +
        }
2300 +
      ]
2301 +
    }
2302 +
  ],
2303 +
  "repository": {
2304 +
    "escaped_char": {
2305 +
      "match": "\\\\(?:[0-7]{1,3}|x[A-Fa-f\\d]{1,2}|.)",
2306 +
      "name": "constant.character.escape.ruby"
2307 +
    },
2308 +
    "heredoc": {
2309 +
      "begin": "^<<[-~]?\\w+",
2310 +
      "end": "$",
2311 +
      "patterns": [
2312 +
        {
2313 +
          "include": "$self"
2314 +
        }
2315 +
      ]
2316 +
    },
2317 +
    "interpolated_ruby": {
2318 +
      "patterns": [
2319 +
        {
2320 +
          "begin": "#\\{",
2321 +
          "beginCaptures": {
2322 +
            "0": {
2323 +
              "name": "punctuation.section.embedded.begin.ruby"
2324 +
            }
2325 +
          },
2326 +
          "contentName": "source.ruby",
2327 +
          "end": "}",
2328 +
          "endCaptures": {
2329 +
            "0": {
2330 +
              "name": "punctuation.section.embedded.end.ruby"
2331 +
            }
2332 +
          },
2333 +
          "name": "meta.embedded.line.ruby",
2334 +
          "patterns": [
2335 +
            {
2336 +
              "include": "#nest_curly_and_self"
2337 +
            },
2338 +
            {
2339 +
              "include": "$self"
2340 +
            }
2341 +
          ]
2342 +
        },
2343 +
        {
2344 +
          "captures": {
2345 +
            "1": {
2346 +
              "name": "punctuation.definition.variable.ruby"
2347 +
            }
2348 +
          },
2349 +
          "match": "(#@)[A-Z_a-z]\\w*",
2350 +
          "name": "variable.other.readwrite.instance.ruby"
2351 +
        },
2352 +
        {
2353 +
          "captures": {
2354 +
            "1": {
2355 +
              "name": "punctuation.definition.variable.ruby"
2356 +
            }
2357 +
          },
2358 +
          "match": "(#@@)[A-Z_a-z]\\w*",
2359 +
          "name": "variable.other.readwrite.class.ruby"
2360 +
        },
2361 +
        {
2362 +
          "captures": {
2363 +
            "1": {
2364 +
              "name": "punctuation.definition.variable.ruby"
2365 +
            }
2366 +
          },
2367 +
          "match": "(#\\$)[A-Z_a-z]\\w*",
2368 +
          "name": "variable.other.readwrite.global.ruby"
2369 +
        }
2370 +
      ]
2371 +
    },
2372 +
    "method_parameters": {
2373 +
      "patterns": [
2374 +
        {
2375 +
          "include": "#parens"
2376 +
        },
2377 +
        {
2378 +
          "include": "#braces"
2379 +
        },
2380 +
        {
2381 +
          "include": "#brackets"
2382 +
        },
2383 +
        {
2384 +
          "include": "#params"
2385 +
        },
2386 +
        {
2387 +
          "include": "$self"
2388 +
        }
2389 +
      ],
2390 +
      "repository": {
2391 +
        "braces": {
2392 +
          "begin": "\\{",
2393 +
          "beginCaptures": {
2394 +
            "0": {
2395 +
              "name": "punctuation.section.scope.begin.ruby"
2396 +
            }
2397 +
          },
2398 +
          "end": "}",
2399 +
          "endCaptures": {
2400 +
            "0": {
2401 +
              "name": "punctuation.section.scope.end.ruby"
2402 +
            }
2403 +
          },
2404 +
          "patterns": [
2405 +
            {
2406 +
              "include": "#parens"
2407 +
            },
2408 +
            {
2409 +
              "include": "#braces"
2410 +
            },
2411 +
            {
2412 +
              "include": "#brackets"
2413 +
            },
2414 +
            {
2415 +
              "include": "$self"
2416 +
            }
2417 +
          ]
2418 +
        },
2419 +
        "brackets": {
2420 +
          "begin": "\\[",
2421 +
          "beginCaptures": {
2422 +
            "0": {
2423 +
              "name": "punctuation.section.array.begin.ruby"
2424 +
            }
2425 +
          },
2426 +
          "end": "]",
2427 +
          "endCaptures": {
2428 +
            "0": {
2429 +
              "name": "punctuation.section.array.end.ruby"
2430 +
            }
2431 +
          },
2432 +
          "patterns": [
2433 +
            {
2434 +
              "include": "#parens"
2435 +
            },
2436 +
            {
2437 +
              "include": "#braces"
2438 +
            },
2439 +
            {
2440 +
              "include": "#brackets"
2441 +
            },
2442 +
            {
2443 +
              "include": "$self"
2444 +
            }
2445 +
          ]
2446 +
        },
2447 +
        "params": {
2448 +
          "captures": {
2449 +
            "1": {
2450 +
              "name": "storage.type.variable.ruby"
2451 +
            },
2452 +
            "2": {
2453 +
              "name": "constant.other.symbol.hashkey.parameter.function.ruby"
2454 +
            },
2455 +
            "3": {
2456 +
              "name": "punctuation.definition.constant.ruby"
2457 +
            },
2458 +
            "4": {
2459 +
              "name": "variable.parameter.function.ruby"
2460 +
            }
2461 +
          },
2462 +
          "match": "\\G(&|\\*\\*?)?(?:([A-Z_a-z]\\w*[!?]?(:))|([A-Z_a-z]\\w*))"
2463 +
        },
2464 +
        "parens": {
2465 +
          "begin": "\\(",
2466 +
          "beginCaptures": {
2467 +
            "0": {
2468 +
              "name": "punctuation.section.function.begin.ruby"
2469 +
            }
2470 +
          },
2471 +
          "end": "\\)",
2472 +
          "endCaptures": {
2473 +
            "0": {
2474 +
              "name": "punctuation.section.function.end.ruby"
2475 +
            }
2476 +
          },
2477 +
          "patterns": [
2478 +
            {
2479 +
              "include": "#parens"
2480 +
            },
2481 +
            {
2482 +
              "include": "#braces"
2483 +
            },
2484 +
            {
2485 +
              "include": "#brackets"
2486 +
            },
2487 +
            {
2488 +
              "include": "$self"
2489 +
            }
2490 +
          ]
2491 +
        }
2492 +
      }
2493 +
    },
2494 +
    "nest_brackets": {
2495 +
      "begin": "\\[",
2496 +
      "captures": {
2497 +
        "0": {
2498 +
          "name": "punctuation.section.scope.ruby"
2499 +
        }
2500 +
      },
2501 +
      "end": "]",
2502 +
      "patterns": [
2503 +
        {
2504 +
          "include": "#nest_brackets"
2505 +
        }
2506 +
      ]
2507 +
    },
2508 +
    "nest_brackets_i": {
2509 +
      "begin": "\\[",
2510 +
      "captures": {
2511 +
        "0": {
2512 +
          "name": "punctuation.section.scope.ruby"
2513 +
        }
2514 +
      },
2515 +
      "end": "]",
2516 +
      "patterns": [
2517 +
        {
2518 +
          "include": "#interpolated_ruby"
2519 +
        },
2520 +
        {
2521 +
          "include": "#escaped_char"
2522 +
        },
2523 +
        {
2524 +
          "include": "#nest_brackets_i"
2525 +
        }
2526 +
      ]
2527 +
    },
2528 +
    "nest_brackets_r": {
2529 +
      "begin": "\\[",
2530 +
      "captures": {
2531 +
        "0": {
2532 +
          "name": "punctuation.section.scope.ruby"
2533 +
        }
2534 +
      },
2535 +
      "end": "]",
2536 +
      "patterns": [
2537 +
        {
2538 +
          "include": "#regex_sub"
2539 +
        },
2540 +
        {
2541 +
          "include": "#nest_brackets_r"
2542 +
        }
2543 +
      ]
2544 +
    },
2545 +
    "nest_curly": {
2546 +
      "begin": "\\{",
2547 +
      "captures": {
2548 +
        "0": {
2549 +
          "name": "punctuation.section.scope.ruby"
2550 +
        }
2551 +
      },
2552 +
      "end": "}",
2553 +
      "patterns": [
2554 +
        {
2555 +
          "include": "#nest_curly"
2556 +
        }
2557 +
      ]
2558 +
    },
2559 +
    "nest_curly_and_self": {
2560 +
      "patterns": [
2561 +
        {
2562 +
          "begin": "\\{",
2563 +
          "captures": {
2564 +
            "0": {
2565 +
              "name": "punctuation.section.scope.ruby"
2566 +
            }
2567 +
          },
2568 +
          "end": "}",
2569 +
          "patterns": [
2570 +
            {
2571 +
              "include": "#nest_curly_and_self"
2572 +
            }
2573 +
          ]
2574 +
        },
2575 +
        {
2576 +
          "include": "$self"
2577 +
        }
2578 +
      ]
2579 +
    },
2580 +
    "nest_curly_i": {
2581 +
      "begin": "\\{",
2582 +
      "captures": {
2583 +
        "0": {
2584 +
          "name": "punctuation.section.scope.ruby"
2585 +
        }
2586 +
      },
2587 +
      "end": "}",
2588 +
      "patterns": [
2589 +
        {
2590 +
          "include": "#interpolated_ruby"
2591 +
        },
2592 +
        {
2593 +
          "include": "#escaped_char"
2594 +
        },
2595 +
        {
2596 +
          "include": "#nest_curly_i"
2597 +
        }
2598 +
      ]
2599 +
    },
2600 +
    "nest_curly_r": {
2601 +
      "begin": "\\{",
2602 +
      "captures": {
2603 +
        "0": {
2604 +
          "name": "punctuation.section.scope.ruby"
2605 +
        }
2606 +
      },
2607 +
      "end": "}",
2608 +
      "patterns": [
2609 +
        {
2610 +
          "include": "#regex_sub"
2611 +
        },
2612 +
        {
2613 +
          "include": "#nest_curly_r"
2614 +
        }
2615 +
      ]
2616 +
    },
2617 +
    "nest_ltgt": {
2618 +
      "begin": "<",
2619 +
      "captures": {
2620 +
        "0": {
2621 +
          "name": "punctuation.section.scope.ruby"
2622 +
        }
2623 +
      },
2624 +
      "end": ">",
2625 +
      "patterns": [
2626 +
        {
2627 +
          "include": "#nest_ltgt"
2628 +
        }
2629 +
      ]
2630 +
    },
2631 +
    "nest_ltgt_i": {
2632 +
      "begin": "<",
2633 +
      "captures": {
2634 +
        "0": {
2635 +
          "name": "punctuation.section.scope.ruby"
2636 +
        }
2637 +
      },
2638 +
      "end": ">",
2639 +
      "patterns": [
2640 +
        {
2641 +
          "include": "#interpolated_ruby"
2642 +
        },
2643 +
        {
2644 +
          "include": "#escaped_char"
2645 +
        },
2646 +
        {
2647 +
          "include": "#nest_ltgt_i"
2648 +
        }
2649 +
      ]
2650 +
    },
2651 +
    "nest_ltgt_r": {
2652 +
      "begin": "<",
2653 +
      "captures": {
2654 +
        "0": {
2655 +
          "name": "punctuation.section.scope.ruby"
2656 +
        }
2657 +
      },
2658 +
      "end": ">",
2659 +
      "patterns": [
2660 +
        {
2661 +
          "include": "#regex_sub"
2662 +
        },
2663 +
        {
2664 +
          "include": "#nest_ltgt_r"
2665 +
        }
2666 +
      ]
2667 +
    },
2668 +
    "nest_parens": {
2669 +
      "begin": "\\(",
2670 +
      "captures": {
2671 +
        "0": {
2672 +
          "name": "punctuation.section.scope.ruby"
2673 +
        }
2674 +
      },
2675 +
      "end": "\\)",
2676 +
      "patterns": [
2677 +
        {
2678 +
          "include": "#nest_parens"
2679 +
        }
2680 +
      ]
2681 +
    },
2682 +
    "nest_parens_i": {
2683 +
      "begin": "\\(",
2684 +
      "captures": {
2685 +
        "0": {
2686 +
          "name": "punctuation.section.scope.ruby"
2687 +
        }
2688 +
      },
2689 +
      "end": "\\)",
2690 +
      "patterns": [
2691 +
        {
2692 +
          "include": "#interpolated_ruby"
2693 +
        },
2694 +
        {
2695 +
          "include": "#escaped_char"
2696 +
        },
2697 +
        {
2698 +
          "include": "#nest_parens_i"
2699 +
        }
2700 +
      ]
2701 +
    },
2702 +
    "nest_parens_r": {
2703 +
      "begin": "\\(",
2704 +
      "captures": {
2705 +
        "0": {
2706 +
          "name": "punctuation.section.scope.ruby"
2707 +
        }
2708 +
      },
2709 +
      "end": "\\)",
2710 +
      "patterns": [
2711 +
        {
2712 +
          "include": "#regex_sub"
2713 +
        },
2714 +
        {
2715 +
          "include": "#nest_parens_r"
2716 +
        }
2717 +
      ]
2718 +
    },
2719 +
    "regex_sub": {
2720 +
      "patterns": [
2721 +
        {
2722 +
          "include": "#interpolated_ruby"
2723 +
        },
2724 +
        {
2725 +
          "include": "#escaped_char"
2726 +
        },
2727 +
        {
2728 +
          "captures": {
2729 +
            "1": {
2730 +
              "name": "punctuation.definition.arbitrary-repetition.ruby"
2731 +
            },
2732 +
            "3": {
2733 +
              "name": "punctuation.definition.arbitrary-repetition.ruby"
2734 +
            }
2735 +
          },
2736 +
          "match": "(\\{)\\d+(,\\d+)?(})",
2737 +
          "name": "string.regexp.arbitrary-repetition.ruby"
2738 +
        },
2739 +
        {
2740 +
          "begin": "\\[(?:\\^?])?",
2741 +
          "captures": {
2742 +
            "0": {
2743 +
              "name": "punctuation.definition.character-class.ruby"
2744 +
            }
2745 +
          },
2746 +
          "end": "]",
2747 +
          "name": "string.regexp.character-class.ruby",
2748 +
          "patterns": [
2749 +
            {
2750 +
              "include": "#escaped_char"
2751 +
            }
2752 +
          ]
2753 +
        },
2754 +
        {
2755 +
          "begin": "\\(\\?#",
2756 +
          "beginCaptures": {
2757 +
            "0": {
2758 +
              "name": "punctuation.definition.comment.begin.ruby"
2759 +
            }
2760 +
          },
2761 +
          "end": "\\)",
2762 +
          "endCaptures": {
2763 +
            "0": {
2764 +
              "name": "punctuation.definition.comment.end.ruby"
2765 +
            }
2766 +
          },
2767 +
          "name": "comment.line.number-sign.ruby",
2768 +
          "patterns": [
2769 +
            {
2770 +
              "include": "#escaped_char"
2771 +
            }
2772 +
          ]
2773 +
        },
2774 +
        {
2775 +
          "begin": "\\(",
2776 +
          "captures": {
2777 +
            "0": {
2778 +
              "name": "punctuation.definition.group.ruby"
2779 +
            }
2780 +
          },
2781 +
          "end": "\\)",
2782 +
          "name": "string.regexp.group.ruby",
2783 +
          "patterns": [
2784 +
            {
2785 +
              "include": "#regex_sub"
2786 +
            }
2787 +
          ]
2788 +
        },
2789 +
        {
2790 +
          "begin": "(?<=^|\\s)(#)\\s(?=[-\\t !,.0-9?A-Za-z[^\\x00-\\x7F]]*$)",
2791 +
          "beginCaptures": {
2792 +
            "1": {
2793 +
              "name": "punctuation.definition.comment.ruby"
2794 +
            }
2795 +
          },
2796 +
          "end": "$\\n?",
2797 +
          "endCaptures": {
2798 +
            "0": {
2799 +
              "name": "punctuation.definition.comment.ruby"
2800 +
            }
2801 +
          },
2802 +
          "name": "comment.line.number-sign.ruby"
2803 +
        }
2804 +
      ]
2805 +
    },
2806 +
    "yard": {
2807 +
      "patterns": [
2808 +
        {
2809 +
          "include": "#yard_comment"
2810 +
        },
2811 +
        {
2812 +
          "include": "#yard_param_types"
2813 +
        },
2814 +
        {
2815 +
          "include": "#yard_option"
2816 +
        },
2817 +
        {
2818 +
          "include": "#yard_tag"
2819 +
        },
2820 +
        {
2821 +
          "include": "#yard_types"
2822 +
        },
2823 +
        {
2824 +
          "include": "#yard_directive"
2825 +
        },
2826 +
        {
2827 +
          "include": "#yard_see"
2828 +
        },
2829 +
        {
2830 +
          "include": "#yard_macro_attribute"
2831 +
        }
2832 +
      ]
2833 +
    },
2834 +
    "yard_comment": {
2835 +
      "begin": "^(\\s*)(#)(\\s*)(@)(abstract|api|author|deprecated|example|macro|note|overload|since|todo|version)(?=\\s|$)",
2836 +
      "beginCaptures": {
2837 +
        "2": {
2838 +
          "name": "punctuation.definition.comment.ruby"
2839 +
        },
2840 +
        "4": {
2841 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
2842 +
        },
2843 +
        "5": {
2844 +
          "name": "comment.line.keyword.yard.ruby"
2845 +
        }
2846 +
      },
2847 +
      "contentName": "comment.line.string.yard.ruby",
2848 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
2849 +
      "name": "comment.line.number-sign.ruby",
2850 +
      "patterns": [
2851 +
        {
2852 +
          "include": "#yard"
2853 +
        },
2854 +
        {
2855 +
          "include": "#yard_continuation"
2856 +
        }
2857 +
      ]
2858 +
    },
2859 +
    "yard_continuation": {
2860 +
      "match": "^\\s*#",
2861 +
      "name": "punctuation.definition.comment.ruby"
2862 +
    },
2863 +
    "yard_directive": {
2864 +
      "begin": "^(\\s*)(#)(\\s*)(@!)(endgroup|group|method|parse|scope|visibility)(\\s+((\\[).+(])))?(?=\\s)",
2865 +
      "beginCaptures": {
2866 +
        "2": {
2867 +
          "name": "punctuation.definition.comment.ruby"
2868 +
        },
2869 +
        "4": {
2870 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
2871 +
        },
2872 +
        "5": {
2873 +
          "name": "comment.line.keyword.yard.ruby"
2874 +
        },
2875 +
        "7": {
2876 +
          "name": "comment.line.type.yard.ruby"
2877 +
        },
2878 +
        "8": {
2879 +
          "name": "comment.line.punctuation.yard.ruby"
2880 +
        },
2881 +
        "9": {
2882 +
          "name": "comment.line.punctuation.yard.ruby"
2883 +
        }
2884 +
      },
2885 +
      "contentName": "comment.line.string.yard.ruby",
2886 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
2887 +
      "name": "comment.line.number-sign.ruby",
2888 +
      "patterns": [
2889 +
        {
2890 +
          "include": "#yard"
2891 +
        },
2892 +
        {
2893 +
          "include": "#yard_continuation"
2894 +
        }
2895 +
      ]
2896 +
    },
2897 +
    "yard_macro_attribute": {
2898 +
      "begin": "^(\\s*)(#)(\\s*)(@!)(attribute|macro)(\\s+((\\[).+(])))?(?=\\s)(\\s+([_a-z]\\w*:?))?",
2899 +
      "beginCaptures": {
2900 +
        "11": {
2901 +
          "name": "comment.line.parameter.yard.ruby"
2902 +
        },
2903 +
        "2": {
2904 +
          "name": "punctuation.definition.comment.ruby"
2905 +
        },
2906 +
        "4": {
2907 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
2908 +
        },
2909 +
        "5": {
2910 +
          "name": "comment.line.keyword.yard.ruby"
2911 +
        },
2912 +
        "7": {
2913 +
          "name": "comment.line.type.yard.ruby"
2914 +
        },
2915 +
        "8": {
2916 +
          "name": "comment.line.punctuation.yard.ruby"
2917 +
        },
2918 +
        "9": {
2919 +
          "name": "comment.line.punctuation.yard.ruby"
2920 +
        }
2921 +
      },
2922 +
      "contentName": "comment.line.string.yard.ruby",
2923 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
2924 +
      "name": "comment.line.number-sign.ruby",
2925 +
      "patterns": [
2926 +
        {
2927 +
          "include": "#yard"
2928 +
        },
2929 +
        {
2930 +
          "include": "#yard_continuation"
2931 +
        }
2932 +
      ]
2933 +
    },
2934 +
    "yard_option": {
2935 +
      "begin": "^(\\s*)(#)(\\s*)(@)(option)(?=\\s)(?>\\s+([_a-z]\\w*:?))?(?>\\s+((\\[).+(])))?(?>\\s+((\\S*)))?(?>\\s+((\\().+(\\))))?",
2936 +
      "beginCaptures": {
2937 +
        "10": {
2938 +
          "name": "comment.line.keyword.yard.ruby"
2939 +
        },
2940 +
        "11": {
2941 +
          "name": "comment.line.hashkey.yard.ruby"
2942 +
        },
2943 +
        "12": {
2944 +
          "name": "comment.line.defaultvalue.yard.ruby"
2945 +
        },
2946 +
        "13": {
2947 +
          "name": "comment.line.punctuation.yard.ruby"
2948 +
        },
2949 +
        "14": {
2950 +
          "name": "comment.line.punctuation.yard.ruby"
2951 +
        },
2952 +
        "2": {
2953 +
          "name": "punctuation.definition.comment.ruby"
2954 +
        },
2955 +
        "4": {
2956 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
2957 +
        },
2958 +
        "5": {
2959 +
          "name": "comment.line.keyword.yard.ruby"
2960 +
        },
2961 +
        "6": {
2962 +
          "name": "comment.line.parameter.yard.ruby"
2963 +
        },
2964 +
        "7": {
2965 +
          "name": "comment.line.type.yard.ruby"
2966 +
        },
2967 +
        "8": {
2968 +
          "name": "comment.line.punctuation.yard.ruby"
2969 +
        },
2970 +
        "9": {
2971 +
          "name": "comment.line.punctuation.yard.ruby"
2972 +
        }
2973 +
      },
2974 +
      "contentName": "comment.line.string.yard.ruby",
2975 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
2976 +
      "name": "comment.line.number-sign.ruby",
2977 +
      "patterns": [
2978 +
        {
2979 +
          "include": "#yard"
2980 +
        },
2981 +
        {
2982 +
          "include": "#yard_continuation"
2983 +
        }
2984 +
      ]
2985 +
    },
2986 +
    "yard_param_types": {
2987 +
      "begin": "^(\\s*)(#)(\\s*)(@)(attr|attr_reader|attr_writer|yieldparam|param)(?=\\s)(?>\\s+(?>([_a-z]\\w*:?)|((\\[).+(]))))?(?>\\s+(?>((\\[).+(]))|([_a-z]\\w*:?)))?",
2988 +
      "beginCaptures": {
2989 +
        "10": {
2990 +
          "name": "comment.line.type.yard.ruby"
2991 +
        },
2992 +
        "11": {
2993 +
          "name": "comment.line.punctuation.yard.ruby"
2994 +
        },
2995 +
        "12": {
2996 +
          "name": "comment.line.punctuation.yard.ruby"
2997 +
        },
2998 +
        "13": {
2999 +
          "name": "comment.line.parameter.yard.ruby"
3000 +
        },
3001 +
        "2": {
3002 +
          "name": "punctuation.definition.comment.ruby"
3003 +
        },
3004 +
        "4": {
3005 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
3006 +
        },
3007 +
        "5": {
3008 +
          "name": "comment.line.keyword.yard.ruby"
3009 +
        },
3010 +
        "6": {
3011 +
          "name": "comment.line.parameter.yard.ruby"
3012 +
        },
3013 +
        "7": {
3014 +
          "name": "comment.line.type.yard.ruby"
3015 +
        },
3016 +
        "8": {
3017 +
          "name": "comment.line.punctuation.yard.ruby"
3018 +
        },
3019 +
        "9": {
3020 +
          "name": "comment.line.punctuation.yard.ruby"
3021 +
        }
3022 +
      },
3023 +
      "contentName": "comment.line.string.yard.ruby",
3024 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
3025 +
      "name": "comment.line.number-sign.ruby",
3026 +
      "patterns": [
3027 +
        {
3028 +
          "include": "#yard"
3029 +
        },
3030 +
        {
3031 +
          "include": "#yard_continuation"
3032 +
        }
3033 +
      ]
3034 +
    },
3035 +
    "yard_see": {
3036 +
      "begin": "^(\\s*)(#)(\\s*)(@)(see)(?=\\s)(\\s+(.+?))?(?=\\s|$)",
3037 +
      "beginCaptures": {
3038 +
        "2": {
3039 +
          "name": "punctuation.definition.comment.ruby"
3040 +
        },
3041 +
        "4": {
3042 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
3043 +
        },
3044 +
        "5": {
3045 +
          "name": "comment.line.keyword.yard.ruby"
3046 +
        },
3047 +
        "7": {
3048 +
          "name": "comment.line.parameter.yard.ruby"
3049 +
        }
3050 +
      },
3051 +
      "contentName": "comment.line.string.yard.ruby",
3052 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
3053 +
      "name": "comment.line.number-sign.ruby",
3054 +
      "patterns": [
3055 +
        {
3056 +
          "include": "#yard"
3057 +
        },
3058 +
        {
3059 +
          "include": "#yard_continuation"
3060 +
        }
3061 +
      ]
3062 +
    },
3063 +
    "yard_tag": {
3064 +
      "captures": {
3065 +
        "2": {
3066 +
          "name": "punctuation.definition.comment.ruby"
3067 +
        },
3068 +
        "4": {
3069 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
3070 +
        },
3071 +
        "5": {
3072 +
          "name": "comment.line.keyword.yard.ruby"
3073 +
        }
3074 +
      },
3075 +
      "match": "^(\\s*)(#)(\\s*)(@)(private)$",
3076 +
      "name": "comment.line.number-sign.ruby"
3077 +
    },
3078 +
    "yard_types": {
3079 +
      "begin": "^(\\s*)(#)(\\s*)(@)(raise|return|yield(?:return)?)(?=\\s)(\\s+((\\[).+(])))?",
3080 +
      "beginCaptures": {
3081 +
        "2": {
3082 +
          "name": "punctuation.definition.comment.ruby"
3083 +
        },
3084 +
        "4": {
3085 +
          "name": "comment.line.keyword.punctuation.yard.ruby"
3086 +
        },
3087 +
        "5": {
3088 +
          "name": "comment.line.keyword.yard.ruby"
3089 +
        },
3090 +
        "7": {
3091 +
          "name": "comment.line.type.yard.ruby"
3092 +
        },
3093 +
        "8": {
3094 +
          "name": "comment.line.punctuation.yard.ruby"
3095 +
        },
3096 +
        "9": {
3097 +
          "name": "comment.line.punctuation.yard.ruby"
3098 +
        }
3099 +
      },
3100 +
      "contentName": "comment.line.string.yard.ruby",
3101 +
      "end": "^(?!\\s*#\\3\\s{2,}|\\s*#\\s*$)",
3102 +
      "name": "comment.line.number-sign.ruby",
3103 +
      "patterns": [
3104 +
        {
3105 +
          "include": "#yard"
3106 +
        },
3107 +
        {
3108 +
          "include": "#yard_continuation"
3109 +
        }
3110 +
      ]
3111 +
    }
3112 +
  },
3113 +
  "scopeName": "source.ruby"
3114 +
}
crates/highlight/syntaxes/shellscript.json added +2375 -0
1 +
{
2 +
  "displayName": "Shell",
3 +
  "name": "shellscript",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#initial_context"
7 +
    }
8 +
  ],
9 +
  "repository": {
10 +
    "alias_statement": {
11 +
      "begin": "[\\t ]*+(alias)[\\t ]*+((?:((?<!\\w)-\\w+)\\b[\\t ]*+)*)[\\t ]*+((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))(?:(\\[)((?:(?:\\$?(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)|@)|\\*)|(-?\\d+))(]))?(?:(?:(=)|(\\+=))|(-=))",
12 +
      "beginCaptures": {
13 +
        "1": {
14 +
          "name": "storage.type.alias.shell"
15 +
        },
16 +
        "10": {
17 +
          "name": "keyword.operator.assignment.compound.shell"
18 +
        },
19 +
        "11": {
20 +
          "name": "keyword.operator.assignment.compound.shell"
21 +
        },
22 +
        "2": {
23 +
          "patterns": [
24 +
            {
25 +
              "match": "(?<!\\w)-\\w+\\b",
26 +
              "name": "string.unquoted.argument.shell constant.other.option.shell"
27 +
            }
28 +
          ]
29 +
        },
30 +
        "3": {
31 +
          "name": "string.unquoted.argument.shell constant.other.option.shell"
32 +
        },
33 +
        "4": {
34 +
          "name": "variable.other.assignment.shell"
35 +
        },
36 +
        "5": {
37 +
          "name": "punctuation.definition.array.access.shell"
38 +
        },
39 +
        "6": {
40 +
          "name": "variable.other.assignment.shell"
41 +
        },
42 +
        "7": {
43 +
          "name": "constant.numeric.shell constant.numeric.integer.shell"
44 +
        },
45 +
        "8": {
46 +
          "name": "punctuation.definition.array.access.shell"
47 +
        },
48 +
        "9": {
49 +
          "name": "keyword.operator.assignment.shell"
50 +
        }
51 +
      },
52 +
      "end": "(?=[\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))",
53 +
      "endCaptures": {
54 +
        "1": {
55 +
          "name": "punctuation.terminator.statement.semicolon.shell"
56 +
        },
57 +
        "2": {
58 +
          "name": "punctuation.separator.statement.and.shell"
59 +
        },
60 +
        "3": {
61 +
          "name": "punctuation.separator.statement.or.shell"
62 +
        },
63 +
        "4": {
64 +
          "name": "punctuation.separator.statement.background.shell"
65 +
        }
66 +
      },
67 +
      "name": "meta.expression.assignment.alias.shell",
68 +
      "patterns": [
69 +
        {
70 +
          "include": "#normal_context"
71 +
        }
72 +
      ]
73 +
    },
74 +
    "argument": {
75 +
      "begin": "[\\t ]++(?![\\n#\\&(\\[|]|$|;)",
76 +
      "beginCaptures": {
77 +
      },
78 +
      "end": "(?=[\\t \\&;|]|$|[\\n)`])",
79 +
      "endCaptures": {
80 +
      },
81 +
      "name": "meta.argument.shell",
82 +
      "patterns": [
83 +
        {
84 +
          "include": "#argument_context"
85 +
        },
86 +
        {
87 +
          "include": "#line_continuation"
88 +
        }
89 +
      ]
90 +
    },
91 +
    "argument_context": {
92 +
      "patterns": [
93 +
        {
94 +
          "captures": {
95 +
            "1": {
96 +
              "name": "string.unquoted.argument.shell",
97 +
              "patterns": [
98 +
                {
99 +
                  "match": "\\*",
100 +
                  "name": "variable.language.special.wildcard.shell"
101 +
                },
102 +
                {
103 +
                  "include": "#variable"
104 +
                },
105 +
                {
106 +
                  "include": "#numeric_literal"
107 +
                },
108 +
                {
109 +
                  "captures": {
110 +
                    "1": {
111 +
                      "name": "constant.language.$1.shell"
112 +
                    }
113 +
                  },
114 +
                  "match": "(?<!\\w)\\b(true|false)\\b(?!\\w)"
115 +
                }
116 +
              ]
117 +
            }
118 +
          },
119 +
          "match": "[\\t ]*+([^\\t\\n \"$\\&-);<>\\\\`|]+(?!>))"
120 +
        },
121 +
        {
122 +
          "include": "#normal_context"
123 +
        }
124 +
      ]
125 +
    },
126 +
    "arithmetic_double": {
127 +
      "patterns": [
128 +
        {
129 +
          "begin": "\\(\\(",
130 +
          "beginCaptures": {
131 +
            "0": {
132 +
              "name": "punctuation.section.arithmetic.double.shell"
133 +
            }
134 +
          },
135 +
          "end": "\\)\\s*\\)",
136 +
          "endCaptures": {
137 +
            "0": {
138 +
              "name": "punctuation.section.arithmetic.double.shell"
139 +
            }
140 +
          },
141 +
          "name": "meta.arithmetic.shell",
142 +
          "patterns": [
143 +
            {
144 +
              "include": "#math"
145 +
            },
146 +
            {
147 +
              "include": "#string"
148 +
            }
149 +
          ]
150 +
        }
151 +
      ]
152 +
    },
153 +
    "arithmetic_no_dollar": {
154 +
      "patterns": [
155 +
        {
156 +
          "begin": "\\(",
157 +
          "beginCaptures": {
158 +
            "0": {
159 +
              "name": "punctuation.section.arithmetic.single.shell"
160 +
            }
161 +
          },
162 +
          "end": "\\)",
163 +
          "endCaptures": {
164 +
            "0": {
165 +
              "name": "punctuation.section.arithmetic.single.shell"
166 +
            }
167 +
          },
168 +
          "name": "meta.arithmetic.shell",
169 +
          "patterns": [
170 +
            {
171 +
              "include": "#math"
172 +
            },
173 +
            {
174 +
              "include": "#string"
175 +
            }
176 +
          ]
177 +
        }
178 +
      ]
179 +
    },
180 +
    "array_access_inline": {
181 +
      "captures": {
182 +
        "1": {
183 +
          "name": "punctuation.section.array.shell"
184 +
        },
185 +
        "2": {
186 +
          "patterns": [
187 +
            {
188 +
              "include": "#special_expansion"
189 +
            },
190 +
            {
191 +
              "include": "#string"
192 +
            },
193 +
            {
194 +
              "include": "#variable"
195 +
            }
196 +
          ]
197 +
        },
198 +
        "3": {
199 +
          "name": "punctuation.section.array.shell"
200 +
        }
201 +
      },
202 +
      "match": "(\\[)([^]\\[]+)(])"
203 +
    },
204 +
    "array_value": {
205 +
      "begin": "[\\t ]*+((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))(?:(\\[)((?:(?:\\$?(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)|@)|\\*)|(-?\\d+))(]))?(?:(?:(=)|(\\+=))|(-=))[\\t ]*+(\\()",
206 +
      "beginCaptures": {
207 +
        "1": {
208 +
          "name": "variable.other.assignment.shell"
209 +
        },
210 +
        "2": {
211 +
          "name": "punctuation.definition.array.access.shell"
212 +
        },
213 +
        "3": {
214 +
          "name": "variable.other.assignment.shell"
215 +
        },
216 +
        "4": {
217 +
          "name": "constant.numeric.shell constant.numeric.integer.shell"
218 +
        },
219 +
        "5": {
220 +
          "name": "punctuation.definition.array.access.shell"
221 +
        },
222 +
        "6": {
223 +
          "name": "keyword.operator.assignment.shell"
224 +
        },
225 +
        "7": {
226 +
          "name": "keyword.operator.assignment.compound.shell"
227 +
        },
228 +
        "8": {
229 +
          "name": "keyword.operator.assignment.compound.shell"
230 +
        },
231 +
        "9": {
232 +
          "name": "punctuation.definition.array.shell"
233 +
        }
234 +
      },
235 +
      "end": "\\)",
236 +
      "endCaptures": {
237 +
        "0": {
238 +
          "name": "punctuation.definition.array.shell"
239 +
        }
240 +
      },
241 +
      "patterns": [
242 +
        {
243 +
          "include": "#comment"
244 +
        },
245 +
        {
246 +
          "captures": {
247 +
            "1": {
248 +
              "name": "variable.other.assignment.array.shell entity.other.attribute-name.shell"
249 +
            },
250 +
            "2": {
251 +
              "name": "keyword.operator.assignment.shell punctuation.definition.assignment.shell"
252 +
            }
253 +
          },
254 +
          "match": "((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))(=)"
255 +
        },
256 +
        {
257 +
          "captures": {
258 +
            "1": {
259 +
              "name": "punctuation.definition.bracket.named-array.shell"
260 +
            },
261 +
            "2": {
262 +
              "name": "string.unquoted.shell entity.other.attribute-name.bracket.shell"
263 +
            },
264 +
            "3": {
265 +
              "name": "punctuation.definition.bracket.named-array.shell"
266 +
            },
267 +
            "4": {
268 +
              "name": "punctuation.definition.assignment.shell"
269 +
            }
270 +
          },
271 +
          "match": "(\\[)(.+?)(])(=)"
272 +
        },
273 +
        {
274 +
          "include": "#normal_context"
275 +
        },
276 +
        {
277 +
          "include": "#simple_unquoted"
278 +
        }
279 +
      ]
280 +
    },
281 +
    "assignment_statement": {
282 +
      "patterns": [
283 +
        {
284 +
          "include": "#array_value"
285 +
        },
286 +
        {
287 +
          "include": "#modified_assignment_statement"
288 +
        },
289 +
        {
290 +
          "include": "#normal_assignment_statement"
291 +
        }
292 +
      ]
293 +
    },
294 +
    "basic_command_name": {
295 +
      "captures": {
296 +
        "1": {
297 +
          "name": "storage.modifier.$1.shell"
298 +
        },
299 +
        "2": {
300 +
          "name": "entity.name.function.call.shell entity.name.command.shell",
301 +
          "patterns": [
302 +
            {
303 +
              "match": "(?<!\\w)(?:continue|return|break)(?!\\w)",
304 +
              "name": "keyword.control.$0.shell"
305 +
            },
306 +
            {
307 +
              "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\w)(?!-)",
308 +
              "name": "support.function.builtin.shell"
309 +
            },
310 +
            {
311 +
              "include": "#variable"
312 +
            }
313 +
          ]
314 +
        }
315 +
      },
316 +
      "match": "(?![\\n!#\\&()<>\\[{|]|$|[\\t ;])(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$)(?:((?<=^|[\\t \\&;])(?:readonly|declare|typeset|export|local)(?=[\\t \\&;]|$))|((?![\"']|\\\\\\n?$)[^\\t\\n\\r !\"'<>]+?))(?:(?=[\\t ])|(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\))",
317 +
      "name": "meta.statement.command.name.basic.shell"
318 +
    },
319 +
    "block_comment": {
320 +
      "begin": "\\s*+(/\\*)",
321 +
      "beginCaptures": {
322 +
        "1": {
323 +
          "name": "punctuation.definition.comment.begin.shell"
324 +
        }
325 +
      },
326 +
      "end": "\\*/",
327 +
      "endCaptures": {
328 +
        "0": {
329 +
          "name": "punctuation.definition.comment.end.shell"
330 +
        }
331 +
      },
332 +
      "name": "comment.block.shell"
333 +
    },
334 +
    "boolean": {
335 +
      "match": "\\b(?:true|false)\\b",
336 +
      "name": "constant.language.$0.shell"
337 +
    },
338 +
    "case_statement": {
339 +
      "begin": "\\b(case)\\b[\\t ]*+(.+?)[\\t ]*+\\b(in)\\b",
340 +
      "beginCaptures": {
341 +
        "1": {
342 +
          "name": "keyword.control.case.shell"
343 +
        },
344 +
        "2": {
345 +
          "patterns": [
346 +
            {
347 +
              "include": "#initial_context"
348 +
            }
349 +
          ]
350 +
        },
351 +
        "3": {
352 +
          "name": "keyword.control.in.shell"
353 +
        }
354 +
      },
355 +
      "end": "\\besac\\b",
356 +
      "endCaptures": {
357 +
        "0": {
358 +
          "name": "keyword.control.esac.shell"
359 +
        }
360 +
      },
361 +
      "name": "meta.case.shell",
362 +
      "patterns": [
363 +
        {
364 +
          "include": "#comment"
365 +
        },
366 +
        {
367 +
          "captures": {
368 +
            "1": {
369 +
              "name": "keyword.operator.pattern.case.default.shell"
370 +
            }
371 +
          },
372 +
          "match": "[\\t ]*+(\\* *\\))"
373 +
        },
374 +
        {
375 +
          "begin": "(?<!\\))(?![\\t ]*+(?:esac\\b|$))",
376 +
          "beginCaptures": {
377 +
          },
378 +
          "end": "(?=\\besac\\b)|(\\))",
379 +
          "endCaptures": {
380 +
            "1": {
381 +
              "name": "keyword.operator.pattern.case.shell"
382 +
            }
383 +
          },
384 +
          "name": "meta.case.entry.pattern.shell",
385 +
          "patterns": [
386 +
            {
387 +
              "include": "#case_statement_context"
388 +
            }
389 +
          ]
390 +
        },
391 +
        {
392 +
          "begin": "(?<=\\))",
393 +
          "beginCaptures": {
394 +
          },
395 +
          "end": "(;;)|(?=\\besac\\b)",
396 +
          "endCaptures": {
397 +
            "1": {
398 +
              "name": "punctuation.terminator.statement.case.shell"
399 +
            }
400 +
          },
401 +
          "name": "meta.case.entry.body.shell",
402 +
          "patterns": [
403 +
            {
404 +
              "include": "#typical_statements"
405 +
            },
406 +
            {
407 +
              "include": "#initial_context"
408 +
            }
409 +
          ]
410 +
        }
411 +
      ]
412 +
    },
413 +
    "case_statement_context": {
414 +
      "patterns": [
415 +
        {
416 +
          "match": "\\*",
417 +
          "name": "variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"
418 +
        },
419 +
        {
420 +
          "match": "\\+",
421 +
          "name": "variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"
422 +
        },
423 +
        {
424 +
          "match": "\\?",
425 +
          "name": "variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"
426 +
        },
427 +
        {
428 +
          "match": "@",
429 +
          "name": "variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"
430 +
        },
431 +
        {
432 +
          "match": "\\|",
433 +
          "name": "keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"
434 +
        },
435 +
        {
436 +
          "match": "\\\\.",
437 +
          "name": "constant.character.escape.shell"
438 +
        },
439 +
        {
440 +
          "match": "(?<=\\tin| in|[\\t ]|;;)\\(",
441 +
          "name": "keyword.operator.pattern.case.shell"
442 +
        },
443 +
        {
444 +
          "begin": "(?<=\\S)(\\()",
445 +
          "beginCaptures": {
446 +
            "1": {
447 +
              "name": "punctuation.definition.group.shell punctuation.definition.regex.group.shell"
448 +
            }
449 +
          },
450 +
          "end": "\\)",
451 +
          "endCaptures": {
452 +
            "0": {
453 +
              "name": "punctuation.definition.group.shell punctuation.definition.regex.group.shell"
454 +
            }
455 +
          },
456 +
          "name": "meta.parenthese.shell",
457 +
          "patterns": [
458 +
            {
459 +
              "include": "#case_statement_context"
460 +
            }
461 +
          ]
462 +
        },
463 +
        {
464 +
          "begin": "\\[",
465 +
          "beginCaptures": {
466 +
            "0": {
467 +
              "name": "punctuation.definition.character-class.shell"
468 +
            }
469 +
          },
470 +
          "end": "]",
471 +
          "endCaptures": {
472 +
            "0": {
473 +
              "name": "punctuation.definition.character-class.shell"
474 +
            }
475 +
          },
476 +
          "name": "string.regexp.character-class.shell",
477 +
          "patterns": [
478 +
            {
479 +
              "match": "\\\\.",
480 +
              "name": "constant.character.escape.shell"
481 +
            }
482 +
          ]
483 +
        },
484 +
        {
485 +
          "include": "#string"
486 +
        },
487 +
        {
488 +
          "match": "[^\\t\\n )*?@\\[|]",
489 +
          "name": "string.unquoted.pattern.shell string.regexp.unquoted.shell"
490 +
        }
491 +
      ]
492 +
    },
493 +
    "command_name_range": {
494 +
      "begin": "\\G",
495 +
      "beginCaptures": {
496 +
      },
497 +
      "end": "(?=[\\t \\&;|]|$|[\\n)`])|(?=<)",
498 +
      "endCaptures": {
499 +
      },
500 +
      "name": "meta.statement.command.name.shell",
501 +
      "patterns": [
502 +
        {
503 +
          "match": "(?<!\\w)(?:continue|return|break)(?!\\w)",
504 +
          "name": "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"
505 +
        },
506 +
        {
507 +
          "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\w)(?!-)",
508 +
          "name": "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"
509 +
        },
510 +
        {
511 +
          "include": "#variable"
512 +
        },
513 +
        {
514 +
          "captures": {
515 +
            "1": {
516 +
              "name": "entity.name.function.call.shell entity.name.command.shell"
517 +
            }
518 +
          },
519 +
          "match": "(?<!\\w)(?<=\\G|[\"')}])([^\\t\\n\\r \"\\&');->`{|]+)"
520 +
        },
521 +
        {
522 +
          "begin": "(?:\\G|(?<![\\t\\n #\\&;{|]))(\\$?)((\")|('))",
523 +
          "beginCaptures": {
524 +
            "1": {
525 +
              "name": "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"
526 +
            },
527 +
            "2": {
528 +
            },
529 +
            "3": {
530 +
              "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
531 +
            },
532 +
            "4": {
533 +
              "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
534 +
            }
535 +
          },
536 +
          "end": "(?<!\\G)(?<=\\2)",
537 +
          "endCaptures": {
538 +
          },
539 +
          "patterns": [
540 +
            {
541 +
              "include": "#continuation_of_single_quoted_command_name"
542 +
            },
543 +
            {
544 +
              "include": "#continuation_of_double_quoted_command_name"
545 +
            }
546 +
          ]
547 +
        },
548 +
        {
549 +
          "include": "#line_continuation"
550 +
        },
551 +
        {
552 +
          "include": "#simple_unquoted"
553 +
        }
554 +
      ]
555 +
    },
556 +
    "command_statement": {
557 +
      "begin": "[\\t ]*+(?![\\n!#\\&()<>\\[{|]|$|[\\t ;])(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$)(?!\\\\\\n?$)",
558 +
      "beginCaptures": {
559 +
      },
560 +
      "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
561 +
      "endCaptures": {
562 +
      },
563 +
      "name": "meta.statement.command.shell",
564 +
      "patterns": [
565 +
        {
566 +
          "include": "#command_name_range"
567 +
        },
568 +
        {
569 +
          "include": "#line_continuation"
570 +
        },
571 +
        {
572 +
          "include": "#option"
573 +
        },
574 +
        {
575 +
          "include": "#argument"
576 +
        },
577 +
        {
578 +
          "include": "#string"
579 +
        },
580 +
        {
581 +
          "include": "#heredoc"
582 +
        }
583 +
      ]
584 +
    },
585 +
    "comment": {
586 +
      "captures": {
587 +
        "1": {
588 +
          "name": "comment.line.number-sign.shell meta.shebang.shell"
589 +
        },
590 +
        "2": {
591 +
          "name": "punctuation.definition.comment.shebang.shell"
592 +
        },
593 +
        "3": {
594 +
          "name": "comment.line.number-sign.shell"
595 +
        },
596 +
        "4": {
597 +
          "name": "punctuation.definition.comment.shell"
598 +
        }
599 +
      },
600 +
      "match": "(?:^|[\\t ]++)(?:((#!).*)|((#).*))"
601 +
    },
602 +
    "comments": {
603 +
      "patterns": [
604 +
        {
605 +
          "include": "#block_comment"
606 +
        },
607 +
        {
608 +
          "include": "#line_comment"
609 +
        }
610 +
      ]
611 +
    },
612 +
    "compound-command": {
613 +
      "patterns": [
614 +
        {
615 +
          "begin": "\\[",
616 +
          "beginCaptures": {
617 +
            "0": {
618 +
              "name": "punctuation.definition.logical-expression.shell"
619 +
            }
620 +
          },
621 +
          "end": "]",
622 +
          "endCaptures": {
623 +
            "0": {
624 +
              "name": "punctuation.definition.logical-expression.shell"
625 +
            }
626 +
          },
627 +
          "name": "meta.scope.logical-expression.shell",
628 +
          "patterns": [
629 +
            {
630 +
              "include": "#logical-expression"
631 +
            },
632 +
            {
633 +
              "include": "#initial_context"
634 +
            }
635 +
          ]
636 +
        },
637 +
        {
638 +
          "begin": "(?<=\\s|^)\\{(?=\\s|$)",
639 +
          "beginCaptures": {
640 +
            "0": {
641 +
              "name": "punctuation.definition.group.shell"
642 +
            }
643 +
          },
644 +
          "end": "(?<=^|;)\\s*(})",
645 +
          "endCaptures": {
646 +
            "1": {
647 +
              "name": "punctuation.definition.group.shell"
648 +
            }
649 +
          },
650 +
          "name": "meta.scope.group.shell",
651 +
          "patterns": [
652 +
            {
653 +
              "include": "#initial_context"
654 +
            }
655 +
          ]
656 +
        }
657 +
      ]
658 +
    },
659 +
    "continuation_of_double_quoted_command_name": {
660 +
      "begin": "\\G(?<=\")",
661 +
      "beginCaptures": {
662 +
      },
663 +
      "contentName": "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",
664 +
      "end": "\"",
665 +
      "endCaptures": {
666 +
        "0": {
667 +
          "name": "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"
668 +
        }
669 +
      },
670 +
      "patterns": [
671 +
        {
672 +
          "match": "\\\\[\\n\"$\\\\`]",
673 +
          "name": "constant.character.escape.shell"
674 +
        },
675 +
        {
676 +
          "include": "#variable"
677 +
        },
678 +
        {
679 +
          "include": "#interpolation"
680 +
        }
681 +
      ]
682 +
    },
683 +
    "continuation_of_single_quoted_command_name": {
684 +
      "begin": "\\G(?<=')",
685 +
      "beginCaptures": {
686 +
      },
687 +
      "contentName": "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command",
688 +
      "end": "'",
689 +
      "endCaptures": {
690 +
        "0": {
691 +
          "name": "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"
692 +
        }
693 +
      }
694 +
    },
695 +
    "custom_command_names": {
696 +
      "patterns": [
697 +
      ]
698 +
    },
699 +
    "custom_commands": {
700 +
      "patterns": [
701 +
      ]
702 +
    },
703 +
    "double_quote_context": {
704 +
      "patterns": [
705 +
        {
706 +
          "match": "\\\\[\\n\"$\\\\`]",
707 +
          "name": "constant.character.escape.shell"
708 +
        },
709 +
        {
710 +
          "include": "#variable"
711 +
        },
712 +
        {
713 +
          "include": "#interpolation"
714 +
        }
715 +
      ]
716 +
    },
717 +
    "double_quote_escape_char": {
718 +
      "match": "\\\\[\\n\"$\\\\`]",
719 +
      "name": "constant.character.escape.shell"
720 +
    },
721 +
    "floating_keyword": {
722 +
      "patterns": [
723 +
        {
724 +
          "match": "(?<=^|[\\t \\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\t \\&;]|$)",
725 +
          "name": "keyword.control.$0.shell"
726 +
        }
727 +
      ]
728 +
    },
729 +
    "for_statement": {
730 +
      "patterns": [
731 +
        {
732 +
          "begin": "\\b(for)\\b[\\t ]*+((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))[\\t ]*+\\b(in)\\b",
733 +
          "beginCaptures": {
734 +
            "1": {
735 +
              "name": "keyword.control.for.shell"
736 +
            },
737 +
            "2": {
738 +
              "name": "variable.other.for.shell"
739 +
            },
740 +
            "3": {
741 +
              "name": "keyword.control.in.shell"
742 +
            }
743 +
          },
744 +
          "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
745 +
          "endCaptures": {
746 +
          },
747 +
          "name": "meta.for.in.shell",
748 +
          "patterns": [
749 +
            {
750 +
              "include": "#string"
751 +
            },
752 +
            {
753 +
              "include": "#simple_unquoted"
754 +
            },
755 +
            {
756 +
              "include": "#normal_context"
757 +
            }
758 +
          ]
759 +
        },
760 +
        {
761 +
          "begin": "\\b(for)\\b",
762 +
          "beginCaptures": {
763 +
            "1": {
764 +
              "name": "keyword.control.for.shell"
765 +
            }
766 +
          },
767 +
          "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
768 +
          "endCaptures": {
769 +
          },
770 +
          "name": "meta.for.shell",
771 +
          "patterns": [
772 +
            {
773 +
              "include": "#arithmetic_double"
774 +
            },
775 +
            {
776 +
              "include": "#normal_context"
777 +
            }
778 +
          ]
779 +
        }
780 +
      ]
781 +
    },
782 +
    "function_definition": {
783 +
      "applyEndPatternLast": 1,
784 +
      "begin": "[\\t ]*+(?:\\b(function)\\b[\\t ]*+([^\\t\\n\\r \"'()=]+)(?:(\\()[\\t ]*+(\\)))?|([^\\t\\n\\r \"'()=]+)[\\t ]*+(\\()[\\t ]*+(\\)))",
785 +
      "beginCaptures": {
786 +
        "1": {
787 +
          "name": "storage.type.function.shell"
788 +
        },
789 +
        "2": {
790 +
          "name": "entity.name.function.shell"
791 +
        },
792 +
        "3": {
793 +
          "name": "punctuation.definition.arguments.shell"
794 +
        },
795 +
        "4": {
796 +
          "name": "punctuation.definition.arguments.shell"
797 +
        },
798 +
        "5": {
799 +
          "name": "entity.name.function.shell"
800 +
        },
801 +
        "6": {
802 +
          "name": "punctuation.definition.arguments.shell"
803 +
        },
804 +
        "7": {
805 +
          "name": "punctuation.definition.arguments.shell"
806 +
        }
807 +
      },
808 +
      "end": "(?<=[)}])",
809 +
      "endCaptures": {
810 +
      },
811 +
      "name": "meta.function.shell",
812 +
      "patterns": [
813 +
        {
814 +
          "match": "\\G[\\t\\n ]"
815 +
        },
816 +
        {
817 +
          "begin": "\\{",
818 +
          "beginCaptures": {
819 +
            "0": {
820 +
              "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
821 +
            }
822 +
          },
823 +
          "end": "}",
824 +
          "endCaptures": {
825 +
            "0": {
826 +
              "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
827 +
            }
828 +
          },
829 +
          "name": "meta.function.body.shell",
830 +
          "patterns": [
831 +
            {
832 +
              "include": "#initial_context"
833 +
            }
834 +
          ]
835 +
        },
836 +
        {
837 +
          "begin": "\\(",
838 +
          "beginCaptures": {
839 +
            "0": {
840 +
              "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
841 +
            }
842 +
          },
843 +
          "end": "\\)",
844 +
          "endCaptures": {
845 +
            "0": {
846 +
              "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
847 +
            }
848 +
          },
849 +
          "name": "meta.function.body.shell",
850 +
          "patterns": [
851 +
            {
852 +
              "include": "#initial_context"
853 +
            }
854 +
          ]
855 +
        },
856 +
        {
857 +
          "include": "#initial_context"
858 +
        }
859 +
      ]
860 +
    },
861 +
    "heredoc": {
862 +
      "patterns": [
863 +
        {
864 +
          "begin": "((?<!<)<<-)[\\t ]*+([\"'])[\\t ]*+([^\"']+?)(?=[\"\\&';<\\s])(\\2)(.*)",
865 +
          "beginCaptures": {
866 +
            "1": {
867 +
              "name": "keyword.operator.heredoc.shell"
868 +
            },
869 +
            "2": {
870 +
              "name": "punctuation.definition.string.heredoc.quote.shell"
871 +
            },
872 +
            "3": {
873 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
874 +
            },
875 +
            "4": {
876 +
              "name": "punctuation.definition.string.heredoc.quote.shell"
877 +
            },
878 +
            "5": {
879 +
              "patterns": [
880 +
                {
881 +
                  "include": "#redirect_fix"
882 +
                },
883 +
                {
884 +
                  "include": "#typical_statements"
885 +
                }
886 +
              ]
887 +
            }
888 +
          },
889 +
          "contentName": "string.quoted.heredoc.indent.$3",
890 +
          "end": "^\\t*\\3(?=[\\&;\\s]|$)",
891 +
          "endCaptures": {
892 +
            "0": {
893 +
              "name": "punctuation.definition.string.heredoc.$0.shell"
894 +
            }
895 +
          },
896 +
          "patterns": [
897 +
          ]
898 +
        },
899 +
        {
900 +
          "begin": "((?<!<)<<(?!<))[\\t ]*+([\"'])[\\t ]*+([^\"']+?)(?=[\"\\&';<\\s])(\\2)(.*)",
901 +
          "beginCaptures": {
902 +
            "1": {
903 +
              "name": "keyword.operator.heredoc.shell"
904 +
            },
905 +
            "2": {
906 +
              "name": "punctuation.definition.string.heredoc.quote.shell"
907 +
            },
908 +
            "3": {
909 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
910 +
            },
911 +
            "4": {
912 +
              "name": "punctuation.definition.string.heredoc.quote.shell"
913 +
            },
914 +
            "5": {
915 +
              "patterns": [
916 +
                {
917 +
                  "include": "#redirect_fix"
918 +
                },
919 +
                {
920 +
                  "include": "#typical_statements"
921 +
                }
922 +
              ]
923 +
            }
924 +
          },
925 +
          "contentName": "string.quoted.heredoc.no-indent.$3",
926 +
          "end": "^\\3(?=[\\&;\\s]|$)",
927 +
          "endCaptures": {
928 +
            "0": {
929 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
930 +
            }
931 +
          },
932 +
          "patterns": [
933 +
          ]
934 +
        },
935 +
        {
936 +
          "begin": "((?<!<)<<-)[\\t ]*+([^\\t \"']+)(?=[\"\\&';<\\s])(.*)",
937 +
          "beginCaptures": {
938 +
            "1": {
939 +
              "name": "keyword.operator.heredoc.shell"
940 +
            },
941 +
            "2": {
942 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
943 +
            },
944 +
            "3": {
945 +
              "patterns": [
946 +
                {
947 +
                  "include": "#redirect_fix"
948 +
                },
949 +
                {
950 +
                  "include": "#typical_statements"
951 +
                }
952 +
              ]
953 +
            }
954 +
          },
955 +
          "contentName": "string.unquoted.heredoc.indent.$2",
956 +
          "end": "^\\t*\\2(?=[\\&;\\s]|$)",
957 +
          "endCaptures": {
958 +
            "0": {
959 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
960 +
            }
961 +
          },
962 +
          "patterns": [
963 +
            {
964 +
              "include": "#double_quote_escape_char"
965 +
            },
966 +
            {
967 +
              "include": "#variable"
968 +
            },
969 +
            {
970 +
              "include": "#interpolation"
971 +
            }
972 +
          ]
973 +
        },
974 +
        {
975 +
          "begin": "((?<!<)<<(?!<))[\\t ]*+([^\\t \"']+)(?=[\"\\&';<\\s])(.*)",
976 +
          "beginCaptures": {
977 +
            "1": {
978 +
              "name": "keyword.operator.heredoc.shell"
979 +
            },
980 +
            "2": {
981 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
982 +
            },
983 +
            "3": {
984 +
              "patterns": [
985 +
                {
986 +
                  "include": "#redirect_fix"
987 +
                },
988 +
                {
989 +
                  "include": "#typical_statements"
990 +
                }
991 +
              ]
992 +
            }
993 +
          },
994 +
          "contentName": "string.unquoted.heredoc.no-indent.$2",
995 +
          "end": "^\\2(?=[\\&;\\s]|$)",
996 +
          "endCaptures": {
997 +
            "0": {
998 +
              "name": "punctuation.definition.string.heredoc.delimiter.shell"
999 +
            }
1000 +
          },
1001 +
          "patterns": [
1002 +
            {
1003 +
              "include": "#double_quote_escape_char"
1004 +
            },
1005 +
            {
1006 +
              "include": "#variable"
1007 +
            },
1008 +
            {
1009 +
              "include": "#interpolation"
1010 +
            }
1011 +
          ]
1012 +
        }
1013 +
      ]
1014 +
    },
1015 +
    "herestring": {
1016 +
      "patterns": [
1017 +
        {
1018 +
          "begin": "(<<<)\\s*(('))",
1019 +
          "beginCaptures": {
1020 +
            "1": {
1021 +
              "name": "keyword.operator.herestring.shell"
1022 +
            },
1023 +
            "2": {
1024 +
              "name": "string.quoted.single.shell"
1025 +
            },
1026 +
            "3": {
1027 +
              "name": "punctuation.definition.string.begin.shell"
1028 +
            }
1029 +
          },
1030 +
          "contentName": "string.quoted.single.shell",
1031 +
          "end": "(')",
1032 +
          "endCaptures": {
1033 +
            "0": {
1034 +
              "name": "string.quoted.single.shell"
1035 +
            },
1036 +
            "1": {
1037 +
              "name": "punctuation.definition.string.end.shell"
1038 +
            }
1039 +
          },
1040 +
          "name": "meta.herestring.shell"
1041 +
        },
1042 +
        {
1043 +
          "begin": "(<<<)\\s*((\"))",
1044 +
          "beginCaptures": {
1045 +
            "1": {
1046 +
              "name": "keyword.operator.herestring.shell"
1047 +
            },
1048 +
            "2": {
1049 +
              "name": "string.quoted.double.shell"
1050 +
            },
1051 +
            "3": {
1052 +
              "name": "punctuation.definition.string.begin.shell"
1053 +
            }
1054 +
          },
1055 +
          "contentName": "string.quoted.double.shell",
1056 +
          "end": "(\")",
1057 +
          "endCaptures": {
1058 +
            "0": {
1059 +
              "name": "string.quoted.double.shell"
1060 +
            },
1061 +
            "1": {
1062 +
              "name": "punctuation.definition.string.end.shell"
1063 +
            }
1064 +
          },
1065 +
          "name": "meta.herestring.shell",
1066 +
          "patterns": [
1067 +
            {
1068 +
              "include": "#double_quote_context"
1069 +
            }
1070 +
          ]
1071 +
        },
1072 +
        {
1073 +
          "captures": {
1074 +
            "1": {
1075 +
              "name": "keyword.operator.herestring.shell"
1076 +
            },
1077 +
            "2": {
1078 +
              "name": "string.unquoted.herestring.shell",
1079 +
              "patterns": [
1080 +
                {
1081 +
                  "include": "#initial_context"
1082 +
                }
1083 +
              ]
1084 +
            }
1085 +
          },
1086 +
          "match": "(<<<)\\s*(([^)\\\\\\s]|\\\\.)+)",
1087 +
          "name": "meta.herestring.shell"
1088 +
        }
1089 +
      ]
1090 +
    },
1091 +
    "initial_context": {
1092 +
      "patterns": [
1093 +
        {
1094 +
          "include": "#comment"
1095 +
        },
1096 +
        {
1097 +
          "include": "#pipeline"
1098 +
        },
1099 +
        {
1100 +
          "include": "#normal_statement_seperator"
1101 +
        },
1102 +
        {
1103 +
          "include": "#logical_expression_double"
1104 +
        },
1105 +
        {
1106 +
          "include": "#logical_expression_single"
1107 +
        },
1108 +
        {
1109 +
          "include": "#assignment_statement"
1110 +
        },
1111 +
        {
1112 +
          "include": "#case_statement"
1113 +
        },
1114 +
        {
1115 +
          "include": "#for_statement"
1116 +
        },
1117 +
        {
1118 +
          "include": "#loop"
1119 +
        },
1120 +
        {
1121 +
          "include": "#function_definition"
1122 +
        },
1123 +
        {
1124 +
          "include": "#line_continuation"
1125 +
        },
1126 +
        {
1127 +
          "include": "#arithmetic_double"
1128 +
        },
1129 +
        {
1130 +
          "include": "#misc_ranges"
1131 +
        },
1132 +
        {
1133 +
          "include": "#variable"
1134 +
        },
1135 +
        {
1136 +
          "include": "#interpolation"
1137 +
        },
1138 +
        {
1139 +
          "include": "#heredoc"
1140 +
        },
1141 +
        {
1142 +
          "include": "#herestring"
1143 +
        },
1144 +
        {
1145 +
          "include": "#redirection"
1146 +
        },
1147 +
        {
1148 +
          "include": "#pathname"
1149 +
        },
1150 +
        {
1151 +
          "include": "#floating_keyword"
1152 +
        },
1153 +
        {
1154 +
          "include": "#alias_statement"
1155 +
        },
1156 +
        {
1157 +
          "include": "#normal_statement"
1158 +
        },
1159 +
        {
1160 +
          "include": "#string"
1161 +
        },
1162 +
        {
1163 +
          "include": "#support"
1164 +
        }
1165 +
      ]
1166 +
    },
1167 +
    "inline_comment": {
1168 +
      "captures": {
1169 +
        "1": {
1170 +
          "name": "comment.block.shell punctuation.definition.comment.begin.shell"
1171 +
        },
1172 +
        "2": {
1173 +
          "name": "comment.block.shell"
1174 +
        },
1175 +
        "3": {
1176 +
          "patterns": [
1177 +
            {
1178 +
              "match": "\\*/",
1179 +
              "name": "comment.block.shell punctuation.definition.comment.end.shell"
1180 +
            },
1181 +
            {
1182 +
              "match": "\\*",
1183 +
              "name": "comment.block.shell"
1184 +
            }
1185 +
          ]
1186 +
        }
1187 +
      },
1188 +
      "match": "(/\\*)((?:[^*]|\\*++[^/])*+(\\*++/))"
1189 +
    },
1190 +
    "interpolation": {
1191 +
      "patterns": [
1192 +
        {
1193 +
          "include": "#arithmetic_dollar"
1194 +
        },
1195 +
        {
1196 +
          "include": "#subshell_dollar"
1197 +
        },
1198 +
        {
1199 +
          "begin": "`",
1200 +
          "beginCaptures": {
1201 +
            "0": {
1202 +
              "name": "punctuation.definition.evaluation.backticks.shell"
1203 +
            }
1204 +
          },
1205 +
          "end": "`",
1206 +
          "endCaptures": {
1207 +
            "0": {
1208 +
              "name": "punctuation.definition.evaluation.backticks.shell"
1209 +
            }
1210 +
          },
1211 +
          "name": "string.interpolated.backtick.shell",
1212 +
          "patterns": [
1213 +
            {
1214 +
              "match": "\\\\[$\\\\`]",
1215 +
              "name": "constant.character.escape.shell"
1216 +
            },
1217 +
            {
1218 +
              "begin": "(?<=\\W)(?=#)(?!#\\{)",
1219 +
              "beginCaptures": {
1220 +
                "1": {
1221 +
                  "name": "punctuation.whitespace.comment.leading.shell"
1222 +
                }
1223 +
              },
1224 +
              "end": "(?!\\G)",
1225 +
              "patterns": [
1226 +
                {
1227 +
                  "begin": "#",
1228 +
                  "beginCaptures": {
1229 +
                    "0": {
1230 +
                      "name": "punctuation.definition.comment.shell"
1231 +
                    }
1232 +
                  },
1233 +
                  "end": "(?=`)",
1234 +
                  "name": "comment.line.number-sign.shell"
1235 +
                }
1236 +
              ]
1237 +
            },
1238 +
            {
1239 +
              "include": "#initial_context"
1240 +
            }
1241 +
          ]
1242 +
        }
1243 +
      ]
1244 +
    },
1245 +
    "keyword": {
1246 +
      "patterns": [
1247 +
        {
1248 +
          "match": "(?<=^|[\\&;\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\&;\\s]|$)",
1249 +
          "name": "keyword.control.shell"
1250 +
        },
1251 +
        {
1252 +
          "match": "(?<=^|[\\&;\\s])(?:export|declare|typeset|local|readonly)(?=[\\&;\\s]|$)",
1253 +
          "name": "storage.modifier.shell"
1254 +
        }
1255 +
      ]
1256 +
    },
1257 +
    "line_comment": {
1258 +
      "begin": "\\s*+(//)",
1259 +
      "beginCaptures": {
1260 +
        "1": {
1261 +
          "name": "punctuation.definition.comment.shell"
1262 +
        }
1263 +
      },
1264 +
      "end": "(?<=\\n)(?<!\\\\\\n)",
1265 +
      "endCaptures": {
1266 +
      },
1267 +
      "name": "comment.line.double-slash.shell",
1268 +
      "patterns": [
1269 +
        {
1270 +
          "include": "#line_continuation_character"
1271 +
        }
1272 +
      ]
1273 +
    },
1274 +
    "line_continuation": {
1275 +
      "match": "\\\\(?=\\n)",
1276 +
      "name": "constant.character.escape.line-continuation.shell"
1277 +
    },
1278 +
    "logical-expression": {
1279 +
      "patterns": [
1280 +
        {
1281 +
          "include": "#arithmetic_no_dollar"
1282 +
        },
1283 +
        {
1284 +
          "match": "=[=~]?|!=?|[<>]|&&|\\|\\|",
1285 +
          "name": "keyword.operator.logical.shell"
1286 +
        },
1287 +
        {
1288 +
          "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\b",
1289 +
          "name": "keyword.operator.logical.shell"
1290 +
        }
1291 +
      ]
1292 +
    },
1293 +
    "logical_expression_context": {
1294 +
      "patterns": [
1295 +
        {
1296 +
          "include": "#regex_comparison"
1297 +
        },
1298 +
        {
1299 +
          "include": "#arithmetic_no_dollar"
1300 +
        },
1301 +
        {
1302 +
          "include": "#logical-expression"
1303 +
        },
1304 +
        {
1305 +
          "include": "#logical_expression_single"
1306 +
        },
1307 +
        {
1308 +
          "include": "#logical_expression_double"
1309 +
        },
1310 +
        {
1311 +
          "include": "#comment"
1312 +
        },
1313 +
        {
1314 +
          "include": "#boolean"
1315 +
        },
1316 +
        {
1317 +
          "include": "#redirect_number"
1318 +
        },
1319 +
        {
1320 +
          "include": "#numeric_literal"
1321 +
        },
1322 +
        {
1323 +
          "include": "#pipeline"
1324 +
        },
1325 +
        {
1326 +
          "include": "#normal_statement_seperator"
1327 +
        },
1328 +
        {
1329 +
          "include": "#string"
1330 +
        },
1331 +
        {
1332 +
          "include": "#variable"
1333 +
        },
1334 +
        {
1335 +
          "include": "#interpolation"
1336 +
        },
1337 +
        {
1338 +
          "include": "#heredoc"
1339 +
        },
1340 +
        {
1341 +
          "include": "#herestring"
1342 +
        },
1343 +
        {
1344 +
          "include": "#pathname"
1345 +
        },
1346 +
        {
1347 +
          "include": "#floating_keyword"
1348 +
        },
1349 +
        {
1350 +
          "include": "#support"
1351 +
        }
1352 +
      ]
1353 +
    },
1354 +
    "logical_expression_double": {
1355 +
      "begin": "\\[\\[",
1356 +
      "beginCaptures": {
1357 +
        "0": {
1358 +
          "name": "punctuation.definition.logical-expression.shell"
1359 +
        }
1360 +
      },
1361 +
      "end": "]]",
1362 +
      "endCaptures": {
1363 +
        "0": {
1364 +
          "name": "punctuation.definition.logical-expression.shell"
1365 +
        }
1366 +
      },
1367 +
      "name": "meta.scope.logical-expression.shell",
1368 +
      "patterns": [
1369 +
        {
1370 +
          "include": "#logical_expression_context"
1371 +
        }
1372 +
      ]
1373 +
    },
1374 +
    "logical_expression_single": {
1375 +
      "begin": "\\[",
1376 +
      "beginCaptures": {
1377 +
        "0": {
1378 +
          "name": "punctuation.definition.logical-expression.shell"
1379 +
        }
1380 +
      },
1381 +
      "end": "]",
1382 +
      "endCaptures": {
1383 +
        "0": {
1384 +
          "name": "punctuation.definition.logical-expression.shell"
1385 +
        }
1386 +
      },
1387 +
      "name": "meta.scope.logical-expression.shell",
1388 +
      "patterns": [
1389 +
        {
1390 +
          "include": "#logical_expression_context"
1391 +
        }
1392 +
      ]
1393 +
    },
1394 +
    "loop": {
1395 +
      "patterns": [
1396 +
        {
1397 +
          "begin": "(?<=^|[\\&;\\s])(for)\\s+(.+?)\\s+(in)(?=[\\&;\\s]|$)",
1398 +
          "beginCaptures": {
1399 +
            "1": {
1400 +
              "name": "keyword.control.shell"
1401 +
            },
1402 +
            "2": {
1403 +
              "name": "variable.other.loop.shell",
1404 +
              "patterns": [
1405 +
                {
1406 +
                  "include": "#string"
1407 +
                }
1408 +
              ]
1409 +
            },
1410 +
            "3": {
1411 +
              "name": "keyword.control.shell"
1412 +
            }
1413 +
          },
1414 +
          "end": "(?<=^|[\\&;\\s])done(?=[\\&;\\s]|$|\\))",
1415 +
          "endCaptures": {
1416 +
            "0": {
1417 +
              "name": "keyword.control.shell"
1418 +
            }
1419 +
          },
1420 +
          "name": "meta.scope.for-in-loop.shell",
1421 +
          "patterns": [
1422 +
            {
1423 +
              "include": "#initial_context"
1424 +
            }
1425 +
          ]
1426 +
        },
1427 +
        {
1428 +
          "begin": "(?<=^|[\\&;\\s])(while|until)(?=[\\&;\\s]|$)",
1429 +
          "beginCaptures": {
1430 +
            "1": {
1431 +
              "name": "keyword.control.shell"
1432 +
            }
1433 +
          },
1434 +
          "end": "(?<=^|[\\&;\\s])done(?=[\\&;\\s]|$|\\))",
1435 +
          "endCaptures": {
1436 +
            "0": {
1437 +
              "name": "keyword.control.shell"
1438 +
            }
1439 +
          },
1440 +
          "name": "meta.scope.while-loop.shell",
1441 +
          "patterns": [
1442 +
            {
1443 +
              "include": "#initial_context"
1444 +
            }
1445 +
          ]
1446 +
        },
1447 +
        {
1448 +
          "begin": "(?<=^|[\\&;\\s])(select)\\s+((?:[^\\\\\\s]|\\\\.)+)(?=[\\&;\\s]|$)",
1449 +
          "beginCaptures": {
1450 +
            "1": {
1451 +
              "name": "keyword.control.shell"
1452 +
            },
1453 +
            "2": {
1454 +
              "name": "variable.other.loop.shell"
1455 +
            }
1456 +
          },
1457 +
          "end": "(?<=^|[\\&;\\s])(done)(?=[\\&;\\s]|$|\\))",
1458 +
          "endCaptures": {
1459 +
            "1": {
1460 +
              "name": "keyword.control.shell"
1461 +
            }
1462 +
          },
1463 +
          "name": "meta.scope.select-block.shell",
1464 +
          "patterns": [
1465 +
            {
1466 +
              "include": "#initial_context"
1467 +
            }
1468 +
          ]
1469 +
        },
1470 +
        {
1471 +
          "begin": "(?<=^|[\\&;\\s])if(?=[\\&;\\s]|$)",
1472 +
          "beginCaptures": {
1473 +
            "0": {
1474 +
              "name": "keyword.control.if.shell"
1475 +
            }
1476 +
          },
1477 +
          "end": "(?<=^|[\\&;\\s])fi(?=[\\&;\\s]|$)",
1478 +
          "endCaptures": {
1479 +
            "0": {
1480 +
              "name": "keyword.control.fi.shell"
1481 +
            }
1482 +
          },
1483 +
          "name": "meta.scope.if-block.shell",
1484 +
          "patterns": [
1485 +
            {
1486 +
              "include": "#initial_context"
1487 +
            }
1488 +
          ]
1489 +
        }
1490 +
      ]
1491 +
    },
1492 +
    "math": {
1493 +
      "patterns": [
1494 +
        {
1495 +
          "include": "#variable"
1496 +
        },
1497 +
        {
1498 +
          "match": "\\+{1,2}|-{1,2}|[!~]|\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\|{1,2}|&{1,2}|[,:=?]|[-%\\&*+/^|]=|<<=|>>=",
1499 +
          "name": "keyword.operator.arithmetic.shell"
1500 +
        },
1501 +
        {
1502 +
          "match": "0[Xx]\\h+",
1503 +
          "name": "constant.numeric.hex.shell"
1504 +
        },
1505 +
        {
1506 +
          "match": ";",
1507 +
          "name": "punctuation.separator.semicolon.range"
1508 +
        },
1509 +
        {
1510 +
          "match": "0\\d+",
1511 +
          "name": "constant.numeric.octal.shell"
1512 +
        },
1513 +
        {
1514 +
          "match": "\\d{1,2}#[0-9@-Z_a-z]+",
1515 +
          "name": "constant.numeric.other.shell"
1516 +
        },
1517 +
        {
1518 +
          "match": "\\d+",
1519 +
          "name": "constant.numeric.integer.shell"
1520 +
        },
1521 +
        {
1522 +
          "match": "(?<!\\w)[0-9A-Z_a-z]+(?!\\w)",
1523 +
          "name": "variable.other.normal.shell"
1524 +
        }
1525 +
      ]
1526 +
    },
1527 +
    "math_operators": {
1528 +
      "patterns": [
1529 +
        {
1530 +
          "match": "\\+{1,2}|-{1,2}|[!~]|\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\|{1,2}|&{1,2}|[,:=?]|[-%\\&*+/^|]=|<<=|>>=",
1531 +
          "name": "keyword.operator.arithmetic.shell"
1532 +
        },
1533 +
        {
1534 +
          "match": "0[Xx]\\h+",
1535 +
          "name": "constant.numeric.hex.shell"
1536 +
        },
1537 +
        {
1538 +
          "match": "0\\d+",
1539 +
          "name": "constant.numeric.octal.shell"
1540 +
        },
1541 +
        {
1542 +
          "match": "\\d{1,2}#[0-9@-Z_a-z]+",
1543 +
          "name": "constant.numeric.other.shell"
1544 +
        },
1545 +
        {
1546 +
          "match": "\\d+",
1547 +
          "name": "constant.numeric.integer.shell"
1548 +
        }
1549 +
      ]
1550 +
    },
1551 +
    "misc_ranges": {
1552 +
      "patterns": [
1553 +
        {
1554 +
          "include": "#logical_expression_single"
1555 +
        },
1556 +
        {
1557 +
          "include": "#logical_expression_double"
1558 +
        },
1559 +
        {
1560 +
          "include": "#subshell_dollar"
1561 +
        },
1562 +
        {
1563 +
          "begin": "(?<![^\\t ])(\\{)(?![$\\w])",
1564 +
          "beginCaptures": {
1565 +
            "1": {
1566 +
              "name": "punctuation.definition.group.shell"
1567 +
            }
1568 +
          },
1569 +
          "end": "}",
1570 +
          "endCaptures": {
1571 +
            "0": {
1572 +
              "name": "punctuation.definition.group.shell"
1573 +
            }
1574 +
          },
1575 +
          "name": "meta.scope.group.shell",
1576 +
          "patterns": [
1577 +
            {
1578 +
              "include": "#initial_context"
1579 +
            }
1580 +
          ]
1581 +
        }
1582 +
      ]
1583 +
    },
1584 +
    "modified_assignment_statement": {
1585 +
      "begin": "(?<=^|[\\t \\&;])(?:readonly|declare|typeset|export|local)(?=[\\t \\&;]|$)",
1586 +
      "beginCaptures": {
1587 +
        "0": {
1588 +
          "name": "storage.modifier.$0.shell"
1589 +
        }
1590 +
      },
1591 +
      "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
1592 +
      "endCaptures": {
1593 +
      },
1594 +
      "name": "meta.statement.shell meta.expression.assignment.modified.shell",
1595 +
      "patterns": [
1596 +
        {
1597 +
          "match": "(?<!\\w)-\\w+\\b",
1598 +
          "name": "string.unquoted.argument.shell constant.other.option.shell"
1599 +
        },
1600 +
        {
1601 +
          "include": "#array_value"
1602 +
        },
1603 +
        {
1604 +
          "captures": {
1605 +
            "1": {
1606 +
              "name": "variable.other.assignment.shell"
1607 +
            },
1608 +
            "10": {
1609 +
              "name": "constant.numeric.shell constant.numeric.octal.shell"
1610 +
            },
1611 +
            "11": {
1612 +
              "name": "constant.numeric.shell constant.numeric.other.shell"
1613 +
            },
1614 +
            "12": {
1615 +
              "name": "constant.numeric.shell constant.numeric.decimal.shell"
1616 +
            },
1617 +
            "13": {
1618 +
              "name": "constant.numeric.shell constant.numeric.version.shell"
1619 +
            },
1620 +
            "14": {
1621 +
              "name": "constant.numeric.shell constant.numeric.integer.shell"
1622 +
            },
1623 +
            "2": {
1624 +
              "name": "punctuation.definition.array.access.shell"
1625 +
            },
1626 +
            "3": {
1627 +
              "name": "variable.other.assignment.shell"
1628 +
            },
1629 +
            "4": {
1630 +
              "name": "constant.numeric.shell constant.numeric.integer.shell"
1631 +
            },
1632 +
            "5": {
1633 +
              "name": "punctuation.definition.array.access.shell"
1634 +
            },
1635 +
            "6": {
1636 +
              "name": "keyword.operator.assignment.shell"
1637 +
            },
1638 +
            "7": {
1639 +
              "name": "keyword.operator.assignment.compound.shell"
1640 +
            },
1641 +
            "8": {
1642 +
              "name": "keyword.operator.assignment.compound.shell"
1643 +
            },
1644 +
            "9": {
1645 +
              "name": "constant.numeric.shell constant.numeric.hex.shell"
1646 +
            }
1647 +
          },
1648 +
          "match": "((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))(?:(\\[)((?:(?:\\$?(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)|@)|\\*)|(-?\\d+))(]))?(?:(?:(=)|(\\+=))|(-=))?(?:(?<=[\\t =]|^|[(\\[{])(?:(?:(?:(?:(?:(0[Xx]\\h+)|(0\\d+))|(\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\d+\\.\\d+))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?=[\\t ]|$|[);}]))?"
1649 +
        },
1650 +
        {
1651 +
          "include": "#normal_context"
1652 +
        }
1653 +
      ]
1654 +
    },
1655 +
    "modifiers": {
1656 +
      "match": "(?<=^|[\\t \\&;])(?:readonly|declare|typeset|export|local)(?=[\\t \\&;]|$)",
1657 +
      "name": "storage.modifier.$0.shell"
1658 +
    },
1659 +
    "normal_assignment_statement": {
1660 +
      "begin": "[\\t ]*+((?<!\\w)[-0-9A-Z_a-z]+(?!\\w))(?:(\\[)((?:(?:\\$?(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)|@)|\\*)|(-?\\d+))(]))?(?:(?:(=)|(\\+=))|(-=))",
1661 +
      "beginCaptures": {
1662 +
        "1": {
1663 +
          "name": "variable.other.assignment.shell"
1664 +
        },
1665 +
        "2": {
1666 +
          "name": "punctuation.definition.array.access.shell"
1667 +
        },
1668 +
        "3": {
1669 +
          "name": "variable.other.assignment.shell"
1670 +
        },
1671 +
        "4": {
1672 +
          "name": "constant.numeric.shell constant.numeric.integer.shell"
1673 +
        },
1674 +
        "5": {
1675 +
          "name": "punctuation.definition.array.access.shell"
1676 +
        },
1677 +
        "6": {
1678 +
          "name": "keyword.operator.assignment.shell"
1679 +
        },
1680 +
        "7": {
1681 +
          "name": "keyword.operator.assignment.compound.shell"
1682 +
        },
1683 +
        "8": {
1684 +
          "name": "keyword.operator.assignment.compound.shell"
1685 +
        }
1686 +
      },
1687 +
      "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
1688 +
      "endCaptures": {
1689 +
      },
1690 +
      "name": "meta.expression.assignment.shell",
1691 +
      "patterns": [
1692 +
        {
1693 +
          "include": "#comment"
1694 +
        },
1695 +
        {
1696 +
          "include": "#string"
1697 +
        },
1698 +
        {
1699 +
          "include": "#normal_assignment_statement"
1700 +
        },
1701 +
        {
1702 +
          "begin": "(?<=[\\t ])(?![\\t ]|\\w+=)",
1703 +
          "beginCaptures": {
1704 +
          },
1705 +
          "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
1706 +
          "endCaptures": {
1707 +
          },
1708 +
          "name": "meta.statement.command.env.shell",
1709 +
          "patterns": [
1710 +
            {
1711 +
              "include": "#command_name_range"
1712 +
            },
1713 +
            {
1714 +
              "include": "#line_continuation"
1715 +
            },
1716 +
            {
1717 +
              "include": "#option"
1718 +
            },
1719 +
            {
1720 +
              "include": "#argument"
1721 +
            },
1722 +
            {
1723 +
              "include": "#string"
1724 +
            }
1725 +
          ]
1726 +
        },
1727 +
        {
1728 +
          "include": "#simple_unquoted"
1729 +
        },
1730 +
        {
1731 +
          "include": "#normal_context"
1732 +
        }
1733 +
      ]
1734 +
    },
1735 +
    "normal_context": {
1736 +
      "patterns": [
1737 +
        {
1738 +
          "include": "#comment"
1739 +
        },
1740 +
        {
1741 +
          "include": "#pipeline"
1742 +
        },
1743 +
        {
1744 +
          "include": "#normal_statement_seperator"
1745 +
        },
1746 +
        {
1747 +
          "include": "#misc_ranges"
1748 +
        },
1749 +
        {
1750 +
          "include": "#boolean"
1751 +
        },
1752 +
        {
1753 +
          "include": "#redirect_number"
1754 +
        },
1755 +
        {
1756 +
          "include": "#numeric_literal"
1757 +
        },
1758 +
        {
1759 +
          "include": "#string"
1760 +
        },
1761 +
        {
1762 +
          "include": "#variable"
1763 +
        },
1764 +
        {
1765 +
          "include": "#interpolation"
1766 +
        },
1767 +
        {
1768 +
          "include": "#heredoc"
1769 +
        },
1770 +
        {
1771 +
          "include": "#herestring"
1772 +
        },
1773 +
        {
1774 +
          "include": "#redirection"
1775 +
        },
1776 +
        {
1777 +
          "include": "#pathname"
1778 +
        },
1779 +
        {
1780 +
          "include": "#floating_keyword"
1781 +
        },
1782 +
        {
1783 +
          "include": "#support"
1784 +
        },
1785 +
        {
1786 +
          "include": "#parenthese"
1787 +
        }
1788 +
      ]
1789 +
    },
1790 +
    "normal_statement": {
1791 +
      "begin": "(?!^[\\t ]*+$)(?:(?<=(?:^until| until|\\tuntil|^while| while|\\twhile|^elif| elif|\\telif|^else| else|\\telse|^then| then|\\tthen|^do| do|\\tdo|^if| if|\\tif) )|(?<=^|[!\\&(;`{|]))[\\t ]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)",
1792 +
      "beginCaptures": {
1793 +
      },
1794 +
      "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
1795 +
      "endCaptures": {
1796 +
      },
1797 +
      "name": "meta.statement.shell",
1798 +
      "patterns": [
1799 +
        {
1800 +
          "include": "#typical_statements"
1801 +
        }
1802 +
      ]
1803 +
    },
1804 +
    "normal_statement_seperator": {
1805 +
      "captures": {
1806 +
        "1": {
1807 +
          "name": "punctuation.terminator.statement.semicolon.shell"
1808 +
        },
1809 +
        "2": {
1810 +
          "name": "punctuation.separator.statement.and.shell"
1811 +
        },
1812 +
        "3": {
1813 +
          "name": "punctuation.separator.statement.or.shell"
1814 +
        },
1815 +
        "4": {
1816 +
          "name": "punctuation.separator.statement.background.shell"
1817 +
        }
1818 +
      },
1819 +
      "match": "(?:(?:(;)|(&&))|(\\|\\|))|(&)"
1820 +
    },
1821 +
    "numeric_literal": {
1822 +
      "captures": {
1823 +
        "1": {
1824 +
          "name": "constant.numeric.shell constant.numeric.hex.shell"
1825 +
        },
1826 +
        "2": {
1827 +
          "name": "constant.numeric.shell constant.numeric.octal.shell"
1828 +
        },
1829 +
        "3": {
1830 +
          "name": "constant.numeric.shell constant.numeric.other.shell"
1831 +
        },
1832 +
        "4": {
1833 +
          "name": "constant.numeric.shell constant.numeric.decimal.shell"
1834 +
        },
1835 +
        "5": {
1836 +
          "name": "constant.numeric.shell constant.numeric.version.shell"
1837 +
        },
1838 +
        "6": {
1839 +
          "name": "constant.numeric.shell constant.numeric.integer.shell"
1840 +
        }
1841 +
      },
1842 +
      "match": "(?<=[\\t =]|^|[(\\[{])(?:(?:(?:(?:(?:(0[Xx]\\h+)|(0\\d+))|(\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\d+\\.\\d+))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?=[\\t ]|$|[);}])"
1843 +
    },
1844 +
    "option": {
1845 +
      "begin": "[\\t ]++(-)((?![\\n!#\\&()<>\\[{|]|$|[\\t ;]))",
1846 +
      "beginCaptures": {
1847 +
        "1": {
1848 +
          "name": "string.unquoted.argument.shell constant.other.option.dash.shell"
1849 +
        },
1850 +
        "2": {
1851 +
          "name": "string.unquoted.argument.shell constant.other.option.shell"
1852 +
        }
1853 +
      },
1854 +
      "contentName": "string.unquoted.argument constant.other.option",
1855 +
      "end": "(?=[\\t ])|(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
1856 +
      "endCaptures": {
1857 +
      },
1858 +
      "patterns": [
1859 +
        {
1860 +
          "include": "#option_context"
1861 +
        }
1862 +
      ]
1863 +
    },
1864 +
    "option_context": {
1865 +
      "patterns": [
1866 +
        {
1867 +
          "include": "#misc_ranges"
1868 +
        },
1869 +
        {
1870 +
          "include": "#string"
1871 +
        },
1872 +
        {
1873 +
          "include": "#variable"
1874 +
        },
1875 +
        {
1876 +
          "include": "#interpolation"
1877 +
        },
1878 +
        {
1879 +
          "include": "#heredoc"
1880 +
        },
1881 +
        {
1882 +
          "include": "#herestring"
1883 +
        },
1884 +
        {
1885 +
          "include": "#redirection"
1886 +
        },
1887 +
        {
1888 +
          "include": "#pathname"
1889 +
        },
1890 +
        {
1891 +
          "include": "#floating_keyword"
1892 +
        },
1893 +
        {
1894 +
          "include": "#support"
1895 +
        }
1896 +
      ]
1897 +
    },
1898 +
    "parenthese": {
1899 +
      "patterns": [
1900 +
        {
1901 +
          "begin": "\\(",
1902 +
          "beginCaptures": {
1903 +
            "0": {
1904 +
              "name": "punctuation.section.parenthese.shell"
1905 +
            }
1906 +
          },
1907 +
          "end": "\\)",
1908 +
          "endCaptures": {
1909 +
            "0": {
1910 +
              "name": "punctuation.section.parenthese.shell"
1911 +
            }
1912 +
          },
1913 +
          "name": "meta.parenthese.group.shell",
1914 +
          "patterns": [
1915 +
            {
1916 +
              "include": "#initial_context"
1917 +
            }
1918 +
          ]
1919 +
        }
1920 +
      ]
1921 +
    },
1922 +
    "pathname": {
1923 +
      "patterns": [
1924 +
        {
1925 +
          "match": "(?<=[:=\\s]|^)~",
1926 +
          "name": "keyword.operator.tilde.shell"
1927 +
        },
1928 +
        {
1929 +
          "match": "[*?]",
1930 +
          "name": "keyword.operator.glob.shell"
1931 +
        },
1932 +
        {
1933 +
          "begin": "([!*+?@])(\\()",
1934 +
          "beginCaptures": {
1935 +
            "1": {
1936 +
              "name": "keyword.operator.extglob.shell"
1937 +
            },
1938 +
            "2": {
1939 +
              "name": "punctuation.definition.extglob.shell"
1940 +
            }
1941 +
          },
1942 +
          "end": "\\)",
1943 +
          "endCaptures": {
1944 +
            "0": {
1945 +
              "name": "punctuation.definition.extglob.shell"
1946 +
            }
1947 +
          },
1948 +
          "name": "meta.structure.extglob.shell",
1949 +
          "patterns": [
1950 +
            {
1951 +
              "include": "#initial_context"
1952 +
            }
1953 +
          ]
1954 +
        }
1955 +
      ]
1956 +
    },
1957 +
    "pipeline": {
1958 +
      "patterns": [
1959 +
        {
1960 +
          "match": "(?<=^|[\\&;\\s])(time)(?=[\\&;\\s]|$)",
1961 +
          "name": "keyword.other.shell"
1962 +
        },
1963 +
        {
1964 +
          "match": "[!|]",
1965 +
          "name": "keyword.operator.pipe.shell"
1966 +
        }
1967 +
      ]
1968 +
    },
1969 +
    "redirect_fix": {
1970 +
      "captures": {
1971 +
        "1": {
1972 +
          "name": "keyword.operator.redirect.shell"
1973 +
        },
1974 +
        "2": {
1975 +
          "name": "string.unquoted.argument.shell"
1976 +
        }
1977 +
      },
1978 +
      "match": "(>>?)[\\t ]*+([^\\t\\n \"$\\&-);<>\\\\`|]+)"
1979 +
    },
1980 +
    "redirect_number": {
1981 +
      "captures": {
1982 +
        "1": {
1983 +
          "name": "keyword.operator.redirect.stdout.shell"
1984 +
        },
1985 +
        "2": {
1986 +
          "name": "keyword.operator.redirect.stderr.shell"
1987 +
        },
1988 +
        "3": {
1989 +
          "name": "keyword.operator.redirect.$3.shell"
1990 +
        }
1991 +
      },
1992 +
      "match": "(?<=[\\t ])(?:(1)|(2)|(\\d+))(?=>)"
1993 +
    },
1994 +
    "redirection": {
1995 +
      "patterns": [
1996 +
        {
1997 +
          "begin": "[<>]\\(",
1998 +
          "beginCaptures": {
1999 +
            "0": {
2000 +
              "name": "punctuation.definition.string.begin.shell"
2001 +
            }
2002 +
          },
2003 +
          "end": "\\)",
2004 +
          "endCaptures": {
2005 +
            "0": {
2006 +
              "name": "punctuation.definition.string.end.shell"
2007 +
            }
2008 +
          },
2009 +
          "name": "string.interpolated.process-substitution.shell",
2010 +
          "patterns": [
2011 +
            {
2012 +
              "include": "#initial_context"
2013 +
            }
2014 +
          ]
2015 +
        },
2016 +
        {
2017 +
          "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|[<>])|\\d*<&|\\d*<>)(?![<>])",
2018 +
          "name": "keyword.operator.redirect.shell"
2019 +
        }
2020 +
      ]
2021 +
    },
2022 +
    "regex_comparison": {
2023 +
      "match": "=~",
2024 +
      "name": "keyword.operator.logical.regex.shell"
2025 +
    },
2026 +
    "regexp": {
2027 +
      "patterns": [
2028 +
        {
2029 +
          "match": ".+"
2030 +
        }
2031 +
      ]
2032 +
    },
2033 +
    "simple_options": {
2034 +
      "captures": {
2035 +
        "0": {
2036 +
          "patterns": [
2037 +
            {
2038 +
              "captures": {
2039 +
                "1": {
2040 +
                  "name": "string.unquoted.argument.shell constant.other.option.dash.shell"
2041 +
                },
2042 +
                "2": {
2043 +
                  "name": "string.unquoted.argument.shell constant.other.option.shell"
2044 +
                }
2045 +
              },
2046 +
              "match": "[\\t ]++(-)(\\w+)"
2047 +
            }
2048 +
          ]
2049 +
        }
2050 +
      },
2051 +
      "match": "(?:[\\t ]++-\\w+)*"
2052 +
    },
2053 +
    "simple_unquoted": {
2054 +
      "match": "[^\\t\\n \"$\\&-);<>\\\\`|]",
2055 +
      "name": "string.unquoted.shell"
2056 +
    },
2057 +
    "special_expansion": {
2058 +
      "match": "!|:[-=?]?|[*@]|##?|%%|[%/]",
2059 +
      "name": "keyword.operator.expansion.shell"
2060 +
    },
2061 +
    "start_of_command": {
2062 +
      "match": "[\\t ]*+(?![\\n!#\\&()<>\\[{|]|$|[\\t ;])(?!nocorrect |nocorrect\\t|nocorrect$|readonly |readonly\\t|readonly$|function |function\\t|function$|foreach |foreach\\t|foreach$|coproc |coproc\\t|coproc$|logout |logout\\t|logout$|export |export\\t|export$|select |select\\t|select$|repeat |repeat\\t|repeat$|pushd |pushd\\t|pushd$|until |until\\t|until$|while |while\\t|while$|local |local\\t|local$|case |case\\t|case$|done |done\\t|done$|elif |elif\\t|elif$|else |else\\t|else$|esac |esac\\t|esac$|popd |popd\\t|popd$|then |then\\t|then$|time |time\\t|time$|for |for\\t|for$|end |end\\t|end$|fi |fi\\t|fi$|do |do\\t|do$|in |in\\t|in$|if |if\\t|if$)(?!\\\\\\n?$)"
2063 +
    },
2064 +
    "string": {
2065 +
      "patterns": [
2066 +
        {
2067 +
          "match": "\\\\.",
2068 +
          "name": "constant.character.escape.shell"
2069 +
        },
2070 +
        {
2071 +
          "begin": "'",
2072 +
          "beginCaptures": {
2073 +
            "0": {
2074 +
              "name": "punctuation.definition.string.begin.shell"
2075 +
            }
2076 +
          },
2077 +
          "end": "'",
2078 +
          "endCaptures": {
2079 +
            "0": {
2080 +
              "name": "punctuation.definition.string.end.shell"
2081 +
            }
2082 +
          },
2083 +
          "name": "string.quoted.single.shell"
2084 +
        },
2085 +
        {
2086 +
          "begin": "\\$?\"",
2087 +
          "beginCaptures": {
2088 +
            "0": {
2089 +
              "name": "punctuation.definition.string.begin.shell"
2090 +
            }
2091 +
          },
2092 +
          "end": "\"",
2093 +
          "endCaptures": {
2094 +
            "0": {
2095 +
              "name": "punctuation.definition.string.end.shell"
2096 +
            }
2097 +
          },
2098 +
          "name": "string.quoted.double.shell",
2099 +
          "patterns": [
2100 +
            {
2101 +
              "match": "\\\\[\\n\"$\\\\`]",
2102 +
              "name": "constant.character.escape.shell"
2103 +
            },
2104 +
            {
2105 +
              "include": "#variable"
2106 +
            },
2107 +
            {
2108 +
              "include": "#interpolation"
2109 +
            }
2110 +
          ]
2111 +
        },
2112 +
        {
2113 +
          "begin": "\\$'",
2114 +
          "beginCaptures": {
2115 +
            "0": {
2116 +
              "name": "punctuation.definition.string.begin.shell"
2117 +
            }
2118 +
          },
2119 +
          "end": "'",
2120 +
          "endCaptures": {
2121 +
            "0": {
2122 +
              "name": "punctuation.definition.string.end.shell"
2123 +
            }
2124 +
          },
2125 +
          "name": "string.quoted.single.dollar.shell",
2126 +
          "patterns": [
2127 +
            {
2128 +
              "match": "\\\\['\\\\abefnrtv]",
2129 +
              "name": "constant.character.escape.ansi-c.shell"
2130 +
            },
2131 +
            {
2132 +
              "match": "\\\\[0-9]{3}\"",
2133 +
              "name": "constant.character.escape.octal.shell"
2134 +
            },
2135 +
            {
2136 +
              "match": "\\\\x\\h{2}\"",
2137 +
              "name": "constant.character.escape.hex.shell"
2138 +
            },
2139 +
            {
2140 +
              "match": "\\\\c.\"",
2141 +
              "name": "constant.character.escape.control-char.shell"
2142 +
            }
2143 +
          ]
2144 +
        }
2145 +
      ]
2146 +
    },
2147 +
    "subshell_dollar": {
2148 +
      "patterns": [
2149 +
        {
2150 +
          "begin": "\\$\\(",
2151 +
          "beginCaptures": {
2152 +
            "0": {
2153 +
              "name": "punctuation.definition.subshell.single.shell"
2154 +
            }
2155 +
          },
2156 +
          "end": "\\)",
2157 +
          "endCaptures": {
2158 +
            "0": {
2159 +
              "name": "punctuation.definition.subshell.single.shell"
2160 +
            }
2161 +
          },
2162 +
          "name": "meta.scope.subshell",
2163 +
          "patterns": [
2164 +
            {
2165 +
              "include": "#parenthese"
2166 +
            },
2167 +
            {
2168 +
              "include": "#initial_context"
2169 +
            }
2170 +
          ]
2171 +
        }
2172 +
      ]
2173 +
    },
2174 +
    "support": {
2175 +
      "patterns": [
2176 +
        {
2177 +
          "match": "(?<=^|[\\&;\\s])[.:](?=[\\&;\\s]|$)",
2178 +
          "name": "support.function.builtin.shell"
2179 +
        }
2180 +
      ]
2181 +
    },
2182 +
    "typical_statements": {
2183 +
      "patterns": [
2184 +
        {
2185 +
          "include": "#assignment_statement"
2186 +
        },
2187 +
        {
2188 +
          "include": "#case_statement"
2189 +
        },
2190 +
        {
2191 +
          "include": "#for_statement"
2192 +
        },
2193 +
        {
2194 +
          "include": "#while_statement"
2195 +
        },
2196 +
        {
2197 +
          "include": "#function_definition"
2198 +
        },
2199 +
        {
2200 +
          "include": "#command_statement"
2201 +
        },
2202 +
        {
2203 +
          "include": "#line_continuation"
2204 +
        },
2205 +
        {
2206 +
          "include": "#arithmetic_double"
2207 +
        },
2208 +
        {
2209 +
          "include": "#normal_context"
2210 +
        }
2211 +
      ]
2212 +
    },
2213 +
    "variable": {
2214 +
      "patterns": [
2215 +
        {
2216 +
          "captures": {
2217 +
            "1": {
2218 +
              "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell"
2219 +
            },
2220 +
            "2": {
2221 +
              "name": "variable.parameter.positional.all.shell"
2222 +
            }
2223 +
          },
2224 +
          "match": "(\\$)(@(?!\\w))"
2225 +
        },
2226 +
        {
2227 +
          "captures": {
2228 +
            "1": {
2229 +
              "name": "punctuation.definition.variable.shell variable.parameter.positional.shell"
2230 +
            },
2231 +
            "2": {
2232 +
              "name": "variable.parameter.positional.shell"
2233 +
            }
2234 +
          },
2235 +
          "match": "(\\$)([0-9](?!\\w))"
2236 +
        },
2237 +
        {
2238 +
          "captures": {
2239 +
            "1": {
2240 +
              "name": "punctuation.definition.variable.shell variable.language.special.shell"
2241 +
            },
2242 +
            "2": {
2243 +
              "name": "variable.language.special.shell"
2244 +
            }
2245 +
          },
2246 +
          "match": "(\\$)([-!#$*0?_](?!\\w))"
2247 +
        },
2248 +
        {
2249 +
          "begin": "(\\$)(\\{)[\\t ]*+(?=\\d)",
2250 +
          "beginCaptures": {
2251 +
            "1": {
2252 +
              "name": "punctuation.definition.variable.shell variable.parameter.positional.shell"
2253 +
            },
2254 +
            "2": {
2255 +
              "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"
2256 +
            }
2257 +
          },
2258 +
          "contentName": "meta.parameter-expansion",
2259 +
          "end": "}",
2260 +
          "endCaptures": {
2261 +
            "0": {
2262 +
              "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"
2263 +
            }
2264 +
          },
2265 +
          "patterns": [
2266 +
            {
2267 +
              "include": "#special_expansion"
2268 +
            },
2269 +
            {
2270 +
              "include": "#array_access_inline"
2271 +
            },
2272 +
            {
2273 +
              "match": "[0-9]+",
2274 +
              "name": "variable.parameter.positional.shell"
2275 +
            },
2276 +
            {
2277 +
              "match": "(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)",
2278 +
              "name": "variable.other.normal.shell"
2279 +
            },
2280 +
            {
2281 +
              "include": "#variable"
2282 +
            },
2283 +
            {
2284 +
              "include": "#string"
2285 +
            }
2286 +
          ]
2287 +
        },
2288 +
        {
2289 +
          "begin": "(\\$)(\\{)",
2290 +
          "beginCaptures": {
2291 +
            "1": {
2292 +
              "name": "punctuation.definition.variable.shell"
2293 +
            },
2294 +
            "2": {
2295 +
              "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"
2296 +
            }
2297 +
          },
2298 +
          "contentName": "meta.parameter-expansion",
2299 +
          "end": "}",
2300 +
          "endCaptures": {
2301 +
            "0": {
2302 +
              "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"
2303 +
            }
2304 +
          },
2305 +
          "patterns": [
2306 +
            {
2307 +
              "include": "#special_expansion"
2308 +
            },
2309 +
            {
2310 +
              "include": "#array_access_inline"
2311 +
            },
2312 +
            {
2313 +
              "match": "(?<!\\w)[-0-9A-Z_a-z]+(?!\\w)",
2314 +
              "name": "variable.other.normal.shell"
2315 +
            },
2316 +
            {
2317 +
              "include": "#variable"
2318 +
            },
2319 +
            {
2320 +
              "include": "#string"
2321 +
            }
2322 +
          ]
2323 +
        },
2324 +
        {
2325 +
          "captures": {
2326 +
            "1": {
2327 +
              "name": "punctuation.definition.variable.shell variable.other.normal.shell"
2328 +
            },
2329 +
            "2": {
2330 +
              "name": "variable.other.normal.shell"
2331 +
            }
2332 +
          },
2333 +
          "match": "(\\$)(\\w+(?!\\w))"
2334 +
        }
2335 +
      ]
2336 +
    },
2337 +
    "while_statement": {
2338 +
      "patterns": [
2339 +
        {
2340 +
          "begin": "\\b(while)\\b",
2341 +
          "beginCaptures": {
2342 +
            "1": {
2343 +
              "name": "keyword.control.while.shell"
2344 +
            }
2345 +
          },
2346 +
          "end": "(?=[\\n\\&);`{|}]|[\\t ]*#|])(?<!\\\\)",
2347 +
          "endCaptures": {
2348 +
          },
2349 +
          "name": "meta.while.shell",
2350 +
          "patterns": [
2351 +
            {
2352 +
              "include": "#line_continuation"
2353 +
            },
2354 +
            {
2355 +
              "include": "#math_operators"
2356 +
            },
2357 +
            {
2358 +
              "include": "#option"
2359 +
            },
2360 +
            {
2361 +
              "include": "#simple_unquoted"
2362 +
            },
2363 +
            {
2364 +
              "include": "#normal_context"
2365 +
            },
2366 +
            {
2367 +
              "include": "#string"
2368 +
            }
2369 +
          ]
2370 +
        }
2371 +
      ]
2372 +
    }
2373 +
  },
2374 +
  "scopeName": "source.shell"
2375 +
}
crates/highlight/tests/syntaxes.rs +20 -0
3 3
4 4
use std::str::FromStr;
5 5
6 6
use rustik_highlight::{Grammar, LineState, LineTokenizer, syntaxes};
7 7
8 +
#[test]
9 +
fn built_in_syntaxes_compile() {
10 +
    for source in [
11 +
        syntaxes::C,
12 +
        syntaxes::CSS,
13 +
        syntaxes::GO,
14 +
        syntaxes::HTML,
15 +
        syntaxes::JAVASCRIPT,
16 +
        syntaxes::MAKE,
17 +
        syntaxes::MARKDOWN,
18 +
        syntaxes::PYTHON,
19 +
        syntaxes::RUBY,
20 +
        syntaxes::RUST,
21 +
        syntaxes::SHELL,
22 +
        syntaxes::TYPESCRIPT,
23 +
    ] {
24 +
        Grammar::from_str(source).unwrap();
25 +
    }
26 +
}
27 +
8 28
#[test]
9 29
fn css_root_comments_are_highlighted() {
10 30
    let grammar = Grammar::from_str(syntaxes::CSS).unwrap();
11 31
    let mut state = LineState::default();
12 32
    let line = "/**/";