diff: Add support for more languages

dcf0051424f26625675d3d926b211b952a6cb016
Alexis Sellier committed ago 1 parent 6ce2923f
AGENTS.md +1 -0
31 31
* ALWAYS structure human-facing terminal output with the existing UI primitives
32 32
  (`Table`, `VStack`, `HStack`, `Line`, labels, and related renderable types)
33 33
  instead of hand-aligning text with ad hoc spacing.
34 34
* Always do things the proper, idiomatic, robust way. NO HACKS.
35 35
* After the tests pass, run the benchmarks for the crate to ensure no regressions.
36 +
* Don't use unicode characters in comments, outside of diagrams.
36 37
37 38
When modifying tests:
38 39
39 40
* NEVER add assertions whose purpose is to reject a previous implementation's
40 41
  output or behavior. Tests should assert the current required behavior and
crates/diff/src/bin/rustik-diff/builtins.rs +26 -4
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; 1] = [SyntaxAsset {
14 -
    source: include_str!("../../syntaxes/rust.json"),
15 -
    file_types: &["rs"],
16 -
}];
13 +
const SYNTAXES: [SyntaxAsset; 6] = [
14 +
    SyntaxAsset {
15 +
        source: include_str!("../../syntaxes/c.json"),
16 +
        file_types: &["c", "h"],
17 +
    },
18 +
    SyntaxAsset {
19 +
        source: include_str!("../../syntaxes/css.json"),
20 +
        file_types: &["css"],
21 +
    },
22 +
    SyntaxAsset {
23 +
        source: include_str!("../../syntaxes/html.json"),
24 +
        file_types: &["html", "htm"],
25 +
    },
26 +
    SyntaxAsset {
27 +
        source: include_str!("../../syntaxes/markdown.json"),
28 +
        file_types: &["md", "markdown", "mdown"],
29 +
    },
30 +
    SyntaxAsset {
31 +
        source: include_str!("../../syntaxes/rust.json"),
32 +
        file_types: &["rs"],
33 +
    },
34 +
    SyntaxAsset {
35 +
        source: include_str!("../../syntaxes/typescript.json"),
36 +
        file_types: &["ts", "cts", "mts"],
37 +
    },
38 +
];
17 39
18 40
/// Binary-local highlight assets loaded for one diff document.
19 41
pub(super) struct Builtins {
20 42
    /// Diff chrome palette derived from the built-in theme.
21 43
    pub(super) palette: DiffPalette,
crates/diff/src/bin/rustik-diff/session.rs +6 -2
64 64
struct TerminalSession<'a> {
65 65
    /// Terminal frame target.
66 66
    terminal: &'a mut DiffTerminal,
67 67
    /// Diff viewer state.
68 68
    viewer: &'a mut DiffViewer,
69 -
    /// Git-backed diff repo, present when the input came from Git.
69 +
    /// Git-backed diff repo, present when the input came from direct Git args.
70 70
    repo: Option<GitRepo>,
71 71
    /// Visible-row highlight request channel.
72 72
    highlights_tx: SyncSender<Vec<HighlightRequest>>,
73 73
}
74 74
105 105
    }
106 106
107 107
    /// Requests highlight work for currently visible rows.
108 108
    fn request_visible_highlights(&mut self) {
109 109
        let area = viewer_area(self.terminal.area());
110 -
        let requests = self.viewer.highlight_requests(area);
110 +
        let requests = if let Some(repo) = self.repo.as_ref() {
111 +
            self.viewer.highlight_requests_with_repo(area, repo)
112 +
        } else {
113 +
            self.viewer.highlight_requests(area)
114 +
        };
111 115
        if !requests.is_empty() {
112 116
            match self.highlights_tx.try_send(requests) {
113 117
                Ok(()) => {}
114 118
                Err(TrySendError::Full(requests) | TrySendError::Disconnected(requests)) => {
115 119
                    self.viewer.cancel_highlights(requests);
crates/diff/src/context.rs +1 -1
12 12
use crate::{DiffDocument, FileDiff, FileId, HunkId, RowId};
13 13
14 14
/// Context line count Git uses when no explicit `-U` option is passed.
15 15
const DEFAULT_CONTEXT_LINES: usize = 3;
16 16
/// Unified diff context used for fully expanded files.
17 -
const FULL_CONTEXT_LINES: usize = 999_999;
17 +
pub(crate) const FULL_CONTEXT_LINES: usize = 999_999;
18 18
19 19
/// Tracks the requested diff context width and the set of expanded files.
20 20
#[derive(Clone, Debug)]
21 21
pub(crate) struct ContextState {
22 22
    /// Requested context line count.
a.txt +0 -0
a.txt +0 -0
crates/diff/src/syntaxes/LICENSE +1 -0
1 1
Copyright (c) 2020 Dustin Pomerleau
2 +
Copyright (c) Microsoft Corporation
2 3
3 4
Permission is hereby granted, free of charge, to any person obtaining a copy
4 5
of this software and associated documentation files (the "Software"), to deal
5 6
in the Software without restriction, including without limitation the rights
6 7
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
crates/diff/src/syntaxes/c.json added +3552 -0
1 +
{
2 +
  "displayName": "C",
3 +
  "name": "c",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#preprocessor-rule-enabled"
7 +
    },
8 +
    {
9 +
      "include": "#preprocessor-rule-disabled"
10 +
    },
11 +
    {
12 +
      "include": "#preprocessor-rule-conditional"
13 +
    },
14 +
    {
15 +
      "include": "#predefined_macros"
16 +
    },
17 +
    {
18 +
      "include": "#comments"
19 +
    },
20 +
    {
21 +
      "include": "#switch_statement"
22 +
    },
23 +
    {
24 +
      "include": "#anon_pattern_1"
25 +
    },
26 +
    {
27 +
      "include": "#storage_types"
28 +
    },
29 +
    {
30 +
      "include": "#anon_pattern_2"
31 +
    },
32 +
    {
33 +
      "include": "#anon_pattern_3"
34 +
    },
35 +
    {
36 +
      "include": "#anon_pattern_4"
37 +
    },
38 +
    {
39 +
      "include": "#anon_pattern_5"
40 +
    },
41 +
    {
42 +
      "include": "#anon_pattern_6"
43 +
    },
44 +
    {
45 +
      "include": "#anon_pattern_7"
46 +
    },
47 +
    {
48 +
      "include": "#operators"
49 +
    },
50 +
    {
51 +
      "include": "#numbers"
52 +
    },
53 +
    {
54 +
      "include": "#strings"
55 +
    },
56 +
    {
57 +
      "include": "#anon_pattern_range_1"
58 +
    },
59 +
    {
60 +
      "include": "#anon_pattern_range_2"
61 +
    },
62 +
    {
63 +
      "include": "#anon_pattern_range_3"
64 +
    },
65 +
    {
66 +
      "include": "#pragma-mark"
67 +
    },
68 +
    {
69 +
      "include": "#anon_pattern_range_4"
70 +
    },
71 +
    {
72 +
      "include": "#anon_pattern_range_5"
73 +
    },
74 +
    {
75 +
      "include": "#anon_pattern_range_6"
76 +
    },
77 +
    {
78 +
      "include": "#anon_pattern_8"
79 +
    },
80 +
    {
81 +
      "include": "#anon_pattern_9"
82 +
    },
83 +
    {
84 +
      "include": "#anon_pattern_10"
85 +
    },
86 +
    {
87 +
      "include": "#anon_pattern_11"
88 +
    },
89 +
    {
90 +
      "include": "#anon_pattern_12"
91 +
    },
92 +
    {
93 +
      "include": "#anon_pattern_13"
94 +
    },
95 +
    {
96 +
      "include": "#block"
97 +
    },
98 +
    {
99 +
      "include": "#parens"
100 +
    },
101 +
    {
102 +
      "include": "#anon_pattern_range_7"
103 +
    },
104 +
    {
105 +
      "include": "#line_continuation_character"
106 +
    },
107 +
    {
108 +
      "include": "#anon_pattern_range_8"
109 +
    },
110 +
    {
111 +
      "include": "#anon_pattern_range_9"
112 +
    },
113 +
    {
114 +
      "include": "#anon_pattern_14"
115 +
    },
116 +
    {
117 +
      "include": "#anon_pattern_15"
118 +
    }
119 +
  ],
120 +
  "repository": {
121 +
    "access-method": {
122 +
      "begin": "([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))\\s*(?:(\\.)|(->))((?:[A-Z_a-z][0-9A-Z_a-z]*\\s*(?:\\.|->))*)\\s*([A-Z_a-z][0-9A-Z_a-z]*)(\\()",
123 +
      "beginCaptures": {
124 +
        "1": {
125 +
          "name": "variable.object.c"
126 +
        },
127 +
        "2": {
128 +
          "name": "punctuation.separator.dot-access.c"
129 +
        },
130 +
        "3": {
131 +
          "name": "punctuation.separator.pointer-access.c"
132 +
        },
133 +
        "4": {
134 +
          "patterns": [
135 +
            {
136 +
              "match": "\\.",
137 +
              "name": "punctuation.separator.dot-access.c"
138 +
            },
139 +
            {
140 +
              "match": "->",
141 +
              "name": "punctuation.separator.pointer-access.c"
142 +
            },
143 +
            {
144 +
              "match": "[A-Z_a-z][0-9A-Z_a-z]*",
145 +
              "name": "variable.object.c"
146 +
            },
147 +
            {
148 +
              "match": ".+",
149 +
              "name": "everything.else.c"
150 +
            }
151 +
          ]
152 +
        },
153 +
        "5": {
154 +
          "name": "entity.name.function.member.c"
155 +
        },
156 +
        "6": {
157 +
          "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
158 +
        }
159 +
      },
160 +
      "end": "\\)",
161 +
      "endCaptures": {
162 +
        "0": {
163 +
          "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
164 +
        }
165 +
      },
166 +
      "name": "meta.function-call.member.c",
167 +
      "patterns": [
168 +
        {
169 +
          "include": "#function-call-innards"
170 +
        }
171 +
      ]
172 +
    },
173 +
    "anon_pattern_1": {
174 +
      "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b",
175 +
      "name": "keyword.control.c"
176 +
    },
177 +
    "anon_pattern_10": {
178 +
      "match": "\\b((?:int8|int16|int32|int64|uint8|uint16|uint32|uint64|int_least8|int_least16|int_least32|int_least64|uint_least8|uint_least16|uint_least32|uint_least64|int_fast8|int_fast16|int_fast32|int_fast64|uint_fast8|uint_fast16|uint_fast32|uint_fast64|intptr|uintptr|intmax|uintmax)_t)\\b",
179 +
      "name": "support.type.stdint.c"
180 +
    },
181 +
    "anon_pattern_11": {
182 +
      "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b",
183 +
      "name": "support.constant.mac-classic.c"
184 +
    },
185 +
    "anon_pattern_12": {
186 +
      "match": "\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\b",
187 +
      "name": "support.type.mac-classic.c"
188 +
    },
189 +
    "anon_pattern_13": {
190 +
      "match": "\\b([0-9A-Z_a-z]+_t)\\b",
191 +
      "name": "support.type.posix-reserved.c"
192 +
    },
193 +
    "anon_pattern_14": {
194 +
      "match": ";",
195 +
      "name": "punctuation.terminator.statement.c"
196 +
    },
197 +
    "anon_pattern_15": {
198 +
      "match": ",",
199 +
      "name": "punctuation.separator.delimiter.c"
200 +
    },
201 +
    "anon_pattern_2": {
202 +
      "match": "typedef",
203 +
      "name": "keyword.other.typedef.c"
204 +
    },
205 +
    "anon_pattern_3": {
206 +
      "match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
207 +
      "name": "storage.modifier.c"
208 +
    },
209 +
    "anon_pattern_4": {
210 +
      "match": "\\bk[A-Z]\\w*\\b",
211 +
      "name": "constant.other.variable.mac-classic.c"
212 +
    },
213 +
    "anon_pattern_5": {
214 +
      "match": "\\bg[A-Z]\\w*\\b",
215 +
      "name": "variable.other.readwrite.global.mac-classic.c"
216 +
    },
217 +
    "anon_pattern_6": {
218 +
      "match": "\\bs[A-Z]\\w*\\b",
219 +
      "name": "variable.other.readwrite.static.mac-classic.c"
220 +
    },
221 +
    "anon_pattern_7": {
222 +
      "match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
223 +
      "name": "constant.language.c"
224 +
    },
225 +
    "anon_pattern_8": {
226 +
      "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b",
227 +
      "name": "support.type.sys-types.c"
228 +
    },
229 +
    "anon_pattern_9": {
230 +
      "match": "\\b(pthread_(?:attr_|cond_|condattr_|mutex_|mutexattr_|once_|rwlock_|rwlockattr_||key_)t)\\b",
231 +
      "name": "support.type.pthread.c"
232 +
    },
233 +
    "anon_pattern_range_1": {
234 +
      "begin": "((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))((#)\\s*define)\\b\\s+((?<!\\w)[A-Z_a-z]\\w*(?!\\w))(?:(\\()([^()\\\\]+)(\\)))?",
235 +
      "beginCaptures": {
236 +
        "1": {
237 +
          "patterns": [
238 +
            {
239 +
              "include": "#inline_comment"
240 +
            }
241 +
          ]
242 +
        },
243 +
        "10": {
244 +
          "name": "punctuation.definition.parameters.end.c"
245 +
        },
246 +
        "2": {
247 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
248 +
        },
249 +
        "3": {
250 +
          "name": "comment.block.c"
251 +
        },
252 +
        "4": {
253 +
          "patterns": [
254 +
            {
255 +
              "match": "\\*/",
256 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
257 +
            },
258 +
            {
259 +
              "match": "\\*",
260 +
              "name": "comment.block.c"
261 +
            }
262 +
          ]
263 +
        },
264 +
        "5": {
265 +
          "name": "keyword.control.directive.define.c"
266 +
        },
267 +
        "6": {
268 +
          "name": "punctuation.definition.directive.c"
269 +
        },
270 +
        "7": {
271 +
          "name": "entity.name.function.preprocessor.c"
272 +
        },
273 +
        "8": {
274 +
          "name": "punctuation.definition.parameters.begin.c"
275 +
        },
276 +
        "9": {
277 +
          "patterns": [
278 +
            {
279 +
              "captures": {
280 +
                "1": {
281 +
                  "name": "variable.parameter.preprocessor.c"
282 +
                }
283 +
              },
284 +
              "match": "(?<=[(,])\\s*((?<!\\w)[A-Z_a-z]\\w*(?!\\w))\\s*"
285 +
            },
286 +
            {
287 +
              "match": ",",
288 +
              "name": "punctuation.separator.parameters.c"
289 +
            },
290 +
            {
291 +
              "match": "\\.\\.\\.",
292 +
              "name": "ellipses.c punctuation.vararg-ellipses.variable.parameter.preprocessor.c"
293 +
            }
294 +
          ]
295 +
        }
296 +
      },
297 +
      "end": "(?<!\\\\)(?=\\n)",
298 +
      "name": "meta.preprocessor.macro.c",
299 +
      "patterns": [
300 +
        {
301 +
          "include": "#preprocessor-rule-define-line-contents"
302 +
        }
303 +
      ]
304 +
    },
305 +
    "anon_pattern_range_2": {
306 +
      "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*",
307 +
      "beginCaptures": {
308 +
        "1": {
309 +
          "name": "keyword.control.directive.diagnostic.$3.c"
310 +
        },
311 +
        "2": {
312 +
          "name": "punctuation.definition.directive.c"
313 +
        }
314 +
      },
315 +
      "end": "(?<!\\\\)(?=\\n)",
316 +
      "name": "meta.preprocessor.diagnostic.c",
317 +
      "patterns": [
318 +
        {
319 +
          "begin": "\"",
320 +
          "beginCaptures": {
321 +
            "0": {
322 +
              "name": "punctuation.definition.string.begin.c"
323 +
            }
324 +
          },
325 +
          "end": "\"|(?<!\\\\)(?=\\s*\\n)",
326 +
          "endCaptures": {
327 +
            "0": {
328 +
              "name": "punctuation.definition.string.end.c"
329 +
            }
330 +
          },
331 +
          "name": "string.quoted.double.c",
332 +
          "patterns": [
333 +
            {
334 +
              "include": "#line_continuation_character"
335 +
            }
336 +
          ]
337 +
        },
338 +
        {
339 +
          "begin": "'",
340 +
          "beginCaptures": {
341 +
            "0": {
342 +
              "name": "punctuation.definition.string.begin.c"
343 +
            }
344 +
          },
345 +
          "end": "'|(?<!\\\\)(?=\\s*\\n)",
346 +
          "endCaptures": {
347 +
            "0": {
348 +
              "name": "punctuation.definition.string.end.c"
349 +
            }
350 +
          },
351 +
          "name": "string.quoted.single.c",
352 +
          "patterns": [
353 +
            {
354 +
              "include": "#line_continuation_character"
355 +
            }
356 +
          ]
357 +
        },
358 +
        {
359 +
          "begin": "[^\"']",
360 +
          "end": "(?<!\\\\)(?=\\s*\\n)",
361 +
          "name": "string.unquoted.single.c",
362 +
          "patterns": [
363 +
            {
364 +
              "include": "#line_continuation_character"
365 +
            },
366 +
            {
367 +
              "include": "#comments"
368 +
            }
369 +
          ]
370 +
        }
371 +
      ]
372 +
    },
373 +
    "anon_pattern_range_3": {
374 +
      "begin": "^\\s*((#)\\s*(i(?:nclude(?:_next)?|mport)))\\b\\s*",
375 +
      "beginCaptures": {
376 +
        "1": {
377 +
          "name": "keyword.control.directive.$3.c"
378 +
        },
379 +
        "2": {
380 +
          "name": "punctuation.definition.directive.c"
381 +
        }
382 +
      },
383 +
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
384 +
      "name": "meta.preprocessor.include.c",
385 +
      "patterns": [
386 +
        {
387 +
          "include": "#line_continuation_character"
388 +
        },
389 +
        {
390 +
          "begin": "\"",
391 +
          "beginCaptures": {
392 +
            "0": {
393 +
              "name": "punctuation.definition.string.begin.c"
394 +
            }
395 +
          },
396 +
          "end": "\"",
397 +
          "endCaptures": {
398 +
            "0": {
399 +
              "name": "punctuation.definition.string.end.c"
400 +
            }
401 +
          },
402 +
          "name": "string.quoted.double.include.c"
403 +
        },
404 +
        {
405 +
          "begin": "<",
406 +
          "beginCaptures": {
407 +
            "0": {
408 +
              "name": "punctuation.definition.string.begin.c"
409 +
            }
410 +
          },
411 +
          "end": ">",
412 +
          "endCaptures": {
413 +
            "0": {
414 +
              "name": "punctuation.definition.string.end.c"
415 +
            }
416 +
          },
417 +
          "name": "string.quoted.other.lt-gt.include.c"
418 +
        }
419 +
      ]
420 +
    },
421 +
    "anon_pattern_range_4": {
422 +
      "begin": "^\\s*((#)\\s*line)\\b",
423 +
      "beginCaptures": {
424 +
        "1": {
425 +
          "name": "keyword.control.directive.line.c"
426 +
        },
427 +
        "2": {
428 +
          "name": "punctuation.definition.directive.c"
429 +
        }
430 +
      },
431 +
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
432 +
      "name": "meta.preprocessor.c",
433 +
      "patterns": [
434 +
        {
435 +
          "include": "#strings"
436 +
        },
437 +
        {
438 +
          "include": "#numbers"
439 +
        },
440 +
        {
441 +
          "include": "#line_continuation_character"
442 +
        }
443 +
      ]
444 +
    },
445 +
    "anon_pattern_range_5": {
446 +
      "begin": "^\\s*((#)\\s*undef)\\b",
447 +
      "beginCaptures": {
448 +
        "1": {
449 +
          "name": "keyword.control.directive.undef.c"
450 +
        },
451 +
        "2": {
452 +
          "name": "punctuation.definition.directive.c"
453 +
        }
454 +
      },
455 +
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
456 +
      "name": "meta.preprocessor.c",
457 +
      "patterns": [
458 +
        {
459 +
          "match": "[$A-Z_a-z][$\\w]*",
460 +
          "name": "entity.name.function.preprocessor.c"
461 +
        },
462 +
        {
463 +
          "include": "#line_continuation_character"
464 +
        }
465 +
      ]
466 +
    },
467 +
    "anon_pattern_range_6": {
468 +
      "begin": "^\\s*((#)\\s*pragma)\\b",
469 +
      "beginCaptures": {
470 +
        "1": {
471 +
          "name": "keyword.control.directive.pragma.c"
472 +
        },
473 +
        "2": {
474 +
          "name": "punctuation.definition.directive.c"
475 +
        }
476 +
      },
477 +
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
478 +
      "name": "meta.preprocessor.pragma.c",
479 +
      "patterns": [
480 +
        {
481 +
          "include": "#strings"
482 +
        },
483 +
        {
484 +
          "match": "[$A-Z_a-z][-$\\w]*",
485 +
          "name": "entity.other.attribute-name.pragma.preprocessor.c"
486 +
        },
487 +
        {
488 +
          "include": "#numbers"
489 +
        },
490 +
        {
491 +
          "include": "#line_continuation_character"
492 +
        }
493 +
      ]
494 +
    },
495 +
    "anon_pattern_range_7": {
496 +
      "begin": "(?<!\\w)(?!\\s*(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|pthread_rwlock_t|atomic_uintptr_t|atomic_ptrdiff_t|atomic_uintmax_t|atomic_intmax_t|atomic_char32_t|atomic_intptr_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|uint_least8_t|int_least32_t|int_least16_t|pthread_key_t|uint_fast32_t|uint_fast64_t|uint_fast16_t|atomic_size_t|atomic_ushort|atomic_ullong|int_least64_t|atomic_ulong|int_least8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|memory_order|atomic_schar|atomic_uchar|atomic_short|atomic_llong|thread_local|atomic_bool|atomic_uint|atomic_long|int_fast8_t|suseconds_t|atomic_char|atomic_int|useconds_t|_Imaginary|uintmax_t|in_addr_t|in_port_t|_Noreturn|blksize_t|pthread_t|uintptr_t|volatile|u_quad_t|blkcnt_t|intmax_t|intptr_t|_Complex|uint16_t|uint32_t|uint64_t|_Alignof|_Alignas|continue|unsigned|restrict|intmax_t|register|int64_t|qaddr_t|segsz_t|_Atomic|alignas|default|caddr_t|nlink_t|typedef|u_short|fixpt_t|clock_t|swblk_t|ssize_t|alignof|daddr_t|int16_t|int32_t|uint8_t|struct|mode_t|size_t|time_t|ushort|u_long|u_char|int8_t|double|signed|static|extern|inline|return|switch|xor_eq|and_eq|bitand|not_eq|sizeof|quad_t|uid_t|bitor|union|off_t|key_t|ino_t|compl|u_int|short|const|false|while|float|pid_t|break|_Bool|or_eq|div_t|dev_t|gid_t|id_t|long|case|goto|else|bool|auto|id_t|enum|uint|true|NULL|void|char|for|not|int|and|xor|do|or|if)\\s*\\()(?=[A-Z_a-z]\\w*\\s*\\()",
497 +
      "end": "(?!\\G)(?<=\\))",
498 +
      "name": "meta.function.c",
499 +
      "patterns": [
500 +
        {
501 +
          "include": "#function-innards"
502 +
        }
503 +
      ]
504 +
    },
505 +
    "anon_pattern_range_8": {
506 +
      "begin": "([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))?(\\[)(?!])",
507 +
      "beginCaptures": {
508 +
        "1": {
509 +
          "name": "variable.object.c"
510 +
        },
511 +
        "2": {
512 +
          "name": "punctuation.definition.begin.bracket.square.c"
513 +
        }
514 +
      },
515 +
      "end": "]",
516 +
      "endCaptures": {
517 +
        "0": {
518 +
          "name": "punctuation.definition.end.bracket.square.c"
519 +
        }
520 +
      },
521 +
      "name": "meta.bracket.square.access.c",
522 +
      "patterns": [
523 +
        {
524 +
          "include": "#function-call-innards"
525 +
        }
526 +
      ]
527 +
    },
528 +
    "anon_pattern_range_9": {
529 +
      "match": "\\[\\s*]",
530 +
      "name": "storage.modifier.array.bracket.square.c"
531 +
    },
532 +
    "backslash_escapes": {
533 +
      "match": "\\\\([\"'?\\\\abefnprtv]|[0-3][0-7]{0,2}|[4-7]\\d?|x\\h{0,2}|u\\h{0,4}|U\\h{0,8})",
534 +
      "name": "constant.character.escape.c"
535 +
    },
536 +
    "block": {
537 +
      "patterns": [
538 +
        {
539 +
          "begin": "\\{",
540 +
          "beginCaptures": {
541 +
            "0": {
542 +
              "name": "punctuation.section.block.begin.bracket.curly.c"
543 +
            }
544 +
          },
545 +
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)",
546 +
          "endCaptures": {
547 +
            "0": {
548 +
              "name": "punctuation.section.block.end.bracket.curly.c"
549 +
            }
550 +
          },
551 +
          "name": "meta.block.c",
552 +
          "patterns": [
553 +
            {
554 +
              "include": "#block_innards"
555 +
            }
556 +
          ]
557 +
        }
558 +
      ]
559 +
    },
560 +
    "block_comment": {
561 +
      "patterns": [
562 +
        {
563 +
          "begin": "\\s*+(/\\*)",
564 +
          "beginCaptures": {
565 +
            "1": {
566 +
              "name": "punctuation.definition.comment.begin.c"
567 +
            }
568 +
          },
569 +
          "end": "\\*/",
570 +
          "endCaptures": {
571 +
            "0": {
572 +
              "name": "punctuation.definition.comment.end.c"
573 +
            }
574 +
          },
575 +
          "name": "comment.block.c"
576 +
        },
577 +
        {
578 +
          "begin": "\\s*+(/\\*)",
579 +
          "beginCaptures": {
580 +
            "1": {
581 +
              "name": "punctuation.definition.comment.begin.c"
582 +
            }
583 +
          },
584 +
          "end": "\\*/",
585 +
          "endCaptures": {
586 +
            "0": {
587 +
              "name": "punctuation.definition.comment.end.c"
588 +
            }
589 +
          },
590 +
          "name": "comment.block.c"
591 +
        }
592 +
      ]
593 +
    },
594 +
    "block_innards": {
595 +
      "patterns": [
596 +
        {
597 +
          "include": "#preprocessor-rule-enabled-block"
598 +
        },
599 +
        {
600 +
          "include": "#preprocessor-rule-disabled-block"
601 +
        },
602 +
        {
603 +
          "include": "#preprocessor-rule-conditional-block"
604 +
        },
605 +
        {
606 +
          "include": "#method_access"
607 +
        },
608 +
        {
609 +
          "include": "#member_access"
610 +
        },
611 +
        {
612 +
          "include": "#c_function_call"
613 +
        },
614 +
        {
615 +
          "begin": "(?=\\s)(?<!else|new|return)(?<=\\w)\\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
616 +
          "beginCaptures": {
617 +
            "1": {
618 +
              "name": "variable.other.c"
619 +
            },
620 +
            "2": {
621 +
              "name": "punctuation.section.parens.begin.bracket.round.initialization.c"
622 +
            }
623 +
          },
624 +
          "end": "\\)",
625 +
          "endCaptures": {
626 +
            "0": {
627 +
              "name": "punctuation.section.parens.end.bracket.round.initialization.c"
628 +
            }
629 +
          },
630 +
          "name": "meta.initialization.c",
631 +
          "patterns": [
632 +
            {
633 +
              "include": "#function-call-innards"
634 +
            }
635 +
          ]
636 +
        },
637 +
        {
638 +
          "begin": "\\{",
639 +
          "beginCaptures": {
640 +
            "0": {
641 +
              "name": "punctuation.section.block.begin.bracket.curly.c"
642 +
            }
643 +
          },
644 +
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)",
645 +
          "endCaptures": {
646 +
            "0": {
647 +
              "name": "punctuation.section.block.end.bracket.curly.c"
648 +
            }
649 +
          },
650 +
          "patterns": [
651 +
            {
652 +
              "include": "#block_innards"
653 +
            }
654 +
          ]
655 +
        },
656 +
        {
657 +
          "include": "#parens-block"
658 +
        },
659 +
        {
660 +
          "include": "$self"
661 +
        }
662 +
      ]
663 +
    },
664 +
    "c_conditional_context": {
665 +
      "patterns": [
666 +
        {
667 +
          "include": "$self"
668 +
        },
669 +
        {
670 +
          "include": "#block_innards"
671 +
        }
672 +
      ]
673 +
    },
674 +
    "c_function_call": {
675 +
      "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\s*\\(|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[])\\s*\\()",
676 +
      "end": "(?<=\\))(?!\\w)",
677 +
      "name": "meta.function-call.c",
678 +
      "patterns": [
679 +
        {
680 +
          "include": "#function-call-innards"
681 +
        }
682 +
      ]
683 +
    },
684 +
    "case_statement": {
685 +
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)case(?!\\w))",
686 +
      "beginCaptures": {
687 +
        "1": {
688 +
          "patterns": [
689 +
            {
690 +
              "include": "#inline_comment"
691 +
            }
692 +
          ]
693 +
        },
694 +
        "2": {
695 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
696 +
        },
697 +
        "3": {
698 +
          "name": "comment.block.c"
699 +
        },
700 +
        "4": {
701 +
          "patterns": [
702 +
            {
703 +
              "match": "\\*/",
704 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
705 +
            },
706 +
            {
707 +
              "match": "\\*",
708 +
              "name": "comment.block.c"
709 +
            }
710 +
          ]
711 +
        },
712 +
        "5": {
713 +
          "name": "keyword.control.case.c"
714 +
        }
715 +
      },
716 +
      "end": "(:)",
717 +
      "endCaptures": {
718 +
        "1": {
719 +
          "name": "punctuation.separator.colon.case.c"
720 +
        }
721 +
      },
722 +
      "name": "meta.conditional.case.c",
723 +
      "patterns": [
724 +
        {
725 +
          "include": "#evaluation_context"
726 +
        },
727 +
        {
728 +
          "include": "#c_conditional_context"
729 +
        }
730 +
      ]
731 +
    },
732 +
    "comments": {
733 +
      "patterns": [
734 +
        {
735 +
          "patterns": [
736 +
            {
737 +
              "patterns": [
738 +
                {
739 +
                  "begin": "^(?>\\s*)(//[!/]+)",
740 +
                  "beginCaptures": {
741 +
                    "1": {
742 +
                      "name": "punctuation.definition.comment.documentation.c"
743 +
                    }
744 +
                  },
745 +
                  "end": "(?<=\\n)(?<!\\\\\\n)",
746 +
                  "name": "comment.line.double-slash.documentation.c",
747 +
                  "patterns": [
748 +
                    {
749 +
                      "include": "#line_continuation_character"
750 +
                    },
751 +
                    {
752 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
753 +
                      "name": "storage.type.class.doxygen.c"
754 +
                    },
755 +
                    {
756 +
                      "captures": {
757 +
                        "1": {
758 +
                          "name": "storage.type.class.doxygen.c"
759 +
                        },
760 +
                        "2": {
761 +
                          "name": "markup.italic.doxygen.c"
762 +
                        }
763 +
                      },
764 +
                      "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
765 +
                    },
766 +
                    {
767 +
                      "captures": {
768 +
                        "1": {
769 +
                          "name": "storage.type.class.doxygen.c"
770 +
                        },
771 +
                        "2": {
772 +
                          "name": "markup.bold.doxygen.c"
773 +
                        }
774 +
                      },
775 +
                      "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
776 +
                    },
777 +
                    {
778 +
                      "captures": {
779 +
                        "1": {
780 +
                          "name": "storage.type.class.doxygen.c"
781 +
                        },
782 +
                        "2": {
783 +
                          "name": "markup.inline.raw.string.c"
784 +
                        }
785 +
                      },
786 +
                      "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
787 +
                    },
788 +
                    {
789 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
790 +
                      "name": "storage.type.class.doxygen.c"
791 +
                    },
792 +
                    {
793 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
794 +
                      "name": "storage.type.class.doxygen.c"
795 +
                    },
796 +
                    {
797 +
                      "captures": {
798 +
                        "1": {
799 +
                          "name": "storage.type.class.doxygen.c"
800 +
                        },
801 +
                        "2": {
802 +
                          "patterns": [
803 +
                            {
804 +
                              "match": "in|out",
805 +
                              "name": "keyword.other.parameter.direction.$0.c"
806 +
                            }
807 +
                          ]
808 +
                        },
809 +
                        "3": {
810 +
                          "name": "variable.parameter.c"
811 +
                        }
812 +
                      },
813 +
                      "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
814 +
                    },
815 +
                    {
816 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
817 +
                      "name": "storage.type.class.doxygen.c"
818 +
                    },
819 +
                    {
820 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
821 +
                      "name": "storage.type.class.doxygen.c"
822 +
                    },
823 +
                    {
824 +
                      "match": "\\b[A-Z]+:|@[_a-z]+:",
825 +
                      "name": "storage.type.class.gtkdoc"
826 +
                    }
827 +
                  ]
828 +
                },
829 +
                {
830 +
                  "captures": {
831 +
                    "1": {
832 +
                      "name": "punctuation.definition.comment.begin.documentation.c"
833 +
                    },
834 +
                    "2": {
835 +
                      "patterns": [
836 +
                        {
837 +
                          "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
838 +
                          "name": "storage.type.class.doxygen.c"
839 +
                        },
840 +
                        {
841 +
                          "captures": {
842 +
                            "1": {
843 +
                              "name": "storage.type.class.doxygen.c"
844 +
                            },
845 +
                            "2": {
846 +
                              "name": "markup.italic.doxygen.c"
847 +
                            }
848 +
                          },
849 +
                          "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
850 +
                        },
851 +
                        {
852 +
                          "captures": {
853 +
                            "1": {
854 +
                              "name": "storage.type.class.doxygen.c"
855 +
                            },
856 +
                            "2": {
857 +
                              "name": "markup.bold.doxygen.c"
858 +
                            }
859 +
                          },
860 +
                          "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
861 +
                        },
862 +
                        {
863 +
                          "captures": {
864 +
                            "1": {
865 +
                              "name": "storage.type.class.doxygen.c"
866 +
                            },
867 +
                            "2": {
868 +
                              "name": "markup.inline.raw.string.c"
869 +
                            }
870 +
                          },
871 +
                          "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
872 +
                        },
873 +
                        {
874 +
                          "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
875 +
                          "name": "storage.type.class.doxygen.c"
876 +
                        },
877 +
                        {
878 +
                          "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
879 +
                          "name": "storage.type.class.doxygen.c"
880 +
                        },
881 +
                        {
882 +
                          "captures": {
883 +
                            "1": {
884 +
                              "name": "storage.type.class.doxygen.c"
885 +
                            },
886 +
                            "2": {
887 +
                              "patterns": [
888 +
                                {
889 +
                                  "match": "in|out",
890 +
                                  "name": "keyword.other.parameter.direction.$0.c"
891 +
                                }
892 +
                              ]
893 +
                            },
894 +
                            "3": {
895 +
                              "name": "variable.parameter.c"
896 +
                            }
897 +
                          },
898 +
                          "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
899 +
                        },
900 +
                        {
901 +
                          "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
902 +
                          "name": "storage.type.class.doxygen.c"
903 +
                        },
904 +
                        {
905 +
                          "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
906 +
                          "name": "storage.type.class.doxygen.c"
907 +
                        },
908 +
                        {
909 +
                          "match": "\\b[A-Z]+:|@[_a-z]+:",
910 +
                          "name": "storage.type.class.gtkdoc"
911 +
                        }
912 +
                      ]
913 +
                    },
914 +
                    "3": {
915 +
                      "name": "punctuation.definition.comment.end.documentation.c"
916 +
                    }
917 +
                  },
918 +
                  "match": "(/\\*[!*]+(?=\\s))(.+)([!*]*\\*/)",
919 +
                  "name": "comment.block.documentation.c"
920 +
                },
921 +
                {
922 +
                  "begin": "((?>\\s*)/\\*[!*]+(?:(?:\\n|$)|(?=\\s)))",
923 +
                  "beginCaptures": {
924 +
                    "1": {
925 +
                      "name": "punctuation.definition.comment.begin.documentation.c"
926 +
                    }
927 +
                  },
928 +
                  "end": "([!*]*\\*/)",
929 +
                  "endCaptures": {
930 +
                    "1": {
931 +
                      "name": "punctuation.definition.comment.end.documentation.c"
932 +
                    }
933 +
                  },
934 +
                  "name": "comment.block.documentation.c",
935 +
                  "patterns": [
936 +
                    {
937 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
938 +
                      "name": "storage.type.class.doxygen.c"
939 +
                    },
940 +
                    {
941 +
                      "captures": {
942 +
                        "1": {
943 +
                          "name": "storage.type.class.doxygen.c"
944 +
                        },
945 +
                        "2": {
946 +
                          "name": "markup.italic.doxygen.c"
947 +
                        }
948 +
                      },
949 +
                      "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
950 +
                    },
951 +
                    {
952 +
                      "captures": {
953 +
                        "1": {
954 +
                          "name": "storage.type.class.doxygen.c"
955 +
                        },
956 +
                        "2": {
957 +
                          "name": "markup.bold.doxygen.c"
958 +
                        }
959 +
                      },
960 +
                      "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
961 +
                    },
962 +
                    {
963 +
                      "captures": {
964 +
                        "1": {
965 +
                          "name": "storage.type.class.doxygen.c"
966 +
                        },
967 +
                        "2": {
968 +
                          "name": "markup.inline.raw.string.c"
969 +
                        }
970 +
                      },
971 +
                      "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
972 +
                    },
973 +
                    {
974 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
975 +
                      "name": "storage.type.class.doxygen.c"
976 +
                    },
977 +
                    {
978 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
979 +
                      "name": "storage.type.class.doxygen.c"
980 +
                    },
981 +
                    {
982 +
                      "captures": {
983 +
                        "1": {
984 +
                          "name": "storage.type.class.doxygen.c"
985 +
                        },
986 +
                        "2": {
987 +
                          "patterns": [
988 +
                            {
989 +
                              "match": "in|out",
990 +
                              "name": "keyword.other.parameter.direction.$0.c"
991 +
                            }
992 +
                          ]
993 +
                        },
994 +
                        "3": {
995 +
                          "name": "variable.parameter.c"
996 +
                        }
997 +
                      },
998 +
                      "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
999 +
                    },
1000 +
                    {
1001 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
1002 +
                      "name": "storage.type.class.doxygen.c"
1003 +
                    },
1004 +
                    {
1005 +
                      "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
1006 +
                      "name": "storage.type.class.doxygen.c"
1007 +
                    },
1008 +
                    {
1009 +
                      "match": "\\b[A-Z]+:|@[_a-z]+:",
1010 +
                      "name": "storage.type.class.gtkdoc"
1011 +
                    }
1012 +
                  ]
1013 +
                },
1014 +
                {
1015 +
                  "captures": {
1016 +
                    "1": {
1017 +
                      "name": "meta.toc-list.banner.block.c"
1018 +
                    }
1019 +
                  },
1020 +
                  "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
1021 +
                  "name": "comment.block.banner.c"
1022 +
                },
1023 +
                {
1024 +
                  "begin": "(/\\*)",
1025 +
                  "beginCaptures": {
1026 +
                    "1": {
1027 +
                      "name": "punctuation.definition.comment.begin.c"
1028 +
                    }
1029 +
                  },
1030 +
                  "end": "(\\*/)",
1031 +
                  "endCaptures": {
1032 +
                    "1": {
1033 +
                      "name": "punctuation.definition.comment.end.c"
1034 +
                    }
1035 +
                  },
1036 +
                  "name": "comment.block.c"
1037 +
                },
1038 +
                {
1039 +
                  "captures": {
1040 +
                    "1": {
1041 +
                      "name": "meta.toc-list.banner.line.c"
1042 +
                    }
1043 +
                  },
1044 +
                  "match": "^// =(\\s*.*?)\\s*=$\\n?",
1045 +
                  "name": "comment.line.banner.c"
1046 +
                },
1047 +
                {
1048 +
                  "begin": "((?:^[\\t ]+)?)(?=//)",
1049 +
                  "beginCaptures": {
1050 +
                    "1": {
1051 +
                      "name": "punctuation.whitespace.comment.leading.c"
1052 +
                    }
1053 +
                  },
1054 +
                  "end": "(?!\\G)",
1055 +
                  "patterns": [
1056 +
                    {
1057 +
                      "begin": "(//)",
1058 +
                      "beginCaptures": {
1059 +
                        "1": {
1060 +
                          "name": "punctuation.definition.comment.c"
1061 +
                        }
1062 +
                      },
1063 +
                      "end": "(?=\\n)",
1064 +
                      "name": "comment.line.double-slash.c",
1065 +
                      "patterns": [
1066 +
                        {
1067 +
                          "include": "#line_continuation_character"
1068 +
                        }
1069 +
                      ]
1070 +
                    }
1071 +
                  ]
1072 +
                }
1073 +
              ]
1074 +
            },
1075 +
            {
1076 +
              "include": "#block_comment"
1077 +
            },
1078 +
            {
1079 +
              "include": "#line_comment"
1080 +
            }
1081 +
          ]
1082 +
        },
1083 +
        {
1084 +
          "include": "#block_comment"
1085 +
        },
1086 +
        {
1087 +
          "include": "#line_comment"
1088 +
        }
1089 +
      ]
1090 +
    },
1091 +
    "default_statement": {
1092 +
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)default(?!\\w))",
1093 +
      "beginCaptures": {
1094 +
        "1": {
1095 +
          "patterns": [
1096 +
            {
1097 +
              "include": "#inline_comment"
1098 +
            }
1099 +
          ]
1100 +
        },
1101 +
        "2": {
1102 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
1103 +
        },
1104 +
        "3": {
1105 +
          "name": "comment.block.c"
1106 +
        },
1107 +
        "4": {
1108 +
          "patterns": [
1109 +
            {
1110 +
              "match": "\\*/",
1111 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
1112 +
            },
1113 +
            {
1114 +
              "match": "\\*",
1115 +
              "name": "comment.block.c"
1116 +
            }
1117 +
          ]
1118 +
        },
1119 +
        "5": {
1120 +
          "name": "keyword.control.default.c"
1121 +
        }
1122 +
      },
1123 +
      "end": "(:)",
1124 +
      "endCaptures": {
1125 +
        "1": {
1126 +
          "name": "punctuation.separator.colon.case.default.c"
1127 +
        }
1128 +
      },
1129 +
      "name": "meta.conditional.case.c",
1130 +
      "patterns": [
1131 +
        {
1132 +
          "include": "#evaluation_context"
1133 +
        },
1134 +
        {
1135 +
          "include": "#c_conditional_context"
1136 +
        }
1137 +
      ]
1138 +
    },
1139 +
    "disabled": {
1140 +
      "begin": "^\\s*#\\s*if(n?def)?\\b.*$",
1141 +
      "end": "^\\s*#\\s*endif\\b",
1142 +
      "patterns": [
1143 +
        {
1144 +
          "include": "#disabled"
1145 +
        },
1146 +
        {
1147 +
          "include": "#pragma-mark"
1148 +
        }
1149 +
      ]
1150 +
    },
1151 +
    "evaluation_context": {
1152 +
      "patterns": [
1153 +
        {
1154 +
          "include": "#function-call-innards"
1155 +
        },
1156 +
        {
1157 +
          "include": "$self"
1158 +
        }
1159 +
      ]
1160 +
    },
1161 +
    "function-call-innards": {
1162 +
      "patterns": [
1163 +
        {
1164 +
          "include": "#comments"
1165 +
        },
1166 +
        {
1167 +
          "include": "#storage_types"
1168 +
        },
1169 +
        {
1170 +
          "include": "#method_access"
1171 +
        },
1172 +
        {
1173 +
          "include": "#member_access"
1174 +
        },
1175 +
        {
1176 +
          "include": "#operators"
1177 +
        },
1178 +
        {
1179 +
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
1180 +
          "beginCaptures": {
1181 +
            "1": {
1182 +
              "name": "entity.name.function.c"
1183 +
            },
1184 +
            "2": {
1185 +
              "name": "punctuation.section.arguments.begin.bracket.round.c"
1186 +
            }
1187 +
          },
1188 +
          "end": "\\)",
1189 +
          "endCaptures": {
1190 +
            "0": {
1191 +
              "name": "punctuation.section.arguments.end.bracket.round.c"
1192 +
            }
1193 +
          },
1194 +
          "patterns": [
1195 +
            {
1196 +
              "include": "#function-call-innards"
1197 +
            }
1198 +
          ]
1199 +
        },
1200 +
        {
1201 +
          "begin": "\\(",
1202 +
          "beginCaptures": {
1203 +
            "0": {
1204 +
              "name": "punctuation.section.parens.begin.bracket.round.c"
1205 +
            }
1206 +
          },
1207 +
          "end": "\\)",
1208 +
          "endCaptures": {
1209 +
            "0": {
1210 +
              "name": "punctuation.section.parens.end.bracket.round.c"
1211 +
            }
1212 +
          },
1213 +
          "patterns": [
1214 +
            {
1215 +
              "include": "#function-call-innards"
1216 +
            }
1217 +
          ]
1218 +
        },
1219 +
        {
1220 +
          "include": "#block_innards"
1221 +
        }
1222 +
      ]
1223 +
    },
1224 +
    "function-innards": {
1225 +
      "patterns": [
1226 +
        {
1227 +
          "include": "#comments"
1228 +
        },
1229 +
        {
1230 +
          "include": "#storage_types"
1231 +
        },
1232 +
        {
1233 +
          "include": "#operators"
1234 +
        },
1235 +
        {
1236 +
          "include": "#vararg_ellipses"
1237 +
        },
1238 +
        {
1239 +
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
1240 +
          "beginCaptures": {
1241 +
            "1": {
1242 +
              "name": "entity.name.function.c"
1243 +
            },
1244 +
            "2": {
1245 +
              "name": "punctuation.section.parameters.begin.bracket.round.c"
1246 +
            }
1247 +
          },
1248 +
          "end": "\\)",
1249 +
          "endCaptures": {
1250 +
            "0": {
1251 +
              "name": "punctuation.section.parameters.end.bracket.round.c"
1252 +
            }
1253 +
          },
1254 +
          "name": "meta.function.definition.parameters.c",
1255 +
          "patterns": [
1256 +
            {
1257 +
              "include": "#probably_a_parameter"
1258 +
            },
1259 +
            {
1260 +
              "include": "#function-innards"
1261 +
            }
1262 +
          ]
1263 +
        },
1264 +
        {
1265 +
          "begin": "\\(",
1266 +
          "beginCaptures": {
1267 +
            "0": {
1268 +
              "name": "punctuation.section.parens.begin.bracket.round.c"
1269 +
            }
1270 +
          },
1271 +
          "end": "\\)",
1272 +
          "endCaptures": {
1273 +
            "0": {
1274 +
              "name": "punctuation.section.parens.end.bracket.round.c"
1275 +
            }
1276 +
          },
1277 +
          "patterns": [
1278 +
            {
1279 +
              "include": "#function-innards"
1280 +
            }
1281 +
          ]
1282 +
        },
1283 +
        {
1284 +
          "include": "$self"
1285 +
        }
1286 +
      ]
1287 +
    },
1288 +
    "inline_comment": {
1289 +
      "patterns": [
1290 +
        {
1291 +
          "patterns": [
1292 +
            {
1293 +
              "captures": {
1294 +
                "1": {
1295 +
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
1296 +
                },
1297 +
                "2": {
1298 +
                  "name": "comment.block.c"
1299 +
                },
1300 +
                "3": {
1301 +
                  "patterns": [
1302 +
                    {
1303 +
                      "match": "\\*/",
1304 +
                      "name": "comment.block.c punctuation.definition.comment.end.c"
1305 +
                    },
1306 +
                    {
1307 +
                      "match": "\\*",
1308 +
                      "name": "comment.block.c"
1309 +
                    }
1310 +
                  ]
1311 +
                }
1312 +
              },
1313 +
              "match": "(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/))"
1314 +
            },
1315 +
            {
1316 +
              "captures": {
1317 +
                "1": {
1318 +
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
1319 +
                },
1320 +
                "2": {
1321 +
                  "name": "comment.block.c"
1322 +
                },
1323 +
                "3": {
1324 +
                  "patterns": [
1325 +
                    {
1326 +
                      "match": "\\*/",
1327 +
                      "name": "comment.block.c punctuation.definition.comment.end.c"
1328 +
                    },
1329 +
                    {
1330 +
                      "match": "\\*",
1331 +
                      "name": "comment.block.c"
1332 +
                    }
1333 +
                  ]
1334 +
                }
1335 +
              },
1336 +
              "match": "(/\\*)((?:[^*]|\\*++[^/])*+(\\*++/))"
1337 +
            }
1338 +
          ]
1339 +
        },
1340 +
        {
1341 +
          "captures": {
1342 +
            "1": {
1343 +
              "name": "comment.block.c punctuation.definition.comment.begin.c"
1344 +
            },
1345 +
            "2": {
1346 +
              "name": "comment.block.c"
1347 +
            },
1348 +
            "3": {
1349 +
              "patterns": [
1350 +
                {
1351 +
                  "match": "\\*/",
1352 +
                  "name": "comment.block.c punctuation.definition.comment.end.c"
1353 +
                },
1354 +
                {
1355 +
                  "match": "\\*",
1356 +
                  "name": "comment.block.c"
1357 +
                }
1358 +
              ]
1359 +
            }
1360 +
          },
1361 +
          "match": "(/\\*)((?:[^*]|\\*++[^/])*+(\\*++/))"
1362 +
        }
1363 +
      ]
1364 +
    },
1365 +
    "line_comment": {
1366 +
      "patterns": [
1367 +
        {
1368 +
          "begin": "\\s*+(//)",
1369 +
          "beginCaptures": {
1370 +
            "1": {
1371 +
              "name": "punctuation.definition.comment.c"
1372 +
            }
1373 +
          },
1374 +
          "end": "(?<=\\n)(?<!\\\\\\n)",
1375 +
          "endCaptures": {
1376 +
          },
1377 +
          "name": "comment.line.double-slash.c",
1378 +
          "patterns": [
1379 +
            {
1380 +
              "include": "#line_continuation_character"
1381 +
            }
1382 +
          ]
1383 +
        },
1384 +
        {
1385 +
          "begin": "\\s*+(//)",
1386 +
          "beginCaptures": {
1387 +
            "1": {
1388 +
              "name": "punctuation.definition.comment.c"
1389 +
            }
1390 +
          },
1391 +
          "end": "(?<=\\n)(?<!\\\\\\n)",
1392 +
          "endCaptures": {
1393 +
          },
1394 +
          "name": "comment.line.double-slash.c",
1395 +
          "patterns": [
1396 +
            {
1397 +
              "include": "#line_continuation_character"
1398 +
            }
1399 +
          ]
1400 +
        }
1401 +
      ]
1402 +
    },
1403 +
    "line_continuation_character": {
1404 +
      "patterns": [
1405 +
        {
1406 +
          "captures": {
1407 +
            "1": {
1408 +
              "name": "constant.character.escape.line-continuation.c"
1409 +
            }
1410 +
          },
1411 +
          "match": "(\\\\)\\n"
1412 +
        }
1413 +
      ]
1414 +
    },
1415 +
    "member_access": {
1416 +
      "captures": {
1417 +
        "1": {
1418 +
          "name": "variable.other.object.access.c"
1419 +
        },
1420 +
        "2": {
1421 +
          "name": "punctuation.separator.dot-access.c"
1422 +
        },
1423 +
        "3": {
1424 +
          "name": "punctuation.separator.pointer-access.c"
1425 +
        },
1426 +
        "4": {
1427 +
          "patterns": [
1428 +
            {
1429 +
              "include": "#member_access"
1430 +
            },
1431 +
            {
1432 +
              "include": "#method_access"
1433 +
            },
1434 +
            {
1435 +
              "captures": {
1436 +
                "1": {
1437 +
                  "name": "variable.other.object.access.c"
1438 +
                },
1439 +
                "2": {
1440 +
                  "name": "punctuation.separator.dot-access.c"
1441 +
                },
1442 +
                "3": {
1443 +
                  "name": "punctuation.separator.pointer-access.c"
1444 +
                }
1445 +
              },
1446 +
              "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))"
1447 +
            }
1448 +
          ]
1449 +
        },
1450 +
        "5": {
1451 +
          "name": "variable.other.member.c"
1452 +
        }
1453 +
      },
1454 +
      "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))((?:[A-Z_a-z]\\w*\\s*(?:\\.\\*?|->\\*?)\\s*)*)\\s*\\b((?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[A-Z_a-z]\\w*\\b(?!\\())"
1455 +
    },
1456 +
    "method_access": {
1457 +
      "begin": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))((?:[A-Z_a-z]\\w*\\s*(?:\\.\\*?|->\\*?)\\s*)*)\\s*([A-Z_a-z]\\w*)(\\()",
1458 +
      "beginCaptures": {
1459 +
        "1": {
1460 +
          "name": "variable.other.object.access.c"
1461 +
        },
1462 +
        "2": {
1463 +
          "name": "punctuation.separator.dot-access.c"
1464 +
        },
1465 +
        "3": {
1466 +
          "name": "punctuation.separator.pointer-access.c"
1467 +
        },
1468 +
        "4": {
1469 +
          "patterns": [
1470 +
            {
1471 +
              "include": "#member_access"
1472 +
            },
1473 +
            {
1474 +
              "include": "#method_access"
1475 +
            },
1476 +
            {
1477 +
              "captures": {
1478 +
                "1": {
1479 +
                  "name": "variable.other.object.access.c"
1480 +
                },
1481 +
                "2": {
1482 +
                  "name": "punctuation.separator.dot-access.c"
1483 +
                },
1484 +
                "3": {
1485 +
                  "name": "punctuation.separator.pointer-access.c"
1486 +
                }
1487 +
              },
1488 +
              "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))"
1489 +
            }
1490 +
          ]
1491 +
        },
1492 +
        "5": {
1493 +
          "name": "entity.name.function.member.c"
1494 +
        },
1495 +
        "6": {
1496 +
          "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
1497 +
        }
1498 +
      },
1499 +
      "contentName": "meta.function-call.member.c",
1500 +
      "end": "(\\))",
1501 +
      "endCaptures": {
1502 +
        "1": {
1503 +
          "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
1504 +
        }
1505 +
      },
1506 +
      "patterns": [
1507 +
        {
1508 +
          "include": "#function-call-innards"
1509 +
        }
1510 +
      ]
1511 +
    },
1512 +
    "numbers": {
1513 +
      "captures": {
1514 +
        "0": {
1515 +
          "patterns": [
1516 +
            {
1517 +
              "begin": "(?=.)",
1518 +
              "end": "$",
1519 +
              "patterns": [
1520 +
                {
1521 +
                  "captures": {
1522 +
                    "1": {
1523 +
                      "name": "keyword.other.unit.hexadecimal.c"
1524 +
                    },
1525 +
                    "10": {
1526 +
                      "name": "keyword.operator.minus.exponent.hexadecimal.c"
1527 +
                    },
1528 +
                    "11": {
1529 +
                      "name": "constant.numeric.exponent.hexadecimal.c",
1530 +
                      "patterns": [
1531 +
                        {
1532 +
                          "match": "(?<=\\h)'(?=\\h)",
1533 +
                          "name": "punctuation.separator.constant.numeric"
1534 +
                        }
1535 +
                      ]
1536 +
                    },
1537 +
                    "12": {
1538 +
                      "name": "keyword.other.unit.suffix.floating-point.c"
1539 +
                    },
1540 +
                    "2": {
1541 +
                      "name": "constant.numeric.hexadecimal.c",
1542 +
                      "patterns": [
1543 +
                        {
1544 +
                          "match": "(?<=\\h)'(?=\\h)",
1545 +
                          "name": "punctuation.separator.constant.numeric"
1546 +
                        }
1547 +
                      ]
1548 +
                    },
1549 +
                    "3": {
1550 +
                      "name": "punctuation.separator.constant.numeric"
1551 +
                    },
1552 +
                    "4": {
1553 +
                      "name": "constant.numeric.hexadecimal.c"
1554 +
                    },
1555 +
                    "5": {
1556 +
                      "name": "constant.numeric.hexadecimal.c",
1557 +
                      "patterns": [
1558 +
                        {
1559 +
                          "match": "(?<=\\h)'(?=\\h)",
1560 +
                          "name": "punctuation.separator.constant.numeric"
1561 +
                        }
1562 +
                      ]
1563 +
                    },
1564 +
                    "6": {
1565 +
                      "name": "punctuation.separator.constant.numeric"
1566 +
                    },
1567 +
                    "8": {
1568 +
                      "name": "keyword.other.unit.exponent.hexadecimal.c"
1569 +
                    },
1570 +
                    "9": {
1571 +
                      "name": "keyword.operator.plus.exponent.hexadecimal.c"
1572 +
                    }
1573 +
                  },
1574 +
                  "match": "\\G(0[Xx])(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)?((?<=\\h)\\.|\\.(?=\\h))(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)?((?<!')([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?([FLfl](?!\\w))?$"
1575 +
                },
1576 +
                {
1577 +
                  "captures": {
1578 +
                    "10": {
1579 +
                      "name": "keyword.operator.minus.exponent.decimal.c"
1580 +
                    },
1581 +
                    "11": {
1582 +
                      "name": "constant.numeric.exponent.decimal.c",
1583 +
                      "patterns": [
1584 +
                        {
1585 +
                          "match": "(?<=\\h)'(?=\\h)",
1586 +
                          "name": "punctuation.separator.constant.numeric"
1587 +
                        }
1588 +
                      ]
1589 +
                    },
1590 +
                    "12": {
1591 +
                      "name": "keyword.other.unit.suffix.floating-point.c"
1592 +
                    },
1593 +
                    "2": {
1594 +
                      "name": "constant.numeric.decimal.c",
1595 +
                      "patterns": [
1596 +
                        {
1597 +
                          "match": "(?<=\\h)'(?=\\h)",
1598 +
                          "name": "punctuation.separator.constant.numeric"
1599 +
                        }
1600 +
                      ]
1601 +
                    },
1602 +
                    "3": {
1603 +
                      "name": "punctuation.separator.constant.numeric"
1604 +
                    },
1605 +
                    "4": {
1606 +
                      "name": "constant.numeric.decimal.point.c"
1607 +
                    },
1608 +
                    "5": {
1609 +
                      "name": "constant.numeric.decimal.c",
1610 +
                      "patterns": [
1611 +
                        {
1612 +
                          "match": "(?<=\\h)'(?=\\h)",
1613 +
                          "name": "punctuation.separator.constant.numeric"
1614 +
                        }
1615 +
                      ]
1616 +
                    },
1617 +
                    "6": {
1618 +
                      "name": "punctuation.separator.constant.numeric"
1619 +
                    },
1620 +
                    "8": {
1621 +
                      "name": "keyword.other.unit.exponent.decimal.c"
1622 +
                    },
1623 +
                    "9": {
1624 +
                      "name": "keyword.operator.plus.exponent.decimal.c"
1625 +
                    }
1626 +
                  },
1627 +
                  "match": "\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)?((?<=[0-9])\\.|\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)?((?<!')([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?([FLfl](?!\\w))?$"
1628 +
                },
1629 +
                {
1630 +
                  "captures": {
1631 +
                    "1": {
1632 +
                      "name": "keyword.other.unit.binary.c"
1633 +
                    },
1634 +
                    "2": {
1635 +
                      "name": "constant.numeric.binary.c",
1636 +
                      "patterns": [
1637 +
                        {
1638 +
                          "match": "(?<=\\h)'(?=\\h)",
1639 +
                          "name": "punctuation.separator.constant.numeric"
1640 +
                        }
1641 +
                      ]
1642 +
                    },
1643 +
                    "3": {
1644 +
                      "name": "punctuation.separator.constant.numeric"
1645 +
                    },
1646 +
                    "4": {
1647 +
                      "name": "keyword.other.unit.suffix.integer.c"
1648 +
                    }
1649 +
                  },
1650 +
                  "match": "\\G(0[Bb])([01](?:[01]|((?<=\\h)'(?=\\h)))*)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1651 +
                },
1652 +
                {
1653 +
                  "captures": {
1654 +
                    "1": {
1655 +
                      "name": "keyword.other.unit.octal.c"
1656 +
                    },
1657 +
                    "2": {
1658 +
                      "name": "constant.numeric.octal.c",
1659 +
                      "patterns": [
1660 +
                        {
1661 +
                          "match": "(?<=\\h)'(?=\\h)",
1662 +
                          "name": "punctuation.separator.constant.numeric"
1663 +
                        }
1664 +
                      ]
1665 +
                    },
1666 +
                    "3": {
1667 +
                      "name": "punctuation.separator.constant.numeric"
1668 +
                    },
1669 +
                    "4": {
1670 +
                      "name": "keyword.other.unit.suffix.integer.c"
1671 +
                    }
1672 +
                  },
1673 +
                  "match": "\\G(0)((?:[0-7]|((?<=\\h)'(?=\\h)))+)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1674 +
                },
1675 +
                {
1676 +
                  "captures": {
1677 +
                    "1": {
1678 +
                      "name": "keyword.other.unit.hexadecimal.c"
1679 +
                    },
1680 +
                    "2": {
1681 +
                      "name": "constant.numeric.hexadecimal.c",
1682 +
                      "patterns": [
1683 +
                        {
1684 +
                          "match": "(?<=\\h)'(?=\\h)",
1685 +
                          "name": "punctuation.separator.constant.numeric"
1686 +
                        }
1687 +
                      ]
1688 +
                    },
1689 +
                    "3": {
1690 +
                      "name": "punctuation.separator.constant.numeric"
1691 +
                    },
1692 +
                    "5": {
1693 +
                      "name": "keyword.other.unit.exponent.hexadecimal.c"
1694 +
                    },
1695 +
                    "6": {
1696 +
                      "name": "keyword.operator.plus.exponent.hexadecimal.c"
1697 +
                    },
1698 +
                    "7": {
1699 +
                      "name": "keyword.operator.minus.exponent.hexadecimal.c"
1700 +
                    },
1701 +
                    "8": {
1702 +
                      "name": "constant.numeric.exponent.hexadecimal.c",
1703 +
                      "patterns": [
1704 +
                        {
1705 +
                          "match": "(?<=\\h)'(?=\\h)",
1706 +
                          "name": "punctuation.separator.constant.numeric"
1707 +
                        }
1708 +
                      ]
1709 +
                    },
1710 +
                    "9": {
1711 +
                      "name": "keyword.other.unit.suffix.integer.c"
1712 +
                    }
1713 +
                  },
1714 +
                  "match": "\\G(0[Xx])(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)((?<!')([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1715 +
                },
1716 +
                {
1717 +
                  "captures": {
1718 +
                    "2": {
1719 +
                      "name": "constant.numeric.decimal.c",
1720 +
                      "patterns": [
1721 +
                        {
1722 +
                          "match": "(?<=\\h)'(?=\\h)",
1723 +
                          "name": "punctuation.separator.constant.numeric"
1724 +
                        }
1725 +
                      ]
1726 +
                    },
1727 +
                    "3": {
1728 +
                      "name": "punctuation.separator.constant.numeric"
1729 +
                    },
1730 +
                    "5": {
1731 +
                      "name": "keyword.other.unit.exponent.decimal.c"
1732 +
                    },
1733 +
                    "6": {
1734 +
                      "name": "keyword.operator.plus.exponent.decimal.c"
1735 +
                    },
1736 +
                    "7": {
1737 +
                      "name": "keyword.operator.minus.exponent.decimal.c"
1738 +
                    },
1739 +
                    "8": {
1740 +
                      "name": "constant.numeric.exponent.decimal.c",
1741 +
                      "patterns": [
1742 +
                        {
1743 +
                          "match": "(?<=\\h)'(?=\\h)",
1744 +
                          "name": "punctuation.separator.constant.numeric"
1745 +
                        }
1746 +
                      ]
1747 +
                    },
1748 +
                    "9": {
1749 +
                      "name": "keyword.other.unit.suffix.integer.c"
1750 +
                    }
1751 +
                  },
1752 +
                  "match": "\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)((?<!')([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1753 +
                },
1754 +
                {
1755 +
                  "match": "(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])+",
1756 +
                  "name": "invalid.illegal.constant.numeric"
1757 +
                }
1758 +
              ]
1759 +
            }
1760 +
          ]
1761 +
        }
1762 +
      },
1763 +
      "match": "(?<!\\w)\\.?\\d(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])*"
1764 +
    },
1765 +
    "operators": {
1766 +
      "patterns": [
1767 +
        {
1768 +
          "match": "(?<![$\\w])(sizeof)(?![$\\w])",
1769 +
          "name": "keyword.operator.sizeof.c"
1770 +
        },
1771 +
        {
1772 +
          "match": "--",
1773 +
          "name": "keyword.operator.decrement.c"
1774 +
        },
1775 +
        {
1776 +
          "match": "\\+\\+",
1777 +
          "name": "keyword.operator.increment.c"
1778 +
        },
1779 +
        {
1780 +
          "match": "(?:[-%*+]|(?<!\\()/)=",
1781 +
          "name": "keyword.operator.assignment.compound.c"
1782 +
        },
1783 +
        {
1784 +
          "match": "(?:[\\&^]|<<|>>|\\|)=",
1785 +
          "name": "keyword.operator.assignment.compound.bitwise.c"
1786 +
        },
1787 +
        {
1788 +
          "match": "<<|>>",
1789 +
          "name": "keyword.operator.bitwise.shift.c"
1790 +
        },
1791 +
        {
1792 +
          "match": "!=|<=|>=|==|[<>]",
1793 +
          "name": "keyword.operator.comparison.c"
1794 +
        },
1795 +
        {
1796 +
          "match": "&&|!|\\|\\|",
1797 +
          "name": "keyword.operator.logical.c"
1798 +
        },
1799 +
        {
1800 +
          "match": "[\\&^|~]",
1801 +
          "name": "keyword.operator.c"
1802 +
        },
1803 +
        {
1804 +
          "match": "=",
1805 +
          "name": "keyword.operator.assignment.c"
1806 +
        },
1807 +
        {
1808 +
          "match": "[-%*+/]",
1809 +
          "name": "keyword.operator.c"
1810 +
        },
1811 +
        {
1812 +
          "begin": "(\\?)",
1813 +
          "beginCaptures": {
1814 +
            "1": {
1815 +
              "name": "keyword.operator.ternary.c"
1816 +
            }
1817 +
          },
1818 +
          "end": "(:)",
1819 +
          "endCaptures": {
1820 +
            "1": {
1821 +
              "name": "keyword.operator.ternary.c"
1822 +
            }
1823 +
          },
1824 +
          "patterns": [
1825 +
            {
1826 +
              "include": "#function-call-innards"
1827 +
            },
1828 +
            {
1829 +
              "include": "$self"
1830 +
            }
1831 +
          ]
1832 +
        }
1833 +
      ]
1834 +
    },
1835 +
    "parens": {
1836 +
      "begin": "\\(",
1837 +
      "beginCaptures": {
1838 +
        "0": {
1839 +
          "name": "punctuation.section.parens.begin.bracket.round.c"
1840 +
        }
1841 +
      },
1842 +
      "end": "\\)",
1843 +
      "endCaptures": {
1844 +
        "0": {
1845 +
          "name": "punctuation.section.parens.end.bracket.round.c"
1846 +
        }
1847 +
      },
1848 +
      "name": "meta.parens.c",
1849 +
      "patterns": [
1850 +
        {
1851 +
          "include": "$self"
1852 +
        }
1853 +
      ]
1854 +
    },
1855 +
    "parens-block": {
1856 +
      "begin": "\\(",
1857 +
      "beginCaptures": {
1858 +
        "0": {
1859 +
          "name": "punctuation.section.parens.begin.bracket.round.c"
1860 +
        }
1861 +
      },
1862 +
      "end": "\\)",
1863 +
      "endCaptures": {
1864 +
        "0": {
1865 +
          "name": "punctuation.section.parens.end.bracket.round.c"
1866 +
        }
1867 +
      },
1868 +
      "name": "meta.parens.block.c",
1869 +
      "patterns": [
1870 +
        {
1871 +
          "include": "#block_innards"
1872 +
        },
1873 +
        {
1874 +
          "match": "(?-im:(?<!:):(?!:))",
1875 +
          "name": "punctuation.range-based.c"
1876 +
        }
1877 +
      ]
1878 +
    },
1879 +
    "pragma-mark": {
1880 +
      "captures": {
1881 +
        "1": {
1882 +
          "name": "meta.preprocessor.pragma.c"
1883 +
        },
1884 +
        "2": {
1885 +
          "name": "keyword.control.directive.pragma.pragma-mark.c"
1886 +
        },
1887 +
        "3": {
1888 +
          "name": "punctuation.definition.directive.c"
1889 +
        },
1890 +
        "4": {
1891 +
          "name": "entity.name.tag.pragma-mark.c"
1892 +
        }
1893 +
      },
1894 +
      "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))",
1895 +
      "name": "meta.section.c"
1896 +
    },
1897 +
    "predefined_macros": {
1898 +
      "patterns": [
1899 +
        {
1900 +
          "captures": {
1901 +
            "1": {
1902 +
              "name": "entity.name.other.preprocessor.macro.predefined.$1.c"
1903 +
            }
1904 +
          },
1905 +
          "match": "\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMAF??|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\b"
1906 +
        },
1907 +
        {
1908 +
          "match": "\\b__([A-Z_]+)__\\b",
1909 +
          "name": "entity.name.other.preprocessor.macro.predefined.probably.$1.c"
1910 +
        }
1911 +
      ]
1912 +
    },
1913 +
    "preprocessor-rule-conditional": {
1914 +
      "patterns": [
1915 +
        {
1916 +
          "begin": "^\\s*((#)\\s*if(?:n?def)?)\\b",
1917 +
          "beginCaptures": {
1918 +
            "0": {
1919 +
              "name": "meta.preprocessor.c"
1920 +
            },
1921 +
            "1": {
1922 +
              "name": "keyword.control.directive.conditional.c"
1923 +
            },
1924 +
            "2": {
1925 +
              "name": "punctuation.definition.directive.c"
1926 +
            }
1927 +
          },
1928 +
          "end": "^\\s*((#)\\s*endif)\\b",
1929 +
          "endCaptures": {
1930 +
            "0": {
1931 +
              "name": "meta.preprocessor.c"
1932 +
            },
1933 +
            "1": {
1934 +
              "name": "keyword.control.directive.conditional.c"
1935 +
            },
1936 +
            "2": {
1937 +
              "name": "punctuation.definition.directive.c"
1938 +
            }
1939 +
          },
1940 +
          "patterns": [
1941 +
            {
1942 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
1943 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
1944 +
              "name": "meta.preprocessor.c",
1945 +
              "patterns": [
1946 +
                {
1947 +
                  "include": "#preprocessor-rule-conditional-line"
1948 +
                }
1949 +
              ]
1950 +
            },
1951 +
            {
1952 +
              "include": "#preprocessor-rule-enabled-elif"
1953 +
            },
1954 +
            {
1955 +
              "include": "#preprocessor-rule-enabled-else"
1956 +
            },
1957 +
            {
1958 +
              "include": "#preprocessor-rule-disabled-elif"
1959 +
            },
1960 +
            {
1961 +
              "begin": "^\\s*((#)\\s*elif)\\b",
1962 +
              "beginCaptures": {
1963 +
                "1": {
1964 +
                  "name": "keyword.control.directive.conditional.c"
1965 +
                },
1966 +
                "2": {
1967 +
                  "name": "punctuation.definition.directive.c"
1968 +
                }
1969 +
              },
1970 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
1971 +
              "name": "meta.preprocessor.c",
1972 +
              "patterns": [
1973 +
                {
1974 +
                  "include": "#preprocessor-rule-conditional-line"
1975 +
                }
1976 +
              ]
1977 +
            },
1978 +
            {
1979 +
              "include": "$self"
1980 +
            }
1981 +
          ]
1982 +
        },
1983 +
        {
1984 +
          "captures": {
1985 +
            "0": {
1986 +
              "name": "invalid.illegal.stray-$1.c"
1987 +
            }
1988 +
          },
1989 +
          "match": "^\\s*#\\s*(e(?:lse|lif|ndif))\\b"
1990 +
        }
1991 +
      ]
1992 +
    },
1993 +
    "preprocessor-rule-conditional-block": {
1994 +
      "patterns": [
1995 +
        {
1996 +
          "begin": "^\\s*((#)\\s*if(?:n?def)?)\\b",
1997 +
          "beginCaptures": {
1998 +
            "0": {
1999 +
              "name": "meta.preprocessor.c"
2000 +
            },
2001 +
            "1": {
2002 +
              "name": "keyword.control.directive.conditional.c"
2003 +
            },
2004 +
            "2": {
2005 +
              "name": "punctuation.definition.directive.c"
2006 +
            }
2007 +
          },
2008 +
          "end": "^\\s*((#)\\s*endif)\\b",
2009 +
          "endCaptures": {
2010 +
            "0": {
2011 +
              "name": "meta.preprocessor.c"
2012 +
            },
2013 +
            "1": {
2014 +
              "name": "keyword.control.directive.conditional.c"
2015 +
            },
2016 +
            "2": {
2017 +
              "name": "punctuation.definition.directive.c"
2018 +
            }
2019 +
          },
2020 +
          "patterns": [
2021 +
            {
2022 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2023 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2024 +
              "name": "meta.preprocessor.c",
2025 +
              "patterns": [
2026 +
                {
2027 +
                  "include": "#preprocessor-rule-conditional-line"
2028 +
                }
2029 +
              ]
2030 +
            },
2031 +
            {
2032 +
              "include": "#preprocessor-rule-enabled-elif-block"
2033 +
            },
2034 +
            {
2035 +
              "include": "#preprocessor-rule-enabled-else-block"
2036 +
            },
2037 +
            {
2038 +
              "include": "#preprocessor-rule-disabled-elif"
2039 +
            },
2040 +
            {
2041 +
              "begin": "^\\s*((#)\\s*elif)\\b",
2042 +
              "beginCaptures": {
2043 +
                "1": {
2044 +
                  "name": "keyword.control.directive.conditional.c"
2045 +
                },
2046 +
                "2": {
2047 +
                  "name": "punctuation.definition.directive.c"
2048 +
                }
2049 +
              },
2050 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2051 +
              "name": "meta.preprocessor.c",
2052 +
              "patterns": [
2053 +
                {
2054 +
                  "include": "#preprocessor-rule-conditional-line"
2055 +
                }
2056 +
              ]
2057 +
            },
2058 +
            {
2059 +
              "include": "#block_innards"
2060 +
            }
2061 +
          ]
2062 +
        },
2063 +
        {
2064 +
          "captures": {
2065 +
            "0": {
2066 +
              "name": "invalid.illegal.stray-$1.c"
2067 +
            }
2068 +
          },
2069 +
          "match": "^\\s*#\\s*(e(?:lse|lif|ndif))\\b"
2070 +
        }
2071 +
      ]
2072 +
    },
2073 +
    "preprocessor-rule-conditional-line": {
2074 +
      "patterns": [
2075 +
        {
2076 +
          "match": "\\bdefined\\b(?:\\s*$|(?=\\s*\\(*\\s*(?!defined\\b)[$A-Z_a-z][$\\w]*\\b\\s*\\)*\\s*(?:\\n|//|/\\*|[:?]|&&|\\|\\||\\\\\\s*\\n)))",
2077 +
          "name": "keyword.control.directive.conditional.c"
2078 +
        },
2079 +
        {
2080 +
          "match": "\\bdefined\\b",
2081 +
          "name": "invalid.illegal.macro-name.c"
2082 +
        },
2083 +
        {
2084 +
          "include": "#comments"
2085 +
        },
2086 +
        {
2087 +
          "include": "#strings"
2088 +
        },
2089 +
        {
2090 +
          "include": "#numbers"
2091 +
        },
2092 +
        {
2093 +
          "begin": "\\?",
2094 +
          "beginCaptures": {
2095 +
            "0": {
2096 +
              "name": "keyword.operator.ternary.c"
2097 +
            }
2098 +
          },
2099 +
          "end": ":",
2100 +
          "endCaptures": {
2101 +
            "0": {
2102 +
              "name": "keyword.operator.ternary.c"
2103 +
            }
2104 +
          },
2105 +
          "patterns": [
2106 +
            {
2107 +
              "include": "#preprocessor-rule-conditional-line"
2108 +
            }
2109 +
          ]
2110 +
        },
2111 +
        {
2112 +
          "include": "#operators"
2113 +
        },
2114 +
        {
2115 +
          "match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
2116 +
          "name": "constant.language.c"
2117 +
        },
2118 +
        {
2119 +
          "match": "[$A-Z_a-z][$\\w]*",
2120 +
          "name": "entity.name.function.preprocessor.c"
2121 +
        },
2122 +
        {
2123 +
          "include": "#line_continuation_character"
2124 +
        },
2125 +
        {
2126 +
          "begin": "\\(",
2127 +
          "beginCaptures": {
2128 +
            "0": {
2129 +
              "name": "punctuation.section.parens.begin.bracket.round.c"
2130 +
            }
2131 +
          },
2132 +
          "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2133 +
          "endCaptures": {
2134 +
            "0": {
2135 +
              "name": "punctuation.section.parens.end.bracket.round.c"
2136 +
            }
2137 +
          },
2138 +
          "patterns": [
2139 +
            {
2140 +
              "include": "#preprocessor-rule-conditional-line"
2141 +
            }
2142 +
          ]
2143 +
        }
2144 +
      ]
2145 +
    },
2146 +
    "preprocessor-rule-define-line-blocks": {
2147 +
      "patterns": [
2148 +
        {
2149 +
          "begin": "\\{",
2150 +
          "beginCaptures": {
2151 +
            "0": {
2152 +
              "name": "punctuation.section.block.begin.bracket.curly.c"
2153 +
            }
2154 +
          },
2155 +
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)|(?<!\\\\)(?=\\s*\\n)",
2156 +
          "endCaptures": {
2157 +
            "0": {
2158 +
              "name": "punctuation.section.block.end.bracket.curly.c"
2159 +
            }
2160 +
          },
2161 +
          "patterns": [
2162 +
            {
2163 +
              "include": "#preprocessor-rule-define-line-blocks"
2164 +
            },
2165 +
            {
2166 +
              "include": "#preprocessor-rule-define-line-contents"
2167 +
            }
2168 +
          ]
2169 +
        },
2170 +
        {
2171 +
          "include": "#preprocessor-rule-define-line-contents"
2172 +
        }
2173 +
      ]
2174 +
    },
2175 +
    "preprocessor-rule-define-line-contents": {
2176 +
      "patterns": [
2177 +
        {
2178 +
          "include": "#vararg_ellipses"
2179 +
        },
2180 +
        {
2181 +
          "begin": "\\{",
2182 +
          "beginCaptures": {
2183 +
            "0": {
2184 +
              "name": "punctuation.section.block.begin.bracket.curly.c"
2185 +
            }
2186 +
          },
2187 +
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)|(?<!\\\\)(?=\\s*\\n)",
2188 +
          "endCaptures": {
2189 +
            "0": {
2190 +
              "name": "punctuation.section.block.end.bracket.curly.c"
2191 +
            }
2192 +
          },
2193 +
          "name": "meta.block.c",
2194 +
          "patterns": [
2195 +
            {
2196 +
              "include": "#preprocessor-rule-define-line-blocks"
2197 +
            }
2198 +
          ]
2199 +
        },
2200 +
        {
2201 +
          "match": "\\(",
2202 +
          "name": "punctuation.section.parens.begin.bracket.round.c"
2203 +
        },
2204 +
        {
2205 +
          "match": "\\)",
2206 +
          "name": "punctuation.section.parens.end.bracket.round.c"
2207 +
        },
2208 +
        {
2209 +
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\s*\\(|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[])\\s*\\()",
2210 +
          "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)",
2211 +
          "name": "meta.function.c",
2212 +
          "patterns": [
2213 +
            {
2214 +
              "include": "#preprocessor-rule-define-line-functions"
2215 +
            }
2216 +
          ]
2217 +
        },
2218 +
        {
2219 +
          "begin": "\"",
2220 +
          "beginCaptures": {
2221 +
            "0": {
2222 +
              "name": "punctuation.definition.string.begin.c"
2223 +
            }
2224 +
          },
2225 +
          "end": "\"|(?<!\\\\)(?=\\s*\\n)",
2226 +
          "endCaptures": {
2227 +
            "0": {
2228 +
              "name": "punctuation.definition.string.end.c"
2229 +
            }
2230 +
          },
2231 +
          "name": "string.quoted.double.c",
2232 +
          "patterns": [
2233 +
            {
2234 +
              "include": "#string_escaped_char"
2235 +
            },
2236 +
            {
2237 +
              "include": "#string_placeholder"
2238 +
            },
2239 +
            {
2240 +
              "include": "#line_continuation_character"
2241 +
            }
2242 +
          ]
2243 +
        },
2244 +
        {
2245 +
          "begin": "'",
2246 +
          "beginCaptures": {
2247 +
            "0": {
2248 +
              "name": "punctuation.definition.string.begin.c"
2249 +
            }
2250 +
          },
2251 +
          "end": "'|(?<!\\\\)(?=\\s*\\n)",
2252 +
          "endCaptures": {
2253 +
            "0": {
2254 +
              "name": "punctuation.definition.string.end.c"
2255 +
            }
2256 +
          },
2257 +
          "name": "string.quoted.single.c",
2258 +
          "patterns": [
2259 +
            {
2260 +
              "include": "#string_escaped_char"
2261 +
            },
2262 +
            {
2263 +
              "include": "#line_continuation_character"
2264 +
            }
2265 +
          ]
2266 +
        },
2267 +
        {
2268 +
          "include": "#method_access"
2269 +
        },
2270 +
        {
2271 +
          "include": "#member_access"
2272 +
        },
2273 +
        {
2274 +
          "include": "$self"
2275 +
        }
2276 +
      ]
2277 +
    },
2278 +
    "preprocessor-rule-define-line-functions": {
2279 +
      "patterns": [
2280 +
        {
2281 +
          "include": "#comments"
2282 +
        },
2283 +
        {
2284 +
          "include": "#storage_types"
2285 +
        },
2286 +
        {
2287 +
          "include": "#vararg_ellipses"
2288 +
        },
2289 +
        {
2290 +
          "include": "#method_access"
2291 +
        },
2292 +
        {
2293 +
          "include": "#member_access"
2294 +
        },
2295 +
        {
2296 +
          "include": "#operators"
2297 +
        },
2298 +
        {
2299 +
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
2300 +
          "beginCaptures": {
2301 +
            "1": {
2302 +
              "name": "entity.name.function.c"
2303 +
            },
2304 +
            "2": {
2305 +
              "name": "punctuation.section.arguments.begin.bracket.round.c"
2306 +
            }
2307 +
          },
2308 +
          "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
2309 +
          "endCaptures": {
2310 +
            "1": {
2311 +
              "name": "punctuation.section.arguments.end.bracket.round.c"
2312 +
            }
2313 +
          },
2314 +
          "patterns": [
2315 +
            {
2316 +
              "include": "#preprocessor-rule-define-line-functions"
2317 +
            }
2318 +
          ]
2319 +
        },
2320 +
        {
2321 +
          "begin": "\\(",
2322 +
          "beginCaptures": {
2323 +
            "0": {
2324 +
              "name": "punctuation.section.parens.begin.bracket.round.c"
2325 +
            }
2326 +
          },
2327 +
          "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
2328 +
          "endCaptures": {
2329 +
            "1": {
2330 +
              "name": "punctuation.section.parens.end.bracket.round.c"
2331 +
            }
2332 +
          },
2333 +
          "patterns": [
2334 +
            {
2335 +
              "include": "#preprocessor-rule-define-line-functions"
2336 +
            }
2337 +
          ]
2338 +
        },
2339 +
        {
2340 +
          "include": "#preprocessor-rule-define-line-contents"
2341 +
        }
2342 +
      ]
2343 +
    },
2344 +
    "preprocessor-rule-disabled": {
2345 +
      "patterns": [
2346 +
        {
2347 +
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2348 +
          "beginCaptures": {
2349 +
            "0": {
2350 +
              "name": "meta.preprocessor.c"
2351 +
            },
2352 +
            "1": {
2353 +
              "name": "keyword.control.directive.conditional.c"
2354 +
            },
2355 +
            "2": {
2356 +
              "name": "punctuation.definition.directive.c"
2357 +
            }
2358 +
          },
2359 +
          "end": "^\\s*((#)\\s*endif)\\b",
2360 +
          "endCaptures": {
2361 +
            "0": {
2362 +
              "name": "meta.preprocessor.c"
2363 +
            },
2364 +
            "1": {
2365 +
              "name": "keyword.control.directive.conditional.c"
2366 +
            },
2367 +
            "2": {
2368 +
              "name": "punctuation.definition.directive.c"
2369 +
            }
2370 +
          },
2371 +
          "patterns": [
2372 +
            {
2373 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2374 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2375 +
              "name": "meta.preprocessor.c",
2376 +
              "patterns": [
2377 +
                {
2378 +
                  "include": "#preprocessor-rule-conditional-line"
2379 +
                }
2380 +
              ]
2381 +
            },
2382 +
            {
2383 +
              "include": "#comments"
2384 +
            },
2385 +
            {
2386 +
              "include": "#preprocessor-rule-enabled-elif"
2387 +
            },
2388 +
            {
2389 +
              "include": "#preprocessor-rule-enabled-else"
2390 +
            },
2391 +
            {
2392 +
              "include": "#preprocessor-rule-disabled-elif"
2393 +
            },
2394 +
            {
2395 +
              "begin": "^\\s*((#)\\s*elif)\\b",
2396 +
              "beginCaptures": {
2397 +
                "0": {
2398 +
                  "name": "meta.preprocessor.c"
2399 +
                },
2400 +
                "1": {
2401 +
                  "name": "keyword.control.directive.conditional.c"
2402 +
                },
2403 +
                "2": {
2404 +
                  "name": "punctuation.definition.directive.c"
2405 +
                }
2406 +
              },
2407 +
              "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2408 +
              "patterns": [
2409 +
                {
2410 +
                  "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2411 +
                  "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2412 +
                  "name": "meta.preprocessor.c",
2413 +
                  "patterns": [
2414 +
                    {
2415 +
                      "include": "#preprocessor-rule-conditional-line"
2416 +
                    }
2417 +
                  ]
2418 +
                },
2419 +
                {
2420 +
                  "include": "$self"
2421 +
                }
2422 +
              ]
2423 +
            },
2424 +
            {
2425 +
              "begin": "\\n",
2426 +
              "contentName": "comment.block.preprocessor.if-branch.c",
2427 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2428 +
              "patterns": [
2429 +
                {
2430 +
                  "include": "#disabled"
2431 +
                },
2432 +
                {
2433 +
                  "include": "#pragma-mark"
2434 +
                }
2435 +
              ]
2436 +
            }
2437 +
          ]
2438 +
        }
2439 +
      ]
2440 +
    },
2441 +
    "preprocessor-rule-disabled-block": {
2442 +
      "patterns": [
2443 +
        {
2444 +
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2445 +
          "beginCaptures": {
2446 +
            "0": {
2447 +
              "name": "meta.preprocessor.c"
2448 +
            },
2449 +
            "1": {
2450 +
              "name": "keyword.control.directive.conditional.c"
2451 +
            },
2452 +
            "2": {
2453 +
              "name": "punctuation.definition.directive.c"
2454 +
            }
2455 +
          },
2456 +
          "end": "^\\s*((#)\\s*endif)\\b",
2457 +
          "endCaptures": {
2458 +
            "0": {
2459 +
              "name": "meta.preprocessor.c"
2460 +
            },
2461 +
            "1": {
2462 +
              "name": "keyword.control.directive.conditional.c"
2463 +
            },
2464 +
            "2": {
2465 +
              "name": "punctuation.definition.directive.c"
2466 +
            }
2467 +
          },
2468 +
          "patterns": [
2469 +
            {
2470 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2471 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2472 +
              "name": "meta.preprocessor.c",
2473 +
              "patterns": [
2474 +
                {
2475 +
                  "include": "#preprocessor-rule-conditional-line"
2476 +
                }
2477 +
              ]
2478 +
            },
2479 +
            {
2480 +
              "include": "#comments"
2481 +
            },
2482 +
            {
2483 +
              "include": "#preprocessor-rule-enabled-elif-block"
2484 +
            },
2485 +
            {
2486 +
              "include": "#preprocessor-rule-enabled-else-block"
2487 +
            },
2488 +
            {
2489 +
              "include": "#preprocessor-rule-disabled-elif"
2490 +
            },
2491 +
            {
2492 +
              "begin": "^\\s*((#)\\s*elif)\\b",
2493 +
              "beginCaptures": {
2494 +
                "0": {
2495 +
                  "name": "meta.preprocessor.c"
2496 +
                },
2497 +
                "1": {
2498 +
                  "name": "keyword.control.directive.conditional.c"
2499 +
                },
2500 +
                "2": {
2501 +
                  "name": "punctuation.definition.directive.c"
2502 +
                }
2503 +
              },
2504 +
              "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2505 +
              "patterns": [
2506 +
                {
2507 +
                  "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2508 +
                  "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2509 +
                  "name": "meta.preprocessor.c",
2510 +
                  "patterns": [
2511 +
                    {
2512 +
                      "include": "#preprocessor-rule-conditional-line"
2513 +
                    }
2514 +
                  ]
2515 +
                },
2516 +
                {
2517 +
                  "include": "#block_innards"
2518 +
                }
2519 +
              ]
2520 +
            },
2521 +
            {
2522 +
              "begin": "\\n",
2523 +
              "contentName": "comment.block.preprocessor.if-branch.in-block.c",
2524 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2525 +
              "patterns": [
2526 +
                {
2527 +
                  "include": "#disabled"
2528 +
                },
2529 +
                {
2530 +
                  "include": "#pragma-mark"
2531 +
                }
2532 +
              ]
2533 +
            }
2534 +
          ]
2535 +
        }
2536 +
      ]
2537 +
    },
2538 +
    "preprocessor-rule-disabled-elif": {
2539 +
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2540 +
      "beginCaptures": {
2541 +
        "0": {
2542 +
          "name": "meta.preprocessor.c"
2543 +
        },
2544 +
        "1": {
2545 +
          "name": "keyword.control.directive.conditional.c"
2546 +
        },
2547 +
        "2": {
2548 +
          "name": "punctuation.definition.directive.c"
2549 +
        }
2550 +
      },
2551 +
      "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2552 +
      "patterns": [
2553 +
        {
2554 +
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2555 +
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2556 +
          "name": "meta.preprocessor.c",
2557 +
          "patterns": [
2558 +
            {
2559 +
              "include": "#preprocessor-rule-conditional-line"
2560 +
            }
2561 +
          ]
2562 +
        },
2563 +
        {
2564 +
          "include": "#comments"
2565 +
        },
2566 +
        {
2567 +
          "begin": "\\n",
2568 +
          "contentName": "comment.block.preprocessor.elif-branch.c",
2569 +
          "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2570 +
          "patterns": [
2571 +
            {
2572 +
              "include": "#disabled"
2573 +
            },
2574 +
            {
2575 +
              "include": "#pragma-mark"
2576 +
            }
2577 +
          ]
2578 +
        }
2579 +
      ]
2580 +
    },
2581 +
    "preprocessor-rule-enabled": {
2582 +
      "patterns": [
2583 +
        {
2584 +
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2585 +
          "beginCaptures": {
2586 +
            "0": {
2587 +
              "name": "meta.preprocessor.c"
2588 +
            },
2589 +
            "1": {
2590 +
              "name": "keyword.control.directive.conditional.c"
2591 +
            },
2592 +
            "2": {
2593 +
              "name": "punctuation.definition.directive.c"
2594 +
            },
2595 +
            "3": {
2596 +
              "name": "constant.numeric.preprocessor.c"
2597 +
            }
2598 +
          },
2599 +
          "end": "^\\s*((#)\\s*endif)\\b",
2600 +
          "endCaptures": {
2601 +
            "0": {
2602 +
              "name": "meta.preprocessor.c"
2603 +
            },
2604 +
            "1": {
2605 +
              "name": "keyword.control.directive.conditional.c"
2606 +
            },
2607 +
            "2": {
2608 +
              "name": "punctuation.definition.directive.c"
2609 +
            }
2610 +
          },
2611 +
          "patterns": [
2612 +
            {
2613 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2614 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2615 +
              "name": "meta.preprocessor.c",
2616 +
              "patterns": [
2617 +
                {
2618 +
                  "include": "#preprocessor-rule-conditional-line"
2619 +
                }
2620 +
              ]
2621 +
            },
2622 +
            {
2623 +
              "include": "#comments"
2624 +
            },
2625 +
            {
2626 +
              "begin": "^\\s*((#)\\s*else)\\b",
2627 +
              "beginCaptures": {
2628 +
                "0": {
2629 +
                  "name": "meta.preprocessor.c"
2630 +
                },
2631 +
                "1": {
2632 +
                  "name": "keyword.control.directive.conditional.c"
2633 +
                },
2634 +
                "2": {
2635 +
                  "name": "punctuation.definition.directive.c"
2636 +
                }
2637 +
              },
2638 +
              "contentName": "comment.block.preprocessor.else-branch.c",
2639 +
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2640 +
              "patterns": [
2641 +
                {
2642 +
                  "include": "#disabled"
2643 +
                },
2644 +
                {
2645 +
                  "include": "#pragma-mark"
2646 +
                }
2647 +
              ]
2648 +
            },
2649 +
            {
2650 +
              "begin": "^\\s*((#)\\s*elif)\\b",
2651 +
              "beginCaptures": {
2652 +
                "0": {
2653 +
                  "name": "meta.preprocessor.c"
2654 +
                },
2655 +
                "1": {
2656 +
                  "name": "keyword.control.directive.conditional.c"
2657 +
                },
2658 +
                "2": {
2659 +
                  "name": "punctuation.definition.directive.c"
2660 +
                }
2661 +
              },
2662 +
              "contentName": "comment.block.preprocessor.if-branch.c",
2663 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2664 +
              "patterns": [
2665 +
                {
2666 +
                  "include": "#disabled"
2667 +
                },
2668 +
                {
2669 +
                  "include": "#pragma-mark"
2670 +
                }
2671 +
              ]
2672 +
            },
2673 +
            {
2674 +
              "begin": "\\n",
2675 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2676 +
              "patterns": [
2677 +
                {
2678 +
                  "include": "$self"
2679 +
                }
2680 +
              ]
2681 +
            }
2682 +
          ]
2683 +
        }
2684 +
      ]
2685 +
    },
2686 +
    "preprocessor-rule-enabled-block": {
2687 +
      "patterns": [
2688 +
        {
2689 +
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2690 +
          "beginCaptures": {
2691 +
            "0": {
2692 +
              "name": "meta.preprocessor.c"
2693 +
            },
2694 +
            "1": {
2695 +
              "name": "keyword.control.directive.conditional.c"
2696 +
            },
2697 +
            "2": {
2698 +
              "name": "punctuation.definition.directive.c"
2699 +
            }
2700 +
          },
2701 +
          "end": "^\\s*((#)\\s*endif)\\b",
2702 +
          "endCaptures": {
2703 +
            "0": {
2704 +
              "name": "meta.preprocessor.c"
2705 +
            },
2706 +
            "1": {
2707 +
              "name": "keyword.control.directive.conditional.c"
2708 +
            },
2709 +
            "2": {
2710 +
              "name": "punctuation.definition.directive.c"
2711 +
            }
2712 +
          },
2713 +
          "patterns": [
2714 +
            {
2715 +
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2716 +
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2717 +
              "name": "meta.preprocessor.c",
2718 +
              "patterns": [
2719 +
                {
2720 +
                  "include": "#preprocessor-rule-conditional-line"
2721 +
                }
2722 +
              ]
2723 +
            },
2724 +
            {
2725 +
              "include": "#comments"
2726 +
            },
2727 +
            {
2728 +
              "begin": "^\\s*((#)\\s*else)\\b",
2729 +
              "beginCaptures": {
2730 +
                "0": {
2731 +
                  "name": "meta.preprocessor.c"
2732 +
                },
2733 +
                "1": {
2734 +
                  "name": "keyword.control.directive.conditional.c"
2735 +
                },
2736 +
                "2": {
2737 +
                  "name": "punctuation.definition.directive.c"
2738 +
                }
2739 +
              },
2740 +
              "contentName": "comment.block.preprocessor.else-branch.in-block.c",
2741 +
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2742 +
              "patterns": [
2743 +
                {
2744 +
                  "include": "#disabled"
2745 +
                },
2746 +
                {
2747 +
                  "include": "#pragma-mark"
2748 +
                }
2749 +
              ]
2750 +
            },
2751 +
            {
2752 +
              "begin": "^\\s*((#)\\s*elif)\\b",
2753 +
              "beginCaptures": {
2754 +
                "0": {
2755 +
                  "name": "meta.preprocessor.c"
2756 +
                },
2757 +
                "1": {
2758 +
                  "name": "keyword.control.directive.conditional.c"
2759 +
                },
2760 +
                "2": {
2761 +
                  "name": "punctuation.definition.directive.c"
2762 +
                }
2763 +
              },
2764 +
              "contentName": "comment.block.preprocessor.if-branch.in-block.c",
2765 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2766 +
              "patterns": [
2767 +
                {
2768 +
                  "include": "#disabled"
2769 +
                },
2770 +
                {
2771 +
                  "include": "#pragma-mark"
2772 +
                }
2773 +
              ]
2774 +
            },
2775 +
            {
2776 +
              "begin": "\\n",
2777 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2778 +
              "patterns": [
2779 +
                {
2780 +
                  "include": "#block_innards"
2781 +
                }
2782 +
              ]
2783 +
            }
2784 +
          ]
2785 +
        }
2786 +
      ]
2787 +
    },
2788 +
    "preprocessor-rule-enabled-elif": {
2789 +
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2790 +
      "beginCaptures": {
2791 +
        "0": {
2792 +
          "name": "meta.preprocessor.c"
2793 +
        },
2794 +
        "1": {
2795 +
          "name": "keyword.control.directive.conditional.c"
2796 +
        },
2797 +
        "2": {
2798 +
          "name": "punctuation.definition.directive.c"
2799 +
        }
2800 +
      },
2801 +
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2802 +
      "patterns": [
2803 +
        {
2804 +
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2805 +
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2806 +
          "name": "meta.preprocessor.c",
2807 +
          "patterns": [
2808 +
            {
2809 +
              "include": "#preprocessor-rule-conditional-line"
2810 +
            }
2811 +
          ]
2812 +
        },
2813 +
        {
2814 +
          "include": "#comments"
2815 +
        },
2816 +
        {
2817 +
          "begin": "\\n",
2818 +
          "end": "(?=^\\s*((#)\\s*endif)\\b)",
2819 +
          "patterns": [
2820 +
            {
2821 +
              "begin": "^\\s*((#)\\s*(else))\\b",
2822 +
              "beginCaptures": {
2823 +
                "0": {
2824 +
                  "name": "meta.preprocessor.c"
2825 +
                },
2826 +
                "1": {
2827 +
                  "name": "keyword.control.directive.conditional.c"
2828 +
                },
2829 +
                "2": {
2830 +
                  "name": "punctuation.definition.directive.c"
2831 +
                }
2832 +
              },
2833 +
              "contentName": "comment.block.preprocessor.elif-branch.c",
2834 +
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2835 +
              "patterns": [
2836 +
                {
2837 +
                  "include": "#disabled"
2838 +
                },
2839 +
                {
2840 +
                  "include": "#pragma-mark"
2841 +
                }
2842 +
              ]
2843 +
            },
2844 +
            {
2845 +
              "begin": "^\\s*((#)\\s*(elif))\\b",
2846 +
              "beginCaptures": {
2847 +
                "0": {
2848 +
                  "name": "meta.preprocessor.c"
2849 +
                },
2850 +
                "1": {
2851 +
                  "name": "keyword.control.directive.conditional.c"
2852 +
                },
2853 +
                "2": {
2854 +
                  "name": "punctuation.definition.directive.c"
2855 +
                }
2856 +
              },
2857 +
              "contentName": "comment.block.preprocessor.elif-branch.c",
2858 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2859 +
              "patterns": [
2860 +
                {
2861 +
                  "include": "#disabled"
2862 +
                },
2863 +
                {
2864 +
                  "include": "#pragma-mark"
2865 +
                }
2866 +
              ]
2867 +
            },
2868 +
            {
2869 +
              "include": "$self"
2870 +
            }
2871 +
          ]
2872 +
        }
2873 +
      ]
2874 +
    },
2875 +
    "preprocessor-rule-enabled-elif-block": {
2876 +
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2877 +
      "beginCaptures": {
2878 +
        "0": {
2879 +
          "name": "meta.preprocessor.c"
2880 +
        },
2881 +
        "1": {
2882 +
          "name": "keyword.control.directive.conditional.c"
2883 +
        },
2884 +
        "2": {
2885 +
          "name": "punctuation.definition.directive.c"
2886 +
        }
2887 +
      },
2888 +
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2889 +
      "patterns": [
2890 +
        {
2891 +
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2892 +
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2893 +
          "name": "meta.preprocessor.c",
2894 +
          "patterns": [
2895 +
            {
2896 +
              "include": "#preprocessor-rule-conditional-line"
2897 +
            }
2898 +
          ]
2899 +
        },
2900 +
        {
2901 +
          "include": "#comments"
2902 +
        },
2903 +
        {
2904 +
          "begin": "\\n",
2905 +
          "end": "(?=^\\s*((#)\\s*endif)\\b)",
2906 +
          "patterns": [
2907 +
            {
2908 +
              "begin": "^\\s*((#)\\s*(else))\\b",
2909 +
              "beginCaptures": {
2910 +
                "0": {
2911 +
                  "name": "meta.preprocessor.c"
2912 +
                },
2913 +
                "1": {
2914 +
                  "name": "keyword.control.directive.conditional.c"
2915 +
                },
2916 +
                "2": {
2917 +
                  "name": "punctuation.definition.directive.c"
2918 +
                }
2919 +
              },
2920 +
              "contentName": "comment.block.preprocessor.elif-branch.in-block.c",
2921 +
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2922 +
              "patterns": [
2923 +
                {
2924 +
                  "include": "#disabled"
2925 +
                },
2926 +
                {
2927 +
                  "include": "#pragma-mark"
2928 +
                }
2929 +
              ]
2930 +
            },
2931 +
            {
2932 +
              "begin": "^\\s*((#)\\s*(elif))\\b",
2933 +
              "beginCaptures": {
2934 +
                "0": {
2935 +
                  "name": "meta.preprocessor.c"
2936 +
                },
2937 +
                "1": {
2938 +
                  "name": "keyword.control.directive.conditional.c"
2939 +
                },
2940 +
                "2": {
2941 +
                  "name": "punctuation.definition.directive.c"
2942 +
                }
2943 +
              },
2944 +
              "contentName": "comment.block.preprocessor.elif-branch.c",
2945 +
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2946 +
              "patterns": [
2947 +
                {
2948 +
                  "include": "#disabled"
2949 +
                },
2950 +
                {
2951 +
                  "include": "#pragma-mark"
2952 +
                }
2953 +
              ]
2954 +
            },
2955 +
            {
2956 +
              "include": "#block_innards"
2957 +
            }
2958 +
          ]
2959 +
        }
2960 +
      ]
2961 +
    },
2962 +
    "preprocessor-rule-enabled-else": {
2963 +
      "begin": "^\\s*((#)\\s*else)\\b",
2964 +
      "beginCaptures": {
2965 +
        "0": {
2966 +
          "name": "meta.preprocessor.c"
2967 +
        },
2968 +
        "1": {
2969 +
          "name": "keyword.control.directive.conditional.c"
2970 +
        },
2971 +
        "2": {
2972 +
          "name": "punctuation.definition.directive.c"
2973 +
        }
2974 +
      },
2975 +
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2976 +
      "patterns": [
2977 +
        {
2978 +
          "include": "$self"
2979 +
        }
2980 +
      ]
2981 +
    },
2982 +
    "preprocessor-rule-enabled-else-block": {
2983 +
      "begin": "^\\s*((#)\\s*else)\\b",
2984 +
      "beginCaptures": {
2985 +
        "0": {
2986 +
          "name": "meta.preprocessor.c"
2987 +
        },
2988 +
        "1": {
2989 +
          "name": "keyword.control.directive.conditional.c"
2990 +
        },
2991 +
        "2": {
2992 +
          "name": "punctuation.definition.directive.c"
2993 +
        }
2994 +
      },
2995 +
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2996 +
      "patterns": [
2997 +
        {
2998 +
          "include": "#block_innards"
2999 +
        }
3000 +
      ]
3001 +
    },
3002 +
    "probably_a_parameter": {
3003 +
      "captures": {
3004 +
        "1": {
3005 +
          "name": "variable.parameter.probably.c"
3006 +
        }
3007 +
      },
3008 +
      "match": "(?<=[0-9A-Z_a-z] |[]\\&)*>])\\s*([A-Z_a-z]\\w*)\\s*(?=(?:\\[]\\s*)?[),])"
3009 +
    },
3010 +
    "static_assert": {
3011 +
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)static_assert|_Static_assert(?!\\w))((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()",
3012 +
      "beginCaptures": {
3013 +
        "1": {
3014 +
          "patterns": [
3015 +
            {
3016 +
              "include": "#inline_comment"
3017 +
            }
3018 +
          ]
3019 +
        },
3020 +
        "10": {
3021 +
          "name": "punctuation.section.arguments.begin.bracket.round.static_assert.c"
3022 +
        },
3023 +
        "2": {
3024 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3025 +
        },
3026 +
        "3": {
3027 +
          "name": "comment.block.c"
3028 +
        },
3029 +
        "4": {
3030 +
          "patterns": [
3031 +
            {
3032 +
              "match": "\\*/",
3033 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
3034 +
            },
3035 +
            {
3036 +
              "match": "\\*",
3037 +
              "name": "comment.block.c"
3038 +
            }
3039 +
          ]
3040 +
        },
3041 +
        "5": {
3042 +
          "name": "keyword.other.static_assert.c"
3043 +
        },
3044 +
        "6": {
3045 +
          "patterns": [
3046 +
            {
3047 +
              "include": "#inline_comment"
3048 +
            }
3049 +
          ]
3050 +
        },
3051 +
        "7": {
3052 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3053 +
        },
3054 +
        "8": {
3055 +
          "name": "comment.block.c"
3056 +
        },
3057 +
        "9": {
3058 +
          "patterns": [
3059 +
            {
3060 +
              "match": "\\*/",
3061 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
3062 +
            },
3063 +
            {
3064 +
              "match": "\\*",
3065 +
              "name": "comment.block.c"
3066 +
            }
3067 +
          ]
3068 +
        }
3069 +
      },
3070 +
      "end": "(\\))",
3071 +
      "endCaptures": {
3072 +
        "1": {
3073 +
          "name": "punctuation.section.arguments.end.bracket.round.static_assert.c"
3074 +
        }
3075 +
      },
3076 +
      "patterns": [
3077 +
        {
3078 +
          "begin": "(,)\\s*(?=(?:L|u8?|U\\s*\")?)",
3079 +
          "beginCaptures": {
3080 +
            "1": {
3081 +
              "name": "punctuation.separator.delimiter.comma.c"
3082 +
            }
3083 +
          },
3084 +
          "end": "(?=\\))",
3085 +
          "name": "meta.static_assert.message.c",
3086 +
          "patterns": [
3087 +
            {
3088 +
              "include": "#string_context"
3089 +
            }
3090 +
          ]
3091 +
        },
3092 +
        {
3093 +
          "include": "#evaluation_context"
3094 +
        }
3095 +
      ]
3096 +
    },
3097 +
    "storage_types": {
3098 +
      "patterns": [
3099 +
        {
3100 +
          "match": "(?-im:(?<!\\w)(?:unsigned|signed|double|_Bool|short|float|long|void|char|bool|int)(?!\\w))",
3101 +
          "name": "storage.type.built-in.primitive.c"
3102 +
        },
3103 +
        {
3104 +
          "match": "(?-im:(?<!\\w)(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|pthread_rwlockattr_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_uint_fast16_t|atomic_int_least64_t|atomic_int_least32_t|atomic_int_least16_t|atomic_uint_least8_t|atomic_uint_fast8_t|atomic_int_least8_t|atomic_int_fast16_t|pthread_mutexattr_t|atomic_int_fast32_t|atomic_int_fast64_t|atomic_int_fast8_t|pthread_condattr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintptr_t|atomic_uintmax_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|int_least32_t|pthread_key_t|int_least16_t|int_least64_t|uint_least8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|atomic_ushort|atomic_ullong|atomic_size_t|int_fast16_t|int_fast64_t|uint_fast8_t|atomic_short|atomic_uchar|atomic_schar|int_least8_t|memory_order|atomic_llong|atomic_ulong|int_fast32_t|atomic_long|atomic_uint|atomic_char|int_fast8_t|suseconds_t|atomic_bool|atomic_int|_Imaginary|useconds_t|in_port_t|uintmax_t|pthread_t|blksize_t|in_addr_t|uintptr_t|blkcnt_t|uint16_t|uint32_t|uint64_t|u_quad_t|_Complex|intptr_t|intmax_t|segsz_t|u_short|nlink_t|uint8_t|int64_t|int32_t|int16_t|fixpt_t|daddr_t|caddr_t|qaddr_t|ssize_t|clock_t|swblk_t|u_long|mode_t|int8_t|time_t|ushort|u_char|quad_t|size_t|pid_t|gid_t|uid_t|dev_t|div_t|off_t|u_int|key_t|ino_t|uint|id_t)(?!\\w))",
3105 +
          "name": "storage.type.built-in.c"
3106 +
        },
3107 +
        {
3108 +
          "match": "(?-im:\\b(enum|struct|union)\\b)",
3109 +
          "name": "storage.type.$1.c"
3110 +
        },
3111 +
        {
3112 +
          "begin": "\\b(__asm__|asm)\\b\\s*((?:volatile)?)",
3113 +
          "beginCaptures": {
3114 +
            "1": {
3115 +
              "name": "storage.type.asm.c"
3116 +
            },
3117 +
            "2": {
3118 +
              "name": "storage.modifier.c"
3119 +
            }
3120 +
          },
3121 +
          "end": "(?!\\G)",
3122 +
          "name": "meta.asm.c",
3123 +
          "patterns": [
3124 +
            {
3125 +
              "captures": {
3126 +
                "1": {
3127 +
                  "patterns": [
3128 +
                    {
3129 +
                      "include": "#inline_comment"
3130 +
                    }
3131 +
                  ]
3132 +
                },
3133 +
                "2": {
3134 +
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
3135 +
                },
3136 +
                "3": {
3137 +
                  "name": "comment.block.c"
3138 +
                },
3139 +
                "4": {
3140 +
                  "patterns": [
3141 +
                    {
3142 +
                      "match": "\\*/",
3143 +
                      "name": "comment.block.c punctuation.definition.comment.end.c"
3144 +
                    },
3145 +
                    {
3146 +
                      "match": "\\*",
3147 +
                      "name": "comment.block.c"
3148 +
                    }
3149 +
                  ]
3150 +
                }
3151 +
              },
3152 +
              "match": "^((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))(?:\\n|$)"
3153 +
            },
3154 +
            {
3155 +
              "include": "#comments"
3156 +
            },
3157 +
            {
3158 +
              "begin": "(((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))\\()",
3159 +
              "beginCaptures": {
3160 +
                "1": {
3161 +
                  "name": "punctuation.section.parens.begin.bracket.round.assembly.c"
3162 +
                },
3163 +
                "2": {
3164 +
                  "patterns": [
3165 +
                    {
3166 +
                      "include": "#inline_comment"
3167 +
                    }
3168 +
                  ]
3169 +
                },
3170 +
                "3": {
3171 +
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
3172 +
                },
3173 +
                "4": {
3174 +
                  "name": "comment.block.c"
3175 +
                },
3176 +
                "5": {
3177 +
                  "patterns": [
3178 +
                    {
3179 +
                      "match": "\\*/",
3180 +
                      "name": "comment.block.c punctuation.definition.comment.end.c"
3181 +
                    },
3182 +
                    {
3183 +
                      "match": "\\*",
3184 +
                      "name": "comment.block.c"
3185 +
                    }
3186 +
                  ]
3187 +
                }
3188 +
              },
3189 +
              "end": "(\\))",
3190 +
              "endCaptures": {
3191 +
                "1": {
3192 +
                  "name": "punctuation.section.parens.end.bracket.round.assembly.c"
3193 +
                }
3194 +
              },
3195 +
              "patterns": [
3196 +
                {
3197 +
                  "begin": "(R?)(\")",
3198 +
                  "beginCaptures": {
3199 +
                    "1": {
3200 +
                      "name": "meta.encoding.c"
3201 +
                    },
3202 +
                    "2": {
3203 +
                      "name": "punctuation.definition.string.begin.assembly.c"
3204 +
                    }
3205 +
                  },
3206 +
                  "contentName": "meta.embedded.assembly.c",
3207 +
                  "end": "(\")",
3208 +
                  "endCaptures": {
3209 +
                    "1": {
3210 +
                      "name": "punctuation.definition.string.end.assembly.c"
3211 +
                    }
3212 +
                  },
3213 +
                  "name": "string.quoted.double.c",
3214 +
                  "patterns": [
3215 +
                    {
3216 +
                      "include": "source.asm"
3217 +
                    },
3218 +
                    {
3219 +
                      "include": "source.x86"
3220 +
                    },
3221 +
                    {
3222 +
                      "include": "source.x86_64"
3223 +
                    },
3224 +
                    {
3225 +
                      "include": "source.arm"
3226 +
                    },
3227 +
                    {
3228 +
                      "include": "#backslash_escapes"
3229 +
                    },
3230 +
                    {
3231 +
                      "include": "#string_escaped_char"
3232 +
                    }
3233 +
                  ]
3234 +
                },
3235 +
                {
3236 +
                  "begin": "(\\()",
3237 +
                  "beginCaptures": {
3238 +
                    "1": {
3239 +
                      "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c"
3240 +
                    }
3241 +
                  },
3242 +
                  "end": "(\\))",
3243 +
                  "endCaptures": {
3244 +
                    "1": {
3245 +
                      "name": "punctuation.section.parens.end.bracket.round.assembly.inner.c"
3246 +
                    }
3247 +
                  },
3248 +
                  "patterns": [
3249 +
                    {
3250 +
                      "include": "#evaluation_context"
3251 +
                    }
3252 +
                  ]
3253 +
                },
3254 +
                {
3255 +
                  "captures": {
3256 +
                    "1": {
3257 +
                      "patterns": [
3258 +
                        {
3259 +
                          "include": "#inline_comment"
3260 +
                        }
3261 +
                      ]
3262 +
                    },
3263 +
                    "2": {
3264 +
                      "name": "comment.block.c punctuation.definition.comment.begin.c"
3265 +
                    },
3266 +
                    "3": {
3267 +
                      "name": "comment.block.c"
3268 +
                    },
3269 +
                    "4": {
3270 +
                      "patterns": [
3271 +
                        {
3272 +
                          "match": "\\*/",
3273 +
                          "name": "comment.block.c punctuation.definition.comment.end.c"
3274 +
                        },
3275 +
                        {
3276 +
                          "match": "\\*",
3277 +
                          "name": "comment.block.c"
3278 +
                        }
3279 +
                      ]
3280 +
                    },
3281 +
                    "5": {
3282 +
                      "name": "variable.other.asm.label.c"
3283 +
                    },
3284 +
                    "6": {
3285 +
                      "patterns": [
3286 +
                        {
3287 +
                          "include": "#inline_comment"
3288 +
                        }
3289 +
                      ]
3290 +
                    },
3291 +
                    "7": {
3292 +
                      "name": "comment.block.c punctuation.definition.comment.begin.c"
3293 +
                    },
3294 +
                    "8": {
3295 +
                      "name": "comment.block.c"
3296 +
                    },
3297 +
                    "9": {
3298 +
                      "patterns": [
3299 +
                        {
3300 +
                          "match": "\\*/",
3301 +
                          "name": "comment.block.c punctuation.definition.comment.end.c"
3302 +
                        },
3303 +
                        {
3304 +
                          "match": "\\*",
3305 +
                          "name": "comment.block.c"
3306 +
                        }
3307 +
                      ]
3308 +
                    }
3309 +
                  },
3310 +
                  "match": "\\[((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))([A-Z_a-z]\\w*)((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))]"
3311 +
                },
3312 +
                {
3313 +
                  "match": ":",
3314 +
                  "name": "punctuation.separator.delimiter.colon.assembly.c"
3315 +
                },
3316 +
                {
3317 +
                  "include": "#comments"
3318 +
                }
3319 +
              ]
3320 +
            }
3321 +
          ]
3322 +
        }
3323 +
      ]
3324 +
    },
3325 +
    "string_escaped_char": {
3326 +
      "patterns": [
3327 +
        {
3328 +
          "match": "\\\\([\"'?\\\\abefnprtv]|[0-3]\\d{0,2}|[4-7]\\d?|x\\h{0,2}|u\\h{0,4}|U\\h{0,8})",
3329 +
          "name": "constant.character.escape.c"
3330 +
        },
3331 +
        {
3332 +
          "match": "\\\\.",
3333 +
          "name": "invalid.illegal.unknown-escape.c"
3334 +
        }
3335 +
      ]
3336 +
    },
3337 +
    "string_placeholder": {
3338 +
      "patterns": [
3339 +
        {
3340 +
          "match": "%(\\d+\\$)?[- #'+0]*[,:;_]?((-?\\d+)|\\*(-?\\d+\\$)?)?(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?(hh?|ll|[Ljlqtz]|vh|vl?|hv|hl)?[%AC-GOSUXac-ginopsux]",
3341 +
          "name": "constant.other.placeholder.c"
3342 +
        },
3343 +
        {
3344 +
          "captures": {
3345 +
            "1": {
3346 +
              "name": "invalid.illegal.placeholder.c"
3347 +
            }
3348 +
          },
3349 +
          "match": "(%)(?!\"\\s*(PRI|SCN))"
3350 +
        }
3351 +
      ]
3352 +
    },
3353 +
    "strings": {
3354 +
      "patterns": [
3355 +
        {
3356 +
          "begin": "\"",
3357 +
          "beginCaptures": {
3358 +
            "0": {
3359 +
              "name": "punctuation.definition.string.begin.c"
3360 +
            }
3361 +
          },
3362 +
          "end": "\"",
3363 +
          "endCaptures": {
3364 +
            "0": {
3365 +
              "name": "punctuation.definition.string.end.c"
3366 +
            }
3367 +
          },
3368 +
          "name": "string.quoted.double.c",
3369 +
          "patterns": [
3370 +
            {
3371 +
              "include": "#string_escaped_char"
3372 +
            },
3373 +
            {
3374 +
              "include": "#string_placeholder"
3375 +
            },
3376 +
            {
3377 +
              "include": "#line_continuation_character"
3378 +
            }
3379 +
          ]
3380 +
        },
3381 +
        {
3382 +
          "begin": "'",
3383 +
          "beginCaptures": {
3384 +
            "0": {
3385 +
              "name": "punctuation.definition.string.begin.c"
3386 +
            }
3387 +
          },
3388 +
          "end": "'",
3389 +
          "endCaptures": {
3390 +
            "0": {
3391 +
              "name": "punctuation.definition.string.end.c"
3392 +
            }
3393 +
          },
3394 +
          "name": "string.quoted.single.c",
3395 +
          "patterns": [
3396 +
            {
3397 +
              "include": "#string_escaped_char"
3398 +
            },
3399 +
            {
3400 +
              "include": "#line_continuation_character"
3401 +
            }
3402 +
          ]
3403 +
        }
3404 +
      ]
3405 +
    },
3406 +
    "switch_conditional_parentheses": {
3407 +
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()",
3408 +
      "beginCaptures": {
3409 +
        "1": {
3410 +
          "patterns": [
3411 +
            {
3412 +
              "include": "#inline_comment"
3413 +
            }
3414 +
          ]
3415 +
        },
3416 +
        "2": {
3417 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3418 +
        },
3419 +
        "3": {
3420 +
          "name": "comment.block.c"
3421 +
        },
3422 +
        "4": {
3423 +
          "patterns": [
3424 +
            {
3425 +
              "match": "\\*/",
3426 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
3427 +
            },
3428 +
            {
3429 +
              "match": "\\*",
3430 +
              "name": "comment.block.c"
3431 +
            }
3432 +
          ]
3433 +
        },
3434 +
        "5": {
3435 +
          "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c"
3436 +
        }
3437 +
      },
3438 +
      "end": "(\\))",
3439 +
      "endCaptures": {
3440 +
        "1": {
3441 +
          "name": "punctuation.section.parens.end.bracket.round.conditional.switch.c"
3442 +
        }
3443 +
      },
3444 +
      "name": "meta.conditional.switch.c",
3445 +
      "patterns": [
3446 +
        {
3447 +
          "include": "#evaluation_context"
3448 +
        },
3449 +
        {
3450 +
          "include": "#c_conditional_context"
3451 +
        }
3452 +
      ]
3453 +
    },
3454 +
    "switch_statement": {
3455 +
      "begin": "(((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)switch(?!\\w)))",
3456 +
      "beginCaptures": {
3457 +
        "1": {
3458 +
          "name": "meta.head.switch.c"
3459 +
        },
3460 +
        "2": {
3461 +
          "patterns": [
3462 +
            {
3463 +
              "include": "#inline_comment"
3464 +
            }
3465 +
          ]
3466 +
        },
3467 +
        "3": {
3468 +
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3469 +
        },
3470 +
        "4": {
3471 +
          "name": "comment.block.c"
3472 +
        },
3473 +
        "5": {
3474 +
          "patterns": [
3475 +
            {
3476 +
              "match": "\\*/",
3477 +
              "name": "comment.block.c punctuation.definition.comment.end.c"
3478 +
            },
3479 +
            {
3480 +
              "match": "\\*",
3481 +
              "name": "comment.block.c"
3482 +
            }
3483 +
          ]
3484 +
        },
3485 +
        "6": {
3486 +
          "name": "keyword.control.switch.c"
3487 +
        }
3488 +
      },
3489 +
      "end": "(?<=}|%>|\\?\\?>)|(?=[];=>\\[])",
3490 +
      "name": "meta.block.switch.c",
3491 +
      "patterns": [
3492 +
        {
3493 +
          "begin": "\\G ?",
3494 +
          "end": "(\\{|<%|\\?\\?<|(?=;))",
3495 +
          "endCaptures": {
3496 +
            "1": {
3497 +
              "name": "punctuation.section.block.begin.bracket.curly.switch.c"
3498 +
            }
3499 +
          },
3500 +
          "name": "meta.head.switch.c",
3501 +
          "patterns": [
3502 +
            {
3503 +
              "include": "#switch_conditional_parentheses"
3504 +
            },
3505 +
            {
3506 +
              "include": "$self"
3507 +
            }
3508 +
          ]
3509 +
        },
3510 +
        {
3511 +
          "begin": "(?<=\\{|<%|\\?\\?<)",
3512 +
          "end": "(}|%>|\\?\\?>)",
3513 +
          "endCaptures": {
3514 +
            "1": {
3515 +
              "name": "punctuation.section.block.end.bracket.curly.switch.c"
3516 +
            }
3517 +
          },
3518 +
          "name": "meta.body.switch.c",
3519 +
          "patterns": [
3520 +
            {
3521 +
              "include": "#default_statement"
3522 +
            },
3523 +
            {
3524 +
              "include": "#case_statement"
3525 +
            },
3526 +
            {
3527 +
              "include": "$self"
3528 +
            },
3529 +
            {
3530 +
              "include": "#block_innards"
3531 +
            }
3532 +
          ]
3533 +
        },
3534 +
        {
3535 +
          "begin": "(?<=}|%>|\\?\\?>)[\\n\\s]*",
3536 +
          "end": "[\\n\\s]*(?=;)",
3537 +
          "name": "meta.tail.switch.c",
3538 +
          "patterns": [
3539 +
            {
3540 +
              "include": "$self"
3541 +
            }
3542 +
          ]
3543 +
        }
3544 +
      ]
3545 +
    },
3546 +
    "vararg_ellipses": {
3547 +
      "match": "(?<!\\.)\\.\\.\\.(?!\\.)",
3548 +
      "name": "punctuation.vararg-ellipses.c"
3549 +
    }
3550 +
  },
3551 +
  "scopeName": "source.c"
3552 +
}
crates/diff/src/syntaxes/css.json added +1839 -0
1 +
{
2 +
  "displayName": "CSS",
3 +
  "name": "css",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#comment-block"
7 +
    },
8 +
    {
9 +
      "include": "#escapes"
10 +
    },
11 +
    {
12 +
      "include": "#combinators"
13 +
    },
14 +
    {
15 +
      "include": "#selector"
16 +
    },
17 +
    {
18 +
      "include": "#at-rules"
19 +
    },
20 +
    {
21 +
      "include": "#rule-list"
22 +
    }
23 +
  ],
24 +
  "repository": {
25 +
    "at-rules": {
26 +
      "patterns": [
27 +
        {
28 +
          "begin": "\\A\\uFEFF?(?i:(?=\\s*@charset\\b))",
29 +
          "end": ";|(?=$)",
30 +
          "endCaptures": {
31 +
            "0": {
32 +
              "name": "punctuation.terminator.rule.css"
33 +
            }
34 +
          },
35 +
          "name": "meta.at-rule.charset.css",
36 +
          "patterns": [
37 +
            {
38 +
              "captures": {
39 +
                "1": {
40 +
                  "name": "invalid.illegal.not-lowercase.charset.css"
41 +
                },
42 +
                "2": {
43 +
                  "name": "invalid.illegal.leading-whitespace.charset.css"
44 +
                },
45 +
                "3": {
46 +
                  "name": "invalid.illegal.no-whitespace.charset.css"
47 +
                },
48 +
                "4": {
49 +
                  "name": "invalid.illegal.whitespace.charset.css"
50 +
                },
51 +
                "5": {
52 +
                  "name": "invalid.illegal.not-double-quoted.charset.css"
53 +
                },
54 +
                "6": {
55 +
                  "name": "invalid.illegal.unclosed-string.charset.css"
56 +
                },
57 +
                "7": {
58 +
                  "name": "invalid.illegal.unexpected-characters.charset.css"
59 +
                }
60 +
              },
61 +
              "match": "\\G((?!@charset)@\\w+)|\\G(\\s+)|(@charset\\S[^;]*)|(?<=@charset)( {2,}|\\t+)|(?<=@charset )([^\";]+)|(\"[^\"]+)$|(?<=\")([^;]+)"
62 +
            },
63 +
            {
64 +
              "captures": {
65 +
                "1": {
66 +
                  "name": "keyword.control.at-rule.charset.css"
67 +
                },
68 +
                "2": {
69 +
                  "name": "punctuation.definition.keyword.css"
70 +
                }
71 +
              },
72 +
              "match": "((@)charset)(?=\\s)"
73 +
            },
74 +
            {
75 +
              "begin": "\"",
76 +
              "beginCaptures": {
77 +
                "0": {
78 +
                  "name": "punctuation.definition.string.begin.css"
79 +
                }
80 +
              },
81 +
              "end": "\"|$",
82 +
              "endCaptures": {
83 +
                "0": {
84 +
                  "name": "punctuation.definition.string.end.css"
85 +
                }
86 +
              },
87 +
              "name": "string.quoted.double.css",
88 +
              "patterns": [
89 +
                {
90 +
                  "begin": "(?:\\G|^)(?=[^\"]+$)",
91 +
                  "end": "$",
92 +
                  "name": "invalid.illegal.unclosed.string.css"
93 +
                }
94 +
              ]
95 +
            }
96 +
          ]
97 +
        },
98 +
        {
99 +
          "begin": "(?i)((@)import)(?:\\s+|$|(?=[\"']|/\\*))",
100 +
          "beginCaptures": {
101 +
            "1": {
102 +
              "name": "keyword.control.at-rule.import.css"
103 +
            },
104 +
            "2": {
105 +
              "name": "punctuation.definition.keyword.css"
106 +
            }
107 +
          },
108 +
          "end": ";",
109 +
          "endCaptures": {
110 +
            "0": {
111 +
              "name": "punctuation.terminator.rule.css"
112 +
            }
113 +
          },
114 +
          "name": "meta.at-rule.import.css",
115 +
          "patterns": [
116 +
            {
117 +
              "begin": "\\G\\s*(?=/\\*)",
118 +
              "end": "(?<=\\*/)\\s*",
119 +
              "patterns": [
120 +
                {
121 +
                  "include": "#comment-block"
122 +
                }
123 +
              ]
124 +
            },
125 +
            {
126 +
              "include": "#string"
127 +
            },
128 +
            {
129 +
              "include": "#url"
130 +
            },
131 +
            {
132 +
              "include": "#media-query-list"
133 +
            }
134 +
          ]
135 +
        },
136 +
        {
137 +
          "begin": "(?i)((@)font-face)(?=\\s*|\\{|/\\*|$)",
138 +
          "beginCaptures": {
139 +
            "1": {
140 +
              "name": "keyword.control.at-rule.font-face.css"
141 +
            },
142 +
            "2": {
143 +
              "name": "punctuation.definition.keyword.css"
144 +
            }
145 +
          },
146 +
          "end": "(?!\\G)",
147 +
          "name": "meta.at-rule.font-face.css",
148 +
          "patterns": [
149 +
            {
150 +
              "include": "#comment-block"
151 +
            },
152 +
            {
153 +
              "include": "#escapes"
154 +
            },
155 +
            {
156 +
              "include": "#rule-list"
157 +
            }
158 +
          ]
159 +
        },
160 +
        {
161 +
          "begin": "(?i)(@)page(?=[:{\\s]|/\\*|$)",
162 +
          "captures": {
163 +
            "0": {
164 +
              "name": "keyword.control.at-rule.page.css"
165 +
            },
166 +
            "1": {
167 +
              "name": "punctuation.definition.keyword.css"
168 +
            }
169 +
          },
170 +
          "end": "(?=\\s*($|[:;{]))",
171 +
          "name": "meta.at-rule.page.css",
172 +
          "patterns": [
173 +
            {
174 +
              "include": "#rule-list"
175 +
            }
176 +
          ]
177 +
        },
178 +
        {
179 +
          "begin": "(?i)(?=@media([(\\s]|/\\*|$))",
180 +
          "end": "(?<=})(?!\\G)",
181 +
          "patterns": [
182 +
            {
183 +
              "begin": "(?i)\\G(@)media",
184 +
              "beginCaptures": {
185 +
                "0": {
186 +
                  "name": "keyword.control.at-rule.media.css"
187 +
                },
188 +
                "1": {
189 +
                  "name": "punctuation.definition.keyword.css"
190 +
                }
191 +
              },
192 +
              "end": "(?=\\s*[;{])",
193 +
              "name": "meta.at-rule.media.header.css",
194 +
              "patterns": [
195 +
                {
196 +
                  "include": "#media-query-list"
197 +
                }
198 +
              ]
199 +
            },
200 +
            {
201 +
              "begin": "\\{",
202 +
              "beginCaptures": {
203 +
                "0": {
204 +
                  "name": "punctuation.section.media.begin.bracket.curly.css"
205 +
                }
206 +
              },
207 +
              "end": "}",
208 +
              "endCaptures": {
209 +
                "0": {
210 +
                  "name": "punctuation.section.media.end.bracket.curly.css"
211 +
                }
212 +
              },
213 +
              "name": "meta.at-rule.media.body.css",
214 +
              "patterns": [
215 +
                {
216 +
                  "include": "$self"
217 +
                }
218 +
              ]
219 +
            }
220 +
          ]
221 +
        },
222 +
        {
223 +
          "begin": "(?i)(?=@counter-style([\"';{\\s]|/\\*|$))",
224 +
          "end": "(?<=})(?!\\G)",
225 +
          "patterns": [
226 +
            {
227 +
              "begin": "(?i)\\G(@)counter-style",
228 +
              "beginCaptures": {
229 +
                "0": {
230 +
                  "name": "keyword.control.at-rule.counter-style.css"
231 +
                },
232 +
                "1": {
233 +
                  "name": "punctuation.definition.keyword.css"
234 +
                }
235 +
              },
236 +
              "end": "(?=\\s*\\{)",
237 +
              "name": "meta.at-rule.counter-style.header.css",
238 +
              "patterns": [
239 +
                {
240 +
                  "include": "#comment-block"
241 +
                },
242 +
                {
243 +
                  "include": "#escapes"
244 +
                },
245 +
                {
246 +
                  "captures": {
247 +
                    "0": {
248 +
                      "patterns": [
249 +
                        {
250 +
                          "include": "#escapes"
251 +
                        }
252 +
                      ]
253 +
                    }
254 +
                  },
255 +
                  "match": "[-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*",
256 +
                  "name": "variable.parameter.style-name.css"
257 +
                }
258 +
              ]
259 +
            },
260 +
            {
261 +
              "begin": "\\{",
262 +
              "beginCaptures": {
263 +
                "0": {
264 +
                  "name": "punctuation.section.property-list.begin.bracket.curly.css"
265 +
                }
266 +
              },
267 +
              "end": "}",
268 +
              "endCaptures": {
269 +
                "0": {
270 +
                  "name": "punctuation.section.property-list.end.bracket.curly.css"
271 +
                }
272 +
              },
273 +
              "name": "meta.at-rule.counter-style.body.css",
274 +
              "patterns": [
275 +
                {
276 +
                  "include": "#comment-block"
277 +
                },
278 +
                {
279 +
                  "include": "#escapes"
280 +
                },
281 +
                {
282 +
                  "include": "#rule-list-innards"
283 +
                }
284 +
              ]
285 +
            }
286 +
          ]
287 +
        },
288 +
        {
289 +
          "begin": "(?i)(?=@document([\"';{\\s]|/\\*|$))",
290 +
          "end": "(?<=})(?!\\G)",
291 +
          "patterns": [
292 +
            {
293 +
              "begin": "(?i)\\G(@)document",
294 +
              "beginCaptures": {
295 +
                "0": {
296 +
                  "name": "keyword.control.at-rule.document.css"
297 +
                },
298 +
                "1": {
299 +
                  "name": "punctuation.definition.keyword.css"
300 +
                }
301 +
              },
302 +
              "end": "(?=\\s*[;{])",
303 +
              "name": "meta.at-rule.document.header.css",
304 +
              "patterns": [
305 +
                {
306 +
                  "begin": "(?i)(?<![-\\w])(url-prefix|domain|regexp)(\\()",
307 +
                  "beginCaptures": {
308 +
                    "1": {
309 +
                      "name": "support.function.document-rule.css"
310 +
                    },
311 +
                    "2": {
312 +
                      "name": "punctuation.section.function.begin.bracket.round.css"
313 +
                    }
314 +
                  },
315 +
                  "end": "\\)",
316 +
                  "endCaptures": {
317 +
                    "0": {
318 +
                      "name": "punctuation.section.function.end.bracket.round.css"
319 +
                    }
320 +
                  },
321 +
                  "name": "meta.function.document-rule.css",
322 +
                  "patterns": [
323 +
                    {
324 +
                      "include": "#string"
325 +
                    },
326 +
                    {
327 +
                      "include": "#comment-block"
328 +
                    },
329 +
                    {
330 +
                      "include": "#escapes"
331 +
                    },
332 +
                    {
333 +
                      "match": "[^\"')\\s]+",
334 +
                      "name": "variable.parameter.document-rule.css"
335 +
                    }
336 +
                  ]
337 +
                },
338 +
                {
339 +
                  "include": "#url"
340 +
                },
341 +
                {
342 +
                  "include": "#commas"
343 +
                },
344 +
                {
345 +
                  "include": "#comment-block"
346 +
                },
347 +
                {
348 +
                  "include": "#escapes"
349 +
                }
350 +
              ]
351 +
            },
352 +
            {
353 +
              "begin": "\\{",
354 +
              "beginCaptures": {
355 +
                "0": {
356 +
                  "name": "punctuation.section.document.begin.bracket.curly.css"
357 +
                }
358 +
              },
359 +
              "end": "}",
360 +
              "endCaptures": {
361 +
                "0": {
362 +
                  "name": "punctuation.section.document.end.bracket.curly.css"
363 +
                }
364 +
              },
365 +
              "name": "meta.at-rule.document.body.css",
366 +
              "patterns": [
367 +
                {
368 +
                  "include": "$self"
369 +
                }
370 +
              ]
371 +
            }
372 +
          ]
373 +
        },
374 +
        {
375 +
          "begin": "(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\"';{\\s]|/\\*|$))",
376 +
          "end": "(?<=})(?!\\G)",
377 +
          "patterns": [
378 +
            {
379 +
              "begin": "(?i)\\G(@)(?:-(?:webkit|moz|o|ms)-)?keyframes",
380 +
              "beginCaptures": {
381 +
                "0": {
382 +
                  "name": "keyword.control.at-rule.keyframes.css"
383 +
                },
384 +
                "1": {
385 +
                  "name": "punctuation.definition.keyword.css"
386 +
                }
387 +
              },
388 +
              "end": "(?=\\s*\\{)",
389 +
              "name": "meta.at-rule.keyframes.header.css",
390 +
              "patterns": [
391 +
                {
392 +
                  "include": "#comment-block"
393 +
                },
394 +
                {
395 +
                  "include": "#escapes"
396 +
                },
397 +
                {
398 +
                  "captures": {
399 +
                    "0": {
400 +
                      "patterns": [
401 +
                        {
402 +
                          "include": "#escapes"
403 +
                        }
404 +
                      ]
405 +
                    }
406 +
                  },
407 +
                  "match": "[-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*",
408 +
                  "name": "variable.parameter.keyframe-list.css"
409 +
                }
410 +
              ]
411 +
            },
412 +
            {
413 +
              "begin": "\\{",
414 +
              "beginCaptures": {
415 +
                "0": {
416 +
                  "name": "punctuation.section.keyframes.begin.bracket.curly.css"
417 +
                }
418 +
              },
419 +
              "end": "}",
420 +
              "endCaptures": {
421 +
                "0": {
422 +
                  "name": "punctuation.section.keyframes.end.bracket.curly.css"
423 +
                }
424 +
              },
425 +
              "name": "meta.at-rule.keyframes.body.css",
426 +
              "patterns": [
427 +
                {
428 +
                  "include": "#comment-block"
429 +
                },
430 +
                {
431 +
                  "include": "#escapes"
432 +
                },
433 +
                {
434 +
                  "captures": {
435 +
                    "1": {
436 +
                      "name": "entity.other.keyframe-offset.css"
437 +
                    },
438 +
                    "2": {
439 +
                      "name": "entity.other.keyframe-offset.percentage.css"
440 +
                    }
441 +
                  },
442 +
                  "match": "(?i)(?<![-\\w])(from|to)(?![-\\w])|([-+]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)%)"
443 +
                },
444 +
                {
445 +
                  "include": "#rule-list"
446 +
                }
447 +
              ]
448 +
            }
449 +
          ]
450 +
        },
451 +
        {
452 +
          "begin": "(?i)(?=@supports([(\\s]|/\\*|$))",
453 +
          "end": "(?<=})(?!\\G)|(?=;)",
454 +
          "patterns": [
455 +
            {
456 +
              "begin": "(?i)\\G(@)supports",
457 +
              "beginCaptures": {
458 +
                "0": {
459 +
                  "name": "keyword.control.at-rule.supports.css"
460 +
                },
461 +
                "1": {
462 +
                  "name": "punctuation.definition.keyword.css"
463 +
                }
464 +
              },
465 +
              "end": "(?=\\s*[;{])",
466 +
              "name": "meta.at-rule.supports.header.css",
467 +
              "patterns": [
468 +
                {
469 +
                  "include": "#feature-query-operators"
470 +
                },
471 +
                {
472 +
                  "include": "#feature-query"
473 +
                },
474 +
                {
475 +
                  "include": "#comment-block"
476 +
                },
477 +
                {
478 +
                  "include": "#escapes"
479 +
                }
480 +
              ]
481 +
            },
482 +
            {
483 +
              "begin": "\\{",
484 +
              "beginCaptures": {
485 +
                "0": {
486 +
                  "name": "punctuation.section.supports.begin.bracket.curly.css"
487 +
                }
488 +
              },
489 +
              "end": "}",
490 +
              "endCaptures": {
491 +
                "0": {
492 +
                  "name": "punctuation.section.supports.end.bracket.curly.css"
493 +
                }
494 +
              },
495 +
              "name": "meta.at-rule.supports.body.css",
496 +
              "patterns": [
497 +
                {
498 +
                  "include": "$self"
499 +
                }
500 +
              ]
501 +
            }
502 +
          ]
503 +
        },
504 +
        {
505 +
          "begin": "(?i)((@)(-(ms|o)-)?viewport)(?=[\"';{\\s]|/\\*|$)",
506 +
          "beginCaptures": {
507 +
            "1": {
508 +
              "name": "keyword.control.at-rule.viewport.css"
509 +
            },
510 +
            "2": {
511 +
              "name": "punctuation.definition.keyword.css"
512 +
            }
513 +
          },
514 +
          "end": "(?=\\s*[;@{])",
515 +
          "name": "meta.at-rule.viewport.css",
516 +
          "patterns": [
517 +
            {
518 +
              "include": "#comment-block"
519 +
            },
520 +
            {
521 +
              "include": "#escapes"
522 +
            }
523 +
          ]
524 +
        },
525 +
        {
526 +
          "begin": "(?i)((@)font-feature-values)(?=[\"';{\\s]|/\\*|$)\\s*",
527 +
          "beginCaptures": {
528 +
            "1": {
529 +
              "name": "keyword.control.at-rule.font-feature-values.css"
530 +
            },
531 +
            "2": {
532 +
              "name": "punctuation.definition.keyword.css"
533 +
            }
534 +
          },
535 +
          "contentName": "variable.parameter.font-name.css",
536 +
          "end": "(?=\\s*[;@{])",
537 +
          "name": "meta.at-rule.font-features.css",
538 +
          "patterns": [
539 +
            {
540 +
              "include": "#comment-block"
541 +
            },
542 +
            {
543 +
              "include": "#escapes"
544 +
            }
545 +
          ]
546 +
        },
547 +
        {
548 +
          "include": "#font-features"
549 +
        },
550 +
        {
551 +
          "begin": "(?i)((@)namespace)(?=[\"';\\s]|/\\*|$)",
552 +
          "beginCaptures": {
553 +
            "1": {
554 +
              "name": "keyword.control.at-rule.namespace.css"
555 +
            },
556 +
            "2": {
557 +
              "name": "punctuation.definition.keyword.css"
558 +
            }
559 +
          },
560 +
          "end": ";|(?=[@{])",
561 +
          "endCaptures": {
562 +
            "0": {
563 +
              "name": "punctuation.terminator.rule.css"
564 +
            }
565 +
          },
566 +
          "name": "meta.at-rule.namespace.css",
567 +
          "patterns": [
568 +
            {
569 +
              "include": "#url"
570 +
            },
571 +
            {
572 +
              "captures": {
573 +
                "1": {
574 +
                  "patterns": [
575 +
                    {
576 +
                      "include": "#comment-block"
577 +
                    }
578 +
                  ]
579 +
                },
580 +
                "2": {
581 +
                  "name": "entity.name.function.namespace-prefix.css",
582 +
                  "patterns": [
583 +
                    {
584 +
                      "include": "#escapes"
585 +
                    }
586 +
                  ]
587 +
                }
588 +
              },
589 +
              "match": "(?i)(?:\\G|^|(?<=\\s))(?=(?<=\\s|^)[-A-Z_a-z[^\\x00-\\x7F]]|\\s*/\\*(?:[^*]|\\*[^/])*\\*/)(.*?)([-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*)"
590 +
            },
591 +
            {
592 +
              "include": "#comment-block"
593 +
            },
594 +
            {
595 +
              "include": "#escapes"
596 +
            },
597 +
            {
598 +
              "include": "#string"
599 +
            }
600 +
          ]
601 +
        },
602 +
        {
603 +
          "begin": "(?i)(?=@[-\\w]+[^;]+;s*$)",
604 +
          "end": "(?<=;)(?!\\G)",
605 +
          "patterns": [
606 +
            {
607 +
              "begin": "(?i)\\G(@)[-\\w]+",
608 +
              "beginCaptures": {
609 +
                "0": {
610 +
                  "name": "keyword.control.at-rule.css"
611 +
                },
612 +
                "1": {
613 +
                  "name": "punctuation.definition.keyword.css"
614 +
                }
615 +
              },
616 +
              "end": ";",
617 +
              "endCaptures": {
618 +
                "0": {
619 +
                  "name": "punctuation.terminator.rule.css"
620 +
                }
621 +
              },
622 +
              "name": "meta.at-rule.header.css"
623 +
            }
624 +
          ]
625 +
        },
626 +
        {
627 +
          "begin": "(?i)(?=@[-\\w]+([({\\s]|/\\*|$))",
628 +
          "end": "(?<=})(?!\\G)",
629 +
          "patterns": [
630 +
            {
631 +
              "begin": "(?i)\\G(@)[-\\w]+",
632 +
              "beginCaptures": {
633 +
                "0": {
634 +
                  "name": "keyword.control.at-rule.css"
635 +
                },
636 +
                "1": {
637 +
                  "name": "punctuation.definition.keyword.css"
638 +
                }
639 +
              },
640 +
              "end": "(?=\\s*[;{])",
641 +
              "name": "meta.at-rule.header.css"
642 +
            },
643 +
            {
644 +
              "begin": "\\{",
645 +
              "beginCaptures": {
646 +
                "0": {
647 +
                  "name": "punctuation.section.begin.bracket.curly.css"
648 +
                }
649 +
              },
650 +
              "end": "}",
651 +
              "endCaptures": {
652 +
                "0": {
653 +
                  "name": "punctuation.section.end.bracket.curly.css"
654 +
                }
655 +
              },
656 +
              "name": "meta.at-rule.body.css",
657 +
              "patterns": [
658 +
                {
659 +
                  "include": "$self"
660 +
                }
661 +
              ]
662 +
            }
663 +
          ]
664 +
        }
665 +
      ]
666 +
    },
667 +
    "color-keywords": {
668 +
      "patterns": [
669 +
        {
670 +
          "match": "(?i)(?<![-\\w])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![-\\w])",
671 +
          "name": "support.constant.color.w3c-standard-color-name.css"
672 +
        },
673 +
        {
674 +
          "match": "(?i)(?<![-\\w])(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)(?![-\\w])",
675 +
          "name": "support.constant.color.w3c-extended-color-name.css"
676 +
        },
677 +
        {
678 +
          "match": "(?i)(?<![-\\w])currentColor(?![-\\w])",
679 +
          "name": "support.constant.color.current.css"
680 +
        },
681 +
        {
682 +
          "match": "(?i)(?<![-\\w])(ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText)(?![-\\w])",
683 +
          "name": "invalid.deprecated.color.system.css"
684 +
        }
685 +
      ]
686 +
    },
687 +
    "combinators": {
688 +
      "patterns": [
689 +
        {
690 +
          "match": "/deep/|>>>",
691 +
          "name": "invalid.deprecated.combinator.css"
692 +
        },
693 +
        {
694 +
          "match": ">>|[+>~]",
695 +
          "name": "keyword.operator.combinator.css"
696 +
        }
697 +
      ]
698 +
    },
699 +
    "commas": {
700 +
      "match": ",",
701 +
      "name": "punctuation.separator.list.comma.css"
702 +
    },
703 +
    "comment-block": {
704 +
      "begin": "/\\*",
705 +
      "beginCaptures": {
706 +
        "0": {
707 +
          "name": "punctuation.definition.comment.begin.css"
708 +
        }
709 +
      },
710 +
      "end": "\\*/",
711 +
      "endCaptures": {
712 +
        "0": {
713 +
          "name": "punctuation.definition.comment.end.css"
714 +
        }
715 +
      },
716 +
      "name": "comment.block.css"
717 +
    },
718 +
    "escapes": {
719 +
      "patterns": [
720 +
        {
721 +
          "match": "\\\\\\h{1,6}",
722 +
          "name": "constant.character.escape.codepoint.css"
723 +
        },
724 +
        {
725 +
          "begin": "\\\\$\\s*",
726 +
          "end": "^(?<!\\G)",
727 +
          "name": "constant.character.escape.newline.css"
728 +
        },
729 +
        {
730 +
          "match": "\\\\.",
731 +
          "name": "constant.character.escape.css"
732 +
        }
733 +
      ]
734 +
    },
735 +
    "feature-query": {
736 +
      "begin": "\\(",
737 +
      "beginCaptures": {
738 +
        "0": {
739 +
          "name": "punctuation.definition.condition.begin.bracket.round.css"
740 +
        }
741 +
      },
742 +
      "end": "\\)",
743 +
      "endCaptures": {
744 +
        "0": {
745 +
          "name": "punctuation.definition.condition.end.bracket.round.css"
746 +
        }
747 +
      },
748 +
      "name": "meta.feature-query.css",
749 +
      "patterns": [
750 +
        {
751 +
          "include": "#feature-query-operators"
752 +
        },
753 +
        {
754 +
          "include": "#feature-query"
755 +
        }
756 +
      ]
757 +
    },
758 +
    "feature-query-operators": {
759 +
      "patterns": [
760 +
        {
761 +
          "match": "(?i)(?<=[()\\s]|^|\\*/)(and|not|or)(?=[()\\s]|/\\*|$)",
762 +
          "name": "keyword.operator.logical.feature.$1.css"
763 +
        },
764 +
        {
765 +
          "include": "#rule-list-innards"
766 +
        }
767 +
      ]
768 +
    },
769 +
    "font-features": {
770 +
      "begin": "(?i)((@)(annotation|character-variant|ornaments|styleset|stylistic|swash))(?=[\"';@{\\s]|/\\*|$)",
771 +
      "beginCaptures": {
772 +
        "1": {
773 +
          "name": "keyword.control.at-rule.${3:/downcase}.css"
774 +
        },
775 +
        "2": {
776 +
          "name": "punctuation.definition.keyword.css"
777 +
        }
778 +
      },
779 +
      "end": "(?<=})",
780 +
      "name": "meta.at-rule.${3:/downcase}.css",
781 +
      "patterns": [
782 +
        {
783 +
          "begin": "\\{",
784 +
          "beginCaptures": {
785 +
            "0": {
786 +
              "name": "punctuation.section.property-list.begin.bracket.curly.css"
787 +
            }
788 +
          },
789 +
          "end": "}",
790 +
          "endCaptures": {
791 +
            "0": {
792 +
              "name": "punctuation.section.property-list.end.bracket.curly.css"
793 +
            }
794 +
          },
795 +
          "name": "meta.property-list.font-feature.css",
796 +
          "patterns": [
797 +
            {
798 +
              "captures": {
799 +
                "0": {
800 +
                  "patterns": [
801 +
                    {
802 +
                      "include": "#escapes"
803 +
                    }
804 +
                  ]
805 +
                }
806 +
              },
807 +
              "match": "[-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*",
808 +
              "name": "variable.font-feature.css"
809 +
            },
810 +
            {
811 +
              "include": "#rule-list-innards"
812 +
            }
813 +
          ]
814 +
        }
815 +
      ]
816 +
    },
817 +
    "functional-pseudo-classes": {
818 +
      "patterns": [
819 +
        {
820 +
          "begin": "(?i)((:)dir)(\\()",
821 +
          "beginCaptures": {
822 +
            "1": {
823 +
              "name": "entity.other.attribute-name.pseudo-class.css"
824 +
            },
825 +
            "2": {
826 +
              "name": "punctuation.definition.entity.css"
827 +
            },
828 +
            "3": {
829 +
              "name": "punctuation.section.function.begin.bracket.round.css"
830 +
            }
831 +
          },
832 +
          "end": "\\)",
833 +
          "endCaptures": {
834 +
            "0": {
835 +
              "name": "punctuation.section.function.end.bracket.round.css"
836 +
            }
837 +
          },
838 +
          "patterns": [
839 +
            {
840 +
              "include": "#comment-block"
841 +
            },
842 +
            {
843 +
              "include": "#escapes"
844 +
            },
845 +
            {
846 +
              "match": "(?i)(?<![-\\w])(ltr|rtl)(?![-\\w])",
847 +
              "name": "support.constant.text-direction.css"
848 +
            },
849 +
            {
850 +
              "include": "#property-values"
851 +
            }
852 +
          ]
853 +
        },
854 +
        {
855 +
          "begin": "(?i)((:)lang)(\\()",
856 +
          "beginCaptures": {
857 +
            "1": {
858 +
              "name": "entity.other.attribute-name.pseudo-class.css"
859 +
            },
860 +
            "2": {
861 +
              "name": "punctuation.definition.entity.css"
862 +
            },
863 +
            "3": {
864 +
              "name": "punctuation.section.function.begin.bracket.round.css"
865 +
            }
866 +
          },
867 +
          "end": "\\)",
868 +
          "endCaptures": {
869 +
            "0": {
870 +
              "name": "punctuation.section.function.end.bracket.round.css"
871 +
            }
872 +
          },
873 +
          "patterns": [
874 +
            {
875 +
              "match": "(?<=[(,\\s])[A-Za-z]+(-[0-9A-Za-z]*|\\\\(?:\\h{1,6}|.))*(?=[),\\s])",
876 +
              "name": "support.constant.language-range.css"
877 +
            },
878 +
            {
879 +
              "begin": "\"",
880 +
              "beginCaptures": {
881 +
                "0": {
882 +
                  "name": "punctuation.definition.string.begin.css"
883 +
                }
884 +
              },
885 +
              "end": "\"",
886 +
              "endCaptures": {
887 +
                "0": {
888 +
                  "name": "punctuation.definition.string.end.css"
889 +
                }
890 +
              },
891 +
              "name": "string.quoted.double.css",
892 +
              "patterns": [
893 +
                {
894 +
                  "include": "#escapes"
895 +
                },
896 +
                {
897 +
                  "match": "(?<=[\"\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=[\"\\s])",
898 +
                  "name": "support.constant.language-range.css"
899 +
                }
900 +
              ]
901 +
            },
902 +
            {
903 +
              "begin": "'",
904 +
              "beginCaptures": {
905 +
                "0": {
906 +
                  "name": "punctuation.definition.string.begin.css"
907 +
                }
908 +
              },
909 +
              "end": "'",
910 +
              "endCaptures": {
911 +
                "0": {
912 +
                  "name": "punctuation.definition.string.end.css"
913 +
                }
914 +
              },
915 +
              "name": "string.quoted.single.css",
916 +
              "patterns": [
917 +
                {
918 +
                  "include": "#escapes"
919 +
                },
920 +
                {
921 +
                  "match": "(?<=['\\s])[*A-Za-z]+(-[*0-9A-Za-z]*)*(?=['\\s])",
922 +
                  "name": "support.constant.language-range.css"
923 +
                }
924 +
              ]
925 +
            },
926 +
            {
927 +
              "include": "#commas"
928 +
            }
929 +
          ]
930 +
        },
931 +
        {
932 +
          "begin": "(?i)((:)(?:not|has|matches|where|is))(\\()",
933 +
          "beginCaptures": {
934 +
            "1": {
935 +
              "name": "entity.other.attribute-name.pseudo-class.css"
936 +
            },
937 +
            "2": {
938 +
              "name": "punctuation.definition.entity.css"
939 +
            },
940 +
            "3": {
941 +
              "name": "punctuation.section.function.begin.bracket.round.css"
942 +
            }
943 +
          },
944 +
          "end": "\\)",
945 +
          "endCaptures": {
946 +
            "0": {
947 +
              "name": "punctuation.section.function.end.bracket.round.css"
948 +
            }
949 +
          },
950 +
          "patterns": [
951 +
            {
952 +
              "include": "#selector-innards"
953 +
            }
954 +
          ]
955 +
        },
956 +
        {
957 +
          "begin": "(?i)((:)nth-(?:last-)?(?:child|of-type))(\\()",
958 +
          "beginCaptures": {
959 +
            "1": {
960 +
              "name": "entity.other.attribute-name.pseudo-class.css"
961 +
            },
962 +
            "2": {
963 +
              "name": "punctuation.definition.entity.css"
964 +
            },
965 +
            "3": {
966 +
              "name": "punctuation.section.function.begin.bracket.round.css"
967 +
            }
968 +
          },
969 +
          "end": "\\)",
970 +
          "endCaptures": {
971 +
            "0": {
972 +
              "name": "punctuation.section.function.end.bracket.round.css"
973 +
            }
974 +
          },
975 +
          "patterns": [
976 +
            {
977 +
              "match": "(?i)[-+]?(\\d+n?|n)(\\s*[-+]\\s*\\d+)?",
978 +
              "name": "constant.numeric.css"
979 +
            },
980 +
            {
981 +
              "match": "(?i)even|odd",
982 +
              "name": "support.constant.parity.css"
983 +
            }
984 +
          ]
985 +
        }
986 +
      ]
987 +
    },
988 +
    "functions": {
989 +
      "patterns": [
990 +
        {
991 +
          "begin": "(?i)(?<![-\\w])(calc)(\\()",
992 +
          "beginCaptures": {
993 +
            "1": {
994 +
              "name": "support.function.calc.css"
995 +
            },
996 +
            "2": {
997 +
              "name": "punctuation.section.function.begin.bracket.round.css"
998 +
            }
999 +
          },
1000 +
          "end": "\\)",
1001 +
          "endCaptures": {
1002 +
            "0": {
1003 +
              "name": "punctuation.section.function.end.bracket.round.css"
1004 +
            }
1005 +
          },
1006 +
          "name": "meta.function.calc.css",
1007 +
          "patterns": [
1008 +
            {
1009 +
              "match": "[*/]|(?<=\\s|^)[-+](?=\\s|$)",
1010 +
              "name": "keyword.operator.arithmetic.css"
1011 +
            },
1012 +
            {
1013 +
              "include": "#property-values"
1014 +
            }
1015 +
          ]
1016 +
        },
1017 +
        {
1018 +
          "begin": "(?i)(?<![-\\w])(rgba?|hsla?|hwb|lab|oklab|lch|oklch|color)(\\()",
1019 +
          "beginCaptures": {
1020 +
            "1": {
1021 +
              "name": "support.function.misc.css"
1022 +
            },
1023 +
            "2": {
1024 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1025 +
            }
1026 +
          },
1027 +
          "end": "\\)",
1028 +
          "endCaptures": {
1029 +
            "0": {
1030 +
              "name": "punctuation.section.function.end.bracket.round.css"
1031 +
            }
1032 +
          },
1033 +
          "name": "meta.function.color.css",
1034 +
          "patterns": [
1035 +
            {
1036 +
              "include": "#property-values"
1037 +
            }
1038 +
          ]
1039 +
        },
1040 +
        {
1041 +
          "begin": "(?i)(?<![-\\w])((?:-(?:webkit-|moz-|o-))?(?:repeating-)?(?:linear|radial|conic)-gradient)(\\()",
1042 +
          "beginCaptures": {
1043 +
            "1": {
1044 +
              "name": "support.function.gradient.css"
1045 +
            },
1046 +
            "2": {
1047 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1048 +
            }
1049 +
          },
1050 +
          "end": "\\)",
1051 +
          "endCaptures": {
1052 +
            "0": {
1053 +
              "name": "punctuation.section.function.end.bracket.round.css"
1054 +
            }
1055 +
          },
1056 +
          "name": "meta.function.gradient.css",
1057 +
          "patterns": [
1058 +
            {
1059 +
              "match": "(?i)(?<![-\\w])(from|to|at|in|hue)(?![-\\w])",
1060 +
              "name": "keyword.operator.gradient.css"
1061 +
            },
1062 +
            {
1063 +
              "include": "#property-values"
1064 +
            }
1065 +
          ]
1066 +
        },
1067 +
        {
1068 +
          "begin": "(?i)(?<![-\\w])(-webkit-gradient)(\\()",
1069 +
          "beginCaptures": {
1070 +
            "1": {
1071 +
              "name": "invalid.deprecated.gradient.function.css"
1072 +
            },
1073 +
            "2": {
1074 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1075 +
            }
1076 +
          },
1077 +
          "end": "\\)",
1078 +
          "endCaptures": {
1079 +
            "0": {
1080 +
              "name": "punctuation.section.function.end.bracket.round.css"
1081 +
            }
1082 +
          },
1083 +
          "name": "meta.function.gradient.invalid.deprecated.gradient.css",
1084 +
          "patterns": [
1085 +
            {
1086 +
              "begin": "(?i)(?<![-\\w])(from|to|color-stop)(\\()",
1087 +
              "beginCaptures": {
1088 +
                "1": {
1089 +
                  "name": "invalid.deprecated.function.css"
1090 +
                },
1091 +
                "2": {
1092 +
                  "name": "punctuation.section.function.begin.bracket.round.css"
1093 +
                }
1094 +
              },
1095 +
              "end": "\\)",
1096 +
              "endCaptures": {
1097 +
                "0": {
1098 +
                  "name": "punctuation.section.function.end.bracket.round.css"
1099 +
                }
1100 +
              },
1101 +
              "patterns": [
1102 +
                {
1103 +
                  "include": "#property-values"
1104 +
                }
1105 +
              ]
1106 +
            },
1107 +
            {
1108 +
              "include": "#property-values"
1109 +
            }
1110 +
          ]
1111 +
        },
1112 +
        {
1113 +
          "begin": "(?i)(?<![-\\w])(annotation|attr|blur|brightness|character-variant|clamp|contrast|counters?|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate|color-mix|image-set|invert|local|max|min|minmax|opacity|ornaments|repeat|saturate|sepia|styleset|stylistic|swash|symbols|cos|sin|tan|acos|asin|atan2??|hypot|sqrt|pow|log|exp|abs|sign)(\\()",
1114 +
          "beginCaptures": {
1115 +
            "1": {
1116 +
              "name": "support.function.misc.css"
1117 +
            },
1118 +
            "2": {
1119 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1120 +
            }
1121 +
          },
1122 +
          "end": "\\)",
1123 +
          "endCaptures": {
1124 +
            "0": {
1125 +
              "name": "punctuation.section.function.end.bracket.round.css"
1126 +
            }
1127 +
          },
1128 +
          "name": "meta.function.misc.css",
1129 +
          "patterns": [
1130 +
            {
1131 +
              "match": "(?i)(?<=[\",\\s]|\\*/|^)\\d+x(?=[\"'),\\s]|/\\*|$)",
1132 +
              "name": "constant.numeric.other.density.css"
1133 +
            },
1134 +
            {
1135 +
              "include": "#property-values"
1136 +
            },
1137 +
            {
1138 +
              "match": "[^\"'),\\s]+",
1139 +
              "name": "variable.parameter.misc.css"
1140 +
            }
1141 +
          ]
1142 +
        },
1143 +
        {
1144 +
          "begin": "(?i)(?<![-\\w])(circle|ellipse|inset|polygon|rect)(\\()",
1145 +
          "beginCaptures": {
1146 +
            "1": {
1147 +
              "name": "support.function.shape.css"
1148 +
            },
1149 +
            "2": {
1150 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1151 +
            }
1152 +
          },
1153 +
          "end": "\\)",
1154 +
          "endCaptures": {
1155 +
            "0": {
1156 +
              "name": "punctuation.section.function.end.bracket.round.css"
1157 +
            }
1158 +
          },
1159 +
          "name": "meta.function.shape.css",
1160 +
          "patterns": [
1161 +
            {
1162 +
              "match": "(?i)(?<=\\s|^|\\*/)(at|round)(?=\\s|/\\*|$)",
1163 +
              "name": "keyword.operator.shape.css"
1164 +
            },
1165 +
            {
1166 +
              "include": "#property-values"
1167 +
            }
1168 +
          ]
1169 +
        },
1170 +
        {
1171 +
          "begin": "(?i)(?<![-\\w])(cubic-bezier|steps)(\\()",
1172 +
          "beginCaptures": {
1173 +
            "1": {
1174 +
              "name": "support.function.timing-function.css"
1175 +
            },
1176 +
            "2": {
1177 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1178 +
            }
1179 +
          },
1180 +
          "end": "\\)",
1181 +
          "endCaptures": {
1182 +
            "0": {
1183 +
              "name": "punctuation.section.function.end.bracket.round.css"
1184 +
            }
1185 +
          },
1186 +
          "name": "meta.function.timing-function.css",
1187 +
          "patterns": [
1188 +
            {
1189 +
              "match": "(?i)(?<![-\\w])(start|end)(?=\\s*\\)|$)",
1190 +
              "name": "support.constant.step-direction.css"
1191 +
            },
1192 +
            {
1193 +
              "include": "#property-values"
1194 +
            }
1195 +
          ]
1196 +
        },
1197 +
        {
1198 +
          "begin": "(?i)(?<![-\\w])((?:translate|scale|rotate)(?:[XYZ]|3D)?|matrix(?:3D)?|skew[XY]?|perspective)(\\()",
1199 +
          "beginCaptures": {
1200 +
            "1": {
1201 +
              "name": "support.function.transform.css"
1202 +
            },
1203 +
            "2": {
1204 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1205 +
            }
1206 +
          },
1207 +
          "end": "\\)",
1208 +
          "endCaptures": {
1209 +
            "0": {
1210 +
              "name": "punctuation.section.function.end.bracket.round.css"
1211 +
            }
1212 +
          },
1213 +
          "patterns": [
1214 +
            {
1215 +
              "include": "#property-values"
1216 +
            }
1217 +
          ]
1218 +
        },
1219 +
        {
1220 +
          "include": "#url"
1221 +
        },
1222 +
        {
1223 +
          "begin": "(?i)(?<![-\\w])(var)(\\()",
1224 +
          "beginCaptures": {
1225 +
            "1": {
1226 +
              "name": "support.function.misc.css"
1227 +
            },
1228 +
            "2": {
1229 +
              "name": "punctuation.section.function.begin.bracket.round.css"
1230 +
            }
1231 +
          },
1232 +
          "end": "\\)",
1233 +
          "endCaptures": {
1234 +
            "0": {
1235 +
              "name": "punctuation.section.function.end.bracket.round.css"
1236 +
            }
1237 +
          },
1238 +
          "name": "meta.function.variable.css",
1239 +
          "patterns": [
1240 +
            {
1241 +
              "match": "--[-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*",
1242 +
              "name": "variable.argument.css"
1243 +
            },
1244 +
            {
1245 +
              "include": "#property-values"
1246 +
            }
1247 +
          ]
1248 +
        }
1249 +
      ]
1250 +
    },
1251 +
    "media-feature-keywords": {
1252 +
      "match": "(?i)(?<=^|[:\\s]|\\*/)(?:portrait|landscape|progressive|interlace|fullscreen|standalone|minimal-ui|browser|hover)(?=[)\\s]|$)",
1253 +
      "name": "support.constant.property-value.css"
1254 +
    },
1255 +
    "media-features": {
1256 +
      "captures": {
1257 +
        "1": {
1258 +
          "name": "support.type.property-name.media.css"
1259 +
        },
1260 +
        "2": {
1261 +
          "name": "support.type.property-name.media.css"
1262 +
        },
1263 +
        "3": {
1264 +
          "name": "support.type.vendored.property-name.media.css"
1265 +
        }
1266 +
      },
1267 +
      "match": "(?i)(?<=^|[(\\s]|\\*/)(?:((?:m(?:in-|ax-))?(?:height|width|aspect-ratio|color|color-index|monochrome|resolution)|grid|scan|orientation|display-mode|hover)|((?:m(?:in-|ax-))?device-(?:height|width|aspect-ratio))|((?:[-_](?:webkit|apple|khtml|epub|moz|ms|o|xv|ah|rim|atsc|hp|tc|wap|ro)|(?:mso|prince))-[-\\w]+(?=\\s*(?:/\\*(?:[^*]|\\*[^/])*\\*/)?\\s*[):])))(?=\\s|$|[):<=>]|/\\*)"
1268 +
    },
1269 +
    "media-query": {
1270 +
      "begin": "\\G",
1271 +
      "end": "(?=\\s*[;{])",
1272 +
      "patterns": [
1273 +
        {
1274 +
          "include": "#comment-block"
1275 +
        },
1276 +
        {
1277 +
          "include": "#escapes"
1278 +
        },
1279 +
        {
1280 +
          "include": "#media-types"
1281 +
        },
1282 +
        {
1283 +
          "match": "(?i)(?<=\\s|^|,|\\*/)(only|not)(?=[{\\s]|/\\*|$)",
1284 +
          "name": "keyword.operator.logical.$1.media.css"
1285 +
        },
1286 +
        {
1287 +
          "match": "(?i)(?<=\\s|^|\\*/|\\))and(?=\\s|/\\*|$)",
1288 +
          "name": "keyword.operator.logical.and.media.css"
1289 +
        },
1290 +
        {
1291 +
          "match": ",(?:(?:\\s*,)+|(?=\\s*[);{]))",
1292 +
          "name": "invalid.illegal.comma.css"
1293 +
        },
1294 +
        {
1295 +
          "include": "#commas"
1296 +
        },
1297 +
        {
1298 +
          "begin": "\\(",
1299 +
          "beginCaptures": {
1300 +
            "0": {
1301 +
              "name": "punctuation.definition.parameters.begin.bracket.round.css"
1302 +
            }
1303 +
          },
1304 +
          "end": "\\)",
1305 +
          "endCaptures": {
1306 +
            "0": {
1307 +
              "name": "punctuation.definition.parameters.end.bracket.round.css"
1308 +
            }
1309 +
          },
1310 +
          "patterns": [
1311 +
            {
1312 +
              "include": "#media-features"
1313 +
            },
1314 +
            {
1315 +
              "include": "#media-feature-keywords"
1316 +
            },
1317 +
            {
1318 +
              "match": ":",
1319 +
              "name": "punctuation.separator.key-value.css"
1320 +
            },
1321 +
            {
1322 +
              "match": ">=|<=|[<=>]",
1323 +
              "name": "keyword.operator.comparison.css"
1324 +
            },
1325 +
            {
1326 +
              "captures": {
1327 +
                "1": {
1328 +
                  "name": "constant.numeric.css"
1329 +
                },
1330 +
                "2": {
1331 +
                  "name": "keyword.operator.arithmetic.css"
1332 +
                },
1333 +
                "3": {
1334 +
                  "name": "constant.numeric.css"
1335 +
                }
1336 +
              },
1337 +
              "match": "(\\d+)\\s*(/)\\s*(\\d+)",
1338 +
              "name": "meta.ratio.css"
1339 +
            },
1340 +
            {
1341 +
              "include": "#numeric-values"
1342 +
            },
1343 +
            {
1344 +
              "include": "#comment-block"
1345 +
            }
1346 +
          ]
1347 +
        }
1348 +
      ]
1349 +
    },
1350 +
    "media-query-list": {
1351 +
      "begin": "(?=\\s*[^;{])",
1352 +
      "end": "(?=\\s*[;{])",
1353 +
      "patterns": [
1354 +
        {
1355 +
          "include": "#media-query"
1356 +
        }
1357 +
      ]
1358 +
    },
1359 +
    "media-types": {
1360 +
      "captures": {
1361 +
        "1": {
1362 +
          "name": "support.constant.media.css"
1363 +
        },
1364 +
        "2": {
1365 +
          "name": "invalid.deprecated.constant.media.css"
1366 +
        }
1367 +
      },
1368 +
      "match": "(?i)(?<=^|[,\\s]|\\*/)(?:(all|print|screen|speech)|(aural|braille|embossed|handheld|projection|tty|tv))(?=$|[,;{\\s]|/\\*)"
1369 +
    },
1370 +
    "numeric-values": {
1371 +
      "patterns": [
1372 +
        {
1373 +
          "captures": {
1374 +
            "1": {
1375 +
              "name": "punctuation.definition.constant.css"
1376 +
            }
1377 +
          },
1378 +
          "match": "(#)(?:\\h{3,4}|\\h{6}|\\h{8})\\b",
1379 +
          "name": "constant.other.color.rgb-value.hex.css"
1380 +
        },
1381 +
        {
1382 +
          "captures": {
1383 +
            "1": {
1384 +
              "name": "keyword.other.unit.percentage.css"
1385 +
            },
1386 +
            "2": {
1387 +
              "name": "keyword.other.unit.${2:/downcase}.css"
1388 +
            }
1389 +
          },
1390 +
          "match": "(?i)(?<![-\\w])[-+]?(?:[0-9]+(?:\\.[0-9]+)?|\\.[0-9]+)(?:(?<=[0-9])E[-+]?[0-9]+)?(?:(%)|(deg|grad|rad|turn|Hz|kHz|ch|cm|em|ex|fr|in|mm|mozmm|pc|pt|px|q|rem|rch|rex|rlh|ic|ric|rcap|vh|vw|vb|vi|svh|svw|svb|svi|dvh|dvw|dvb|dvi|lvh|lvw|lvb|lvi|vmax|vmin|cqw|cqi|cqh|cqb|cqmin|cqmax|dpi|dpcm|dppx|s|ms)\\b)?",
1391 +
          "name": "constant.numeric.css"
1392 +
        }
1393 +
      ]
1394 +
    },
1395 +
    "property-keywords": {
1396 +
      "patterns": []
1397 +
    },
1398 +
    "property-names": {
1399 +
      "patterns": [
1400 +
        {
1401 +
          "match": "(?<![-\\w])-?(?:[_A-Za-z]|[^\\x00-\\x7F])(?:[-0-9_A-Za-z]|[^\\x00-\\x7F]|\\\\(?:\\h{1,6}|.))*",
1402 +
          "name": "support.type.property-name.css"
1403 +
        }
1404 +
      ]
1405 +
    },
1406 +
    "property-values": {
1407 +
      "patterns": [
1408 +
        {
1409 +
          "include": "#commas"
1410 +
        },
1411 +
        {
1412 +
          "include": "#comment-block"
1413 +
        },
1414 +
        {
1415 +
          "include": "#escapes"
1416 +
        },
1417 +
        {
1418 +
          "include": "#functions"
1419 +
        },
1420 +
        {
1421 +
          "include": "#property-keywords"
1422 +
        },
1423 +
        {
1424 +
          "include": "#unicode-range"
1425 +
        },
1426 +
        {
1427 +
          "include": "#numeric-values"
1428 +
        },
1429 +
        {
1430 +
          "include": "#color-keywords"
1431 +
        },
1432 +
        {
1433 +
          "include": "#string"
1434 +
        },
1435 +
        {
1436 +
          "match": "!\\s*important(?![-\\w])",
1437 +
          "name": "keyword.other.important.css"
1438 +
        }
1439 +
      ]
1440 +
    },
1441 +
    "pseudo-classes": {
1442 +
      "captures": {
1443 +
        "1": {
1444 +
          "name": "punctuation.definition.entity.css"
1445 +
        },
1446 +
        "2": {
1447 +
          "name": "invalid.illegal.colon.css"
1448 +
        }
1449 +
      },
1450 +
      "match": "(?i)(:)(:*)(?:active|any-link|checked|default|disabled|empty|enabled|first|(?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within|fullscreen|host|hover|in-range|indeterminate|invalid|left|link|optional|out-of-range|read-only|read-write|required|right|root|scope|target|unresolved|valid|visited)(?![-\\w]|\\s*[;}])",
1451 +
      "name": "entity.other.attribute-name.pseudo-class.css"
1452 +
    },
1453 +
    "pseudo-elements": {
1454 +
      "captures": {
1455 +
        "1": {
1456 +
          "name": "punctuation.definition.entity.css"
1457 +
        },
1458 +
        "2": {
1459 +
          "name": "punctuation.definition.entity.css"
1460 +
        }
1461 +
      },
1462 +
      "match": "(?i)(?:(::?)(?:after|before|first-letter|first-line|(?:-(?:ah|apple|atsc|epub|hp|khtml|moz|ms|o|rim|ro|tc|wap|webkit|xv)|(?:mso|prince))-[-a-z]+)|(::)(?:backdrop|content|grammar-error|marker|placeholder|selection|shadow|spelling-error))(?![-\\w]|\\s*[;}])",
1463 +
      "name": "entity.other.attribute-name.pseudo-element.css"
1464 +
    },
1465 +
    "rule-list": {
1466 +
      "begin": "\\{",
1467 +
      "beginCaptures": {
1468 +
        "0": {
1469 +
          "name": "punctuation.section.property-list.begin.bracket.curly.css"
1470 +
        }
1471 +
      },
1472 +
      "end": "}",
1473 +
      "endCaptures": {
1474 +
        "0": {
1475 +
          "name": "punctuation.section.property-list.end.bracket.curly.css"
1476 +
        }
1477 +
      },
1478 +
      "name": "meta.property-list.css",
1479 +
      "patterns": [
1480 +
        {
1481 +
          "include": "#rule-list-innards"
1482 +
        }
1483 +
      ]
1484 +
    },
1485 +
    "rule-list-innards": {
1486 +
      "patterns": [
1487 +
        {
1488 +
          "include": "#comment-block"
1489 +
        },
1490 +
        {
1491 +
          "include": "#escapes"
1492 +
        },
1493 +
        {
1494 +
          "include": "#font-features"
1495 +
        },
1496 +
        {
1497 +
          "match": "(?<![-\\w])--[-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*",
1498 +
          "name": "variable.css"
1499 +
        },
1500 +
        {
1501 +
          "begin": "(?<![-A-Za-z])(?=[-A-Za-z])",
1502 +
          "end": "$|(?![-A-Za-z])",
1503 +
          "name": "meta.property-name.css",
1504 +
          "patterns": [
1505 +
            {
1506 +
              "include": "#property-names"
1507 +
            }
1508 +
          ]
1509 +
        },
1510 +
        {
1511 +
          "begin": "(:)\\s*",
1512 +
          "beginCaptures": {
1513 +
            "1": {
1514 +
              "name": "punctuation.separator.key-value.css"
1515 +
            }
1516 +
          },
1517 +
          "contentName": "meta.property-value.css",
1518 +
          "end": "\\s*(;)|\\s*(?=[)}])",
1519 +
          "endCaptures": {
1520 +
            "1": {
1521 +
              "name": "punctuation.terminator.rule.css"
1522 +
            }
1523 +
          },
1524 +
          "patterns": [
1525 +
            {
1526 +
              "include": "#comment-block"
1527 +
            },
1528 +
            {
1529 +
              "include": "#property-values"
1530 +
            }
1531 +
          ]
1532 +
        },
1533 +
        {
1534 +
          "match": ";",
1535 +
          "name": "punctuation.terminator.rule.css"
1536 +
        }
1537 +
      ]
1538 +
    },
1539 +
    "selector": {
1540 +
      "begin": "(?=\\|?(?:[-#*.:A-\\[_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.)))",
1541 +
      "end": "(?=\\s*[)/@{])",
1542 +
      "name": "meta.selector.css",
1543 +
      "patterns": [
1544 +
        {
1545 +
          "include": "#selector-innards"
1546 +
        }
1547 +
      ]
1548 +
    },
1549 +
    "selector-innards": {
1550 +
      "patterns": [
1551 +
        {
1552 +
          "include": "#comment-block"
1553 +
        },
1554 +
        {
1555 +
          "include": "#commas"
1556 +
        },
1557 +
        {
1558 +
          "include": "#escapes"
1559 +
        },
1560 +
        {
1561 +
          "include": "#combinators"
1562 +
        },
1563 +
        {
1564 +
          "captures": {
1565 +
            "1": {
1566 +
              "name": "entity.other.namespace-prefix.css"
1567 +
            },
1568 +
            "2": {
1569 +
              "name": "punctuation.separator.css"
1570 +
            }
1571 +
          },
1572 +
          "match": "(?:^|(?<=[(,;}\\s]))(?![-*\\w]+\\|(?![-#*.:A-\\[_a-z[^\\x00-\\x7F]]))([-A-Z_a-z[^\\x00-\\x7F]](?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*|\\*)?(\\|)"
1573 +
        },
1574 +
        {
1575 +
          "include": "#tag-names"
1576 +
        },
1577 +
        {
1578 +
          "match": "\\*",
1579 +
          "name": "entity.name.tag.wildcard.css"
1580 +
        },
1581 +
        {
1582 +
          "captures": {
1583 +
            "1": {
1584 +
              "name": "punctuation.definition.entity.css"
1585 +
            },
1586 +
            "2": {
1587 +
              "patterns": [
1588 +
                {
1589 +
                  "include": "#escapes"
1590 +
                }
1591 +
              ]
1592 +
            }
1593 +
          },
1594 +
          "match": "(?<![-@\\w])([#.])((?:-?[0-9]|-(?=$|[#)+,.:>\\[{|~\\s]|/\\*)|(?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*(?:[]!\"%-(*;<?@^`|}]|/(?!\\*))+)(?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))*)",
1595 +
          "name": "invalid.illegal.bad-identifier.css"
1596 +
        },
1597 +
        {
1598 +
          "captures": {
1599 +
            "1": {
1600 +
              "name": "punctuation.definition.entity.css"
1601 +
            },
1602 +
            "2": {
1603 +
              "patterns": [
1604 +
                {
1605 +
                  "include": "#escapes"
1606 +
                }
1607 +
              ]
1608 +
            }
1609 +
          },
1610 +
          "match": "(\\.)((?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))+)(?=$|[#)+,.:>\\[{|~\\s]|/\\*)",
1611 +
          "name": "entity.other.attribute-name.class.css"
1612 +
        },
1613 +
        {
1614 +
          "captures": {
1615 +
            "1": {
1616 +
              "name": "punctuation.definition.entity.css"
1617 +
            },
1618 +
            "2": {
1619 +
              "patterns": [
1620 +
                {
1621 +
                  "include": "#escapes"
1622 +
                }
1623 +
              ]
1624 +
            }
1625 +
          },
1626 +
          "match": "(#)(-?(?![0-9])(?:[-0-9A-Z_a-z[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))+)(?=$|[#)+,.:>\\[{|~\\s]|/\\*)",
1627 +
          "name": "entity.other.attribute-name.id.css"
1628 +
        },
1629 +
        {
1630 +
          "begin": "\\[",
1631 +
          "beginCaptures": {
1632 +
            "0": {
1633 +
              "name": "punctuation.definition.entity.begin.bracket.square.css"
1634 +
            }
1635 +
          },
1636 +
          "end": "]",
1637 +
          "endCaptures": {
1638 +
            "0": {
1639 +
              "name": "punctuation.definition.entity.end.bracket.square.css"
1640 +
            }
1641 +
          },
1642 +
          "name": "meta.attribute-selector.css",
1643 +
          "patterns": [
1644 +
            {
1645 +
              "include": "#comment-block"
1646 +
            },
1647 +
            {
1648 +
              "include": "#string"
1649 +
            },
1650 +
            {
1651 +
              "captures": {
1652 +
                "1": {
1653 +
                  "name": "storage.modifier.ignore-case.css"
1654 +
                }
1655 +
              },
1656 +
              "match": "(?<=[\"'\\s]|^|\\*/)\\s*([Ii])\\s*(?=[]\\s]|/\\*|$)"
1657 +
            },
1658 +
            {
1659 +
              "captures": {
1660 +
                "1": {
1661 +
                  "name": "string.unquoted.attribute-value.css",
1662 +
                  "patterns": [
1663 +
                    {
1664 +
                      "include": "#escapes"
1665 +
                    }
1666 +
                  ]
1667 +
                }
1668 +
              },
1669 +
              "match": "(?<==)\\s*((?!/\\*)(?:[^]\"'\\\\\\s]|\\\\.)+)"
1670 +
            },
1671 +
            {
1672 +
              "include": "#escapes"
1673 +
            },
1674 +
            {
1675 +
              "match": "[$*^|~]?=",
1676 +
              "name": "keyword.operator.pattern.css"
1677 +
            },
1678 +
            {
1679 +
              "match": "\\|",
1680 +
              "name": "punctuation.separator.css"
1681 +
            },
1682 +
            {
1683 +
              "captures": {
1684 +
                "1": {
1685 +
                  "name": "entity.other.namespace-prefix.css",
1686 +
                  "patterns": [
1687 +
                    {
1688 +
                      "include": "#escapes"
1689 +
                    }
1690 +
                  ]
1691 +
                }
1692 +
              },
1693 +
              "match": "(-?(?!\\d)(?:[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))+|\\*)(?=\\|(?![=\\s]|$|])(?:-?(?!\\d)|[-\\\\\\w[^\\x00-\\x7F]]))"
1694 +
            },
1695 +
            {
1696 +
              "captures": {
1697 +
                "1": {
1698 +
                  "name": "entity.other.attribute-name.css",
1699 +
                  "patterns": [
1700 +
                    {
1701 +
                      "include": "#escapes"
1702 +
                    }
1703 +
                  ]
1704 +
                }
1705 +
              },
1706 +
              "match": "(-?(?!\\d)(?>[-\\w[^\\x00-\\x7F]]|\\\\(?:\\h{1,6}|.))+)\\s*(?=[]$*=^|~]|/\\*)"
1707 +
            }
1708 +
          ]
1709 +
        },
1710 +
        {
1711 +
          "include": "#pseudo-classes"
1712 +
        },
1713 +
        {
1714 +
          "include": "#pseudo-elements"
1715 +
        },
1716 +
        {
1717 +
          "include": "#functional-pseudo-classes"
1718 +
        },
1719 +
        {
1720 +
          "match": "(?<![-@\\w])(?=[a-z]\\w*-)(?:(?![A-Z])[-\\w])+(?![-(\\w])",
1721 +
          "name": "entity.name.tag.custom.css"
1722 +
        }
1723 +
      ]
1724 +
    },
1725 +
    "string": {
1726 +
      "patterns": [
1727 +
        {
1728 +
          "begin": "\"",
1729 +
          "beginCaptures": {
1730 +
            "0": {
1731 +
              "name": "punctuation.definition.string.begin.css"
1732 +
            }
1733 +
          },
1734 +
          "end": "\"|(?<!\\\\)(?=$|\\n)",
1735 +
          "endCaptures": {
1736 +
            "0": {
1737 +
              "name": "punctuation.definition.string.end.css"
1738 +
            }
1739 +
          },
1740 +
          "name": "string.quoted.double.css",
1741 +
          "patterns": [
1742 +
            {
1743 +
              "begin": "(?:\\G|^)(?=(?:[^\"\\\\]|\\\\.)+$)",
1744 +
              "end": "$",
1745 +
              "name": "invalid.illegal.unclosed.string.css",
1746 +
              "patterns": [
1747 +
                {
1748 +
                  "include": "#escapes"
1749 +
                }
1750 +
              ]
1751 +
            },
1752 +
            {
1753 +
              "include": "#escapes"
1754 +
            }
1755 +
          ]
1756 +
        },
1757 +
        {
1758 +
          "begin": "'",
1759 +
          "beginCaptures": {
1760 +
            "0": {
1761 +
              "name": "punctuation.definition.string.begin.css"
1762 +
            }
1763 +
          },
1764 +
          "end": "'|(?<!\\\\)(?=$|\\n)",
1765 +
          "endCaptures": {
1766 +
            "0": {
1767 +
              "name": "punctuation.definition.string.end.css"
1768 +
            }
1769 +
          },
1770 +
          "name": "string.quoted.single.css",
1771 +
          "patterns": [
1772 +
            {
1773 +
              "begin": "(?:\\G|^)(?=(?:[^'\\\\]|\\\\.)+$)",
1774 +
              "end": "$",
1775 +
              "name": "invalid.illegal.unclosed.string.css",
1776 +
              "patterns": [
1777 +
                {
1778 +
                  "include": "#escapes"
1779 +
                }
1780 +
              ]
1781 +
            },
1782 +
            {
1783 +
              "include": "#escapes"
1784 +
            }
1785 +
          ]
1786 +
        }
1787 +
      ]
1788 +
    },
1789 +
    "tag-names": {
1790 +
      "match": "(?i)(?<![-:\\w])(?:a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|bgsound|big|blink|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|content|data|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|element|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|image|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark|marquee|math|menu|menuitem|meta|meter|multicol|nav|nextid|nobr|noembed|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|plaintext|pre|progress|q|rb|rp|rtc??|ruby|s|samp|script|section|select|shadow|slot|small|source|spacer|span|strike|strong|style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|ul??|var|video|wbr|xmp|altGlyph|altGlyphDef|altGlyphItem|animate|animateColor|animateMotion|animateTransform|circle|clipPath|color-profile|cursor|defs|desc|discard|ellipse|feBlend|feColorMatrix|feComponentTransfer|feComposite|feConvolveMatrix|feDiffuseLighting|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feImage|feMerge|feMergeNode|feMorphology|feOffset|fePointLight|feSpecularLighting|feSpotLight|feTile|feTurbulence|filter|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|foreignObject|g|glyph|glyphRef|hatch|hatchpath|hkern|line|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|metadata|missing-glyph|mpath|path|pattern|polygon|polyline|radialGradient|rect|set|solidcolor|stop|svg|switch|symbol|text|textPath|tref|tspan|use|view|vkern|annotation|annotation-xml|maction|maligngroup|malignmark|math|menclose|merror|mfenced|mfrac|mglyph|mi|mlabeledtr|mlongdiv|mmultiscripts|mn|mo|mover|mpadded|mphantom|mroot|mrow|ms|mscarries|mscarry|msgroup|msline|mspace|msqrt|msrow|mstack|mstyle|msub|msubsup|msup|mtable|mtd|mtext|mtr|munder|munderover|semantics)(?=[#)+,.:>\\[{|~\\s]|/\\*|$)",
1791 +
      "name": "entity.name.tag.css"
1792 +
    },
1793 +
    "unicode-range": {
1794 +
      "captures": {
1795 +
        "0": {
1796 +
          "name": "constant.other.unicode-range.css"
1797 +
        },
1798 +
        "1": {
1799 +
          "name": "punctuation.separator.dash.unicode-range.css"
1800 +
        }
1801 +
      },
1802 +
      "match": "(?<![-\\w])[Uu]\\+[?\\h]{1,6}(?:(-)\\h{1,6})?(?![-\\w])"
1803 +
    },
1804 +
    "url": {
1805 +
      "begin": "(?i)(?<![-@\\w])(url)(\\()",
1806 +
      "beginCaptures": {
1807 +
        "1": {
1808 +
          "name": "support.function.url.css"
1809 +
        },
1810 +
        "2": {
1811 +
          "name": "punctuation.section.function.begin.bracket.round.css"
1812 +
        }
1813 +
      },
1814 +
      "end": "\\)",
1815 +
      "endCaptures": {
1816 +
        "0": {
1817 +
          "name": "punctuation.section.function.end.bracket.round.css"
1818 +
        }
1819 +
      },
1820 +
      "name": "meta.function.url.css",
1821 +
      "patterns": [
1822 +
        {
1823 +
          "match": "[^\"')\\s]+",
1824 +
          "name": "variable.parameter.url.css"
1825 +
        },
1826 +
        {
1827 +
          "include": "#string"
1828 +
        },
1829 +
        {
1830 +
          "include": "#comment-block"
1831 +
        },
1832 +
        {
1833 +
          "include": "#escapes"
1834 +
        }
1835 +
      ]
1836 +
    }
1837 +
  },
1838 +
  "scopeName": "source.css"
1839 +
}
crates/diff/src/syntaxes/html.json added +2627 -0
1 +
{
2 +
  "displayName": "HTML",
3 +
  "injections": {
4 +
    "R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)": {
5 +
      "patterns": [
6 +
        {
7 +
          "match": "<",
8 +
          "name": "invalid.illegal.bad-angle-bracket.html"
9 +
        }
10 +
      ]
11 +
    }
12 +
  },
13 +
  "name": "html",
14 +
  "patterns": [
15 +
    {
16 +
      "include": "#xml-processing"
17 +
    },
18 +
    {
19 +
      "include": "#comment"
20 +
    },
21 +
    {
22 +
      "include": "#doctype"
23 +
    },
24 +
    {
25 +
      "include": "#cdata"
26 +
    },
27 +
    {
28 +
      "include": "#tags-valid"
29 +
    },
30 +
    {
31 +
      "include": "#tags-invalid"
32 +
    },
33 +
    {
34 +
      "include": "#entities"
35 +
    }
36 +
  ],
37 +
  "repository": {
38 +
    "attribute": {
39 +
      "patterns": [
40 +
        {
41 +
          "begin": "(s(hape|cope|t(ep|art)|ize(s)?|p(ellcheck|an)|elected|lot|andbox|rc(set|doc|lang)?)|h(ttp-equiv|i(dden|gh)|e(ight|aders)|ref(lang)?)|n(o(nce|validate|module)|ame)|c(h(ecked|arset)|ite|o(nt(ent(editable)?|rols)|ords|l(s(pan)?|or))|lass|rossorigin)|t(ype(mustmatch)?|itle|a(rget|bindex)|ranslate)|i(s(map)?|n(tegrity|putmode)|tem(scope|type|id|prop|ref)|d)|op(timum|en)|d(i(sabled|r(name)?)|ownload|e(coding|f(er|ault))|at(etime|a)|raggable)|usemap|p(ing|oster|la(ysinline|ceholder)|attern|reload)|enctype|value|kind|for(m(novalidate|target|enctype|action|method)?)?|w(idth|rap)|l(ist|o(op|w)|a(ng|bel))|a(s(ync)?|c(ce(sskey|pt(-charset)?)|tion)|uto(c(omplete|apitalize)|play|focus)|l(t|low(usermedia|paymentrequest|fullscreen))|bbr)|r(ows(pan)?|e(versed|quired|ferrerpolicy|l|adonly))|m(in(length)?|u(ted|ltiple)|e(thod|dia)|a(nifest|x(length)?)))(?![-:\\w])",
42 +
          "beginCaptures": {
43 +
            "0": {
44 +
              "name": "entity.other.attribute-name.html"
45 +
            }
46 +
          },
47 +
          "end": "(?=\\s*+[^=\\s])",
48 +
          "name": "meta.attribute.$1.html",
49 +
          "patterns": [
50 +
            {
51 +
              "include": "#attribute-interior"
52 +
            }
53 +
          ]
54 +
        },
55 +
        {
56 +
          "begin": "style(?![-:\\w])",
57 +
          "beginCaptures": {
58 +
            "0": {
59 +
              "name": "entity.other.attribute-name.html"
60 +
            }
61 +
          },
62 +
          "end": "(?=\\s*+[^=\\s])",
63 +
          "name": "meta.attribute.style.html",
64 +
          "patterns": [
65 +
            {
66 +
              "begin": "=",
67 +
              "beginCaptures": {
68 +
                "0": {
69 +
                  "name": "punctuation.separator.key-value.html"
70 +
                }
71 +
              },
72 +
              "end": "(?<=[^=\\s])(?!\\s*=)|(?=/?>)",
73 +
              "patterns": [
74 +
                {
75 +
                  "begin": "(?=[^/<=>`\\s]|/(?!>))",
76 +
                  "end": "(?!\\G)",
77 +
                  "name": "meta.embedded.line.css",
78 +
                  "patterns": [
79 +
                    {
80 +
                      "captures": {
81 +
                        "0": {
82 +
                          "name": "source.css"
83 +
                        }
84 +
                      },
85 +
                      "match": "([^\"'/<=>`\\s]|/(?!>))+",
86 +
                      "name": "string.unquoted.html"
87 +
                    },
88 +
                    {
89 +
                      "begin": "\"",
90 +
                      "beginCaptures": {
91 +
                        "0": {
92 +
                          "name": "punctuation.definition.string.begin.html"
93 +
                        }
94 +
                      },
95 +
                      "contentName": "source.css",
96 +
                      "end": "(\")",
97 +
                      "endCaptures": {
98 +
                        "0": {
99 +
                          "name": "punctuation.definition.string.end.html"
100 +
                        },
101 +
                        "1": {
102 +
                          "name": "source.css"
103 +
                        }
104 +
                      },
105 +
                      "name": "string.quoted.double.html",
106 +
                      "patterns": [
107 +
                        {
108 +
                          "include": "#entities"
109 +
                        }
110 +
                      ]
111 +
                    },
112 +
                    {
113 +
                      "begin": "'",
114 +
                      "beginCaptures": {
115 +
                        "0": {
116 +
                          "name": "punctuation.definition.string.begin.html"
117 +
                        }
118 +
                      },
119 +
                      "contentName": "source.css",
120 +
                      "end": "(')",
121 +
                      "endCaptures": {
122 +
                        "0": {
123 +
                          "name": "punctuation.definition.string.end.html"
124 +
                        },
125 +
                        "1": {
126 +
                          "name": "source.css"
127 +
                        }
128 +
                      },
129 +
                      "name": "string.quoted.single.html",
130 +
                      "patterns": [
131 +
                        {
132 +
                          "include": "#entities"
133 +
                        }
134 +
                      ]
135 +
                    }
136 +
                  ]
137 +
                },
138 +
                {
139 +
                  "match": "=",
140 +
                  "name": "invalid.illegal.unexpected-equals-sign.html"
141 +
                }
142 +
              ]
143 +
            }
144 +
          ]
145 +
        },
146 +
        {
147 +
          "begin": "on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o((?:n|ff)line)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d((?:|meta)data)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur))(?![-:\\w])",
148 +
          "beginCaptures": {
149 +
            "0": {
150 +
              "name": "entity.other.attribute-name.html"
151 +
            }
152 +
          },
153 +
          "end": "(?=\\s*+[^=\\s])",
154 +
          "name": "meta.attribute.event-handler.$1.html",
155 +
          "patterns": [
156 +
            {
157 +
              "begin": "=",
158 +
              "beginCaptures": {
159 +
                "0": {
160 +
                  "name": "punctuation.separator.key-value.html"
161 +
                }
162 +
              },
163 +
              "end": "(?<=[^=\\s])(?!\\s*=)|(?=/?>)",
164 +
              "patterns": [
165 +
                {
166 +
                  "begin": "(?=[^/<=>`\\s]|/(?!>))",
167 +
                  "end": "(?!\\G)",
168 +
                  "name": "meta.embedded.line.js",
169 +
                  "patterns": [
170 +
                    {
171 +
                      "captures": {
172 +
                        "0": {
173 +
                          "name": "source.js"
174 +
                        },
175 +
                        "1": {
176 +
                          "patterns": [
177 +
                            {
178 +
                              "include": "source.js"
179 +
                            }
180 +
                          ]
181 +
                        }
182 +
                      },
183 +
                      "match": "(([^\"'/<=>`\\s]|/(?!>))+)",
184 +
                      "name": "string.unquoted.html"
185 +
                    },
186 +
                    {
187 +
                      "begin": "\"",
188 +
                      "beginCaptures": {
189 +
                        "0": {
190 +
                          "name": "punctuation.definition.string.begin.html"
191 +
                        }
192 +
                      },
193 +
                      "contentName": "source.js",
194 +
                      "end": "(\")",
195 +
                      "endCaptures": {
196 +
                        "0": {
197 +
                          "name": "punctuation.definition.string.end.html"
198 +
                        },
199 +
                        "1": {
200 +
                          "name": "source.js"
201 +
                        }
202 +
                      },
203 +
                      "name": "string.quoted.double.html",
204 +
                      "patterns": [
205 +
                        {
206 +
                          "captures": {
207 +
                            "0": {
208 +
                              "patterns": [
209 +
                                {
210 +
                                  "include": "source.js"
211 +
                                }
212 +
                              ]
213 +
                            }
214 +
                          },
215 +
                          "match": "([^\\n\"/]|/(?![*/]))+"
216 +
                        },
217 +
                        {
218 +
                          "begin": "//",
219 +
                          "beginCaptures": {
220 +
                            "0": {
221 +
                              "name": "punctuation.definition.comment.js"
222 +
                            }
223 +
                          },
224 +
                          "end": "(?=\")|\\n",
225 +
                          "name": "comment.line.double-slash.js"
226 +
                        },
227 +
                        {
228 +
                          "begin": "/\\*",
229 +
                          "beginCaptures": {
230 +
                            "0": {
231 +
                              "name": "punctuation.definition.comment.begin.js"
232 +
                            }
233 +
                          },
234 +
                          "end": "(?=\")|\\*/",
235 +
                          "endCaptures": {
236 +
                            "0": {
237 +
                              "name": "punctuation.definition.comment.end.js"
238 +
                            }
239 +
                          },
240 +
                          "name": "comment.block.js"
241 +
                        }
242 +
                      ]
243 +
                    },
244 +
                    {
245 +
                      "begin": "'",
246 +
                      "beginCaptures": {
247 +
                        "0": {
248 +
                          "name": "punctuation.definition.string.begin.html"
249 +
                        }
250 +
                      },
251 +
                      "contentName": "source.js",
252 +
                      "end": "(')",
253 +
                      "endCaptures": {
254 +
                        "0": {
255 +
                          "name": "punctuation.definition.string.end.html"
256 +
                        },
257 +
                        "1": {
258 +
                          "name": "source.js"
259 +
                        }
260 +
                      },
261 +
                      "name": "string.quoted.single.html",
262 +
                      "patterns": [
263 +
                        {
264 +
                          "captures": {
265 +
                            "0": {
266 +
                              "patterns": [
267 +
                                {
268 +
                                  "include": "source.js"
269 +
                                }
270 +
                              ]
271 +
                            }
272 +
                          },
273 +
                          "match": "([^\\n'/]|/(?![*/]))+"
274 +
                        },
275 +
                        {
276 +
                          "begin": "//",
277 +
                          "beginCaptures": {
278 +
                            "0": {
279 +
                              "name": "punctuation.definition.comment.js"
280 +
                            }
281 +
                          },
282 +
                          "end": "(?=')|\\n",
283 +
                          "name": "comment.line.double-slash.js"
284 +
                        },
285 +
                        {
286 +
                          "begin": "/\\*",
287 +
                          "beginCaptures": {
288 +
                            "0": {
289 +
                              "name": "punctuation.definition.comment.begin.js"
290 +
                            }
291 +
                          },
292 +
                          "end": "(?=')|\\*/",
293 +
                          "endCaptures": {
294 +
                            "0": {
295 +
                              "name": "punctuation.definition.comment.end.js"
296 +
                            }
297 +
                          },
298 +
                          "name": "comment.block.js"
299 +
                        }
300 +
                      ]
301 +
                    }
302 +
                  ]
303 +
                },
304 +
                {
305 +
                  "match": "=",
306 +
                  "name": "invalid.illegal.unexpected-equals-sign.html"
307 +
                }
308 +
              ]
309 +
            }
310 +
          ]
311 +
        },
312 +
        {
313 +
          "begin": "(data-[-a-z]+)(?![-:\\w])",
314 +
          "beginCaptures": {
315 +
            "0": {
316 +
              "name": "entity.other.attribute-name.html"
317 +
            }
318 +
          },
319 +
          "end": "(?=\\s*+[^=\\s])",
320 +
          "name": "meta.attribute.data-x.$1.html",
321 +
          "patterns": [
322 +
            {
323 +
              "include": "#attribute-interior"
324 +
            }
325 +
          ]
326 +
        },
327 +
        {
328 +
          "begin": "(align|bgcolor|border)(?![-:\\w])",
329 +
          "beginCaptures": {
330 +
            "0": {
331 +
              "name": "invalid.deprecated.entity.other.attribute-name.html"
332 +
            }
333 +
          },
334 +
          "end": "(?=\\s*+[^=\\s])",
335 +
          "name": "meta.attribute.$1.html",
336 +
          "patterns": [
337 +
            {
338 +
              "include": "#attribute-interior"
339 +
            }
340 +
          ]
341 +
        },
342 +
        {
343 +
          "begin": "([^\\x00- \"'/<=>\\x7F-\\x{9F}๏ท-๏ทฏ๏ฟพ๏ฟฟ๐Ÿฟพ๐Ÿฟฟ๐ฏฟพ๐ฏฟฟ๐ฟฟพ๐ฟฟฟ\\x{4FFFE}\\x{4FFFF}\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)",
344 +
          "beginCaptures": {
345 +
            "0": {
346 +
              "name": "entity.other.attribute-name.html"
347 +
            }
348 +
          },
349 +
          "end": "(?=\\s*+[^=\\s])",
350 +
          "name": "meta.attribute.unrecognized.$1.html",
351 +
          "patterns": [
352 +
            {
353 +
              "include": "#attribute-interior"
354 +
            }
355 +
          ]
356 +
        },
357 +
        {
358 +
          "match": "[^>\\s]+",
359 +
          "name": "invalid.illegal.character-not-allowed-here.html"
360 +
        }
361 +
      ]
362 +
    },
363 +
    "attribute-interior": {
364 +
      "patterns": [
365 +
        {
366 +
          "begin": "=",
367 +
          "beginCaptures": {
368 +
            "0": {
369 +
              "name": "punctuation.separator.key-value.html"
370 +
            }
371 +
          },
372 +
          "end": "(?<=[^=\\s])(?!\\s*=)|(?=/?>)",
373 +
          "patterns": [
374 +
            {
375 +
              "match": "([^\"'/<=>`\\s]|/(?!>))+",
376 +
              "name": "string.unquoted.html"
377 +
            },
378 +
            {
379 +
              "begin": "\"",
380 +
              "beginCaptures": {
381 +
                "0": {
382 +
                  "name": "punctuation.definition.string.begin.html"
383 +
                }
384 +
              },
385 +
              "end": "\"",
386 +
              "endCaptures": {
387 +
                "0": {
388 +
                  "name": "punctuation.definition.string.end.html"
389 +
                }
390 +
              },
391 +
              "name": "string.quoted.double.html",
392 +
              "patterns": [
393 +
                {
394 +
                  "include": "#entities"
395 +
                }
396 +
              ]
397 +
            },
398 +
            {
399 +
              "begin": "'",
400 +
              "beginCaptures": {
401 +
                "0": {
402 +
                  "name": "punctuation.definition.string.begin.html"
403 +
                }
404 +
              },
405 +
              "end": "'",
406 +
              "endCaptures": {
407 +
                "0": {
408 +
                  "name": "punctuation.definition.string.end.html"
409 +
                }
410 +
              },
411 +
              "name": "string.quoted.single.html",
412 +
              "patterns": [
413 +
                {
414 +
                  "include": "#entities"
415 +
                }
416 +
              ]
417 +
            },
418 +
            {
419 +
              "match": "=",
420 +
              "name": "invalid.illegal.unexpected-equals-sign.html"
421 +
            }
422 +
          ]
423 +
        }
424 +
      ]
425 +
    },
426 +
    "cdata": {
427 +
      "begin": "<!\\[CDATA\\[",
428 +
      "beginCaptures": {
429 +
        "0": {
430 +
          "name": "punctuation.definition.tag.begin.html"
431 +
        }
432 +
      },
433 +
      "contentName": "string.other.inline-data.html",
434 +
      "end": "]]>",
435 +
      "endCaptures": {
436 +
        "0": {
437 +
          "name": "punctuation.definition.tag.end.html"
438 +
        }
439 +
      },
440 +
      "name": "meta.tag.metadata.cdata.html"
441 +
    },
442 +
    "comment": {
443 +
      "begin": "<!--",
444 +
      "captures": {
445 +
        "0": {
446 +
          "name": "punctuation.definition.comment.html"
447 +
        }
448 +
      },
449 +
      "end": "-->",
450 +
      "name": "comment.block.html",
451 +
      "patterns": [
452 +
        {
453 +
          "match": "\\G-?>",
454 +
          "name": "invalid.illegal.characters-not-allowed-here.html"
455 +
        },
456 +
        {
457 +
          "match": "<!-(?:-(?!>)|(?=-->))",
458 +
          "name": "invalid.illegal.characters-not-allowed-here.html"
459 +
        },
460 +
        {
461 +
          "match": "--!>",
462 +
          "name": "invalid.illegal.characters-not-allowed-here.html"
463 +
        }
464 +
      ]
465 +
    },
466 +
    "core-minus-invalid": {
467 +
      "patterns": [
468 +
        {
469 +
          "include": "#xml-processing"
470 +
        },
471 +
        {
472 +
          "include": "#comment"
473 +
        },
474 +
        {
475 +
          "include": "#doctype"
476 +
        },
477 +
        {
478 +
          "include": "#cdata"
479 +
        },
480 +
        {
481 +
          "include": "#tags-valid"
482 +
        },
483 +
        {
484 +
          "include": "#entities"
485 +
        }
486 +
      ]
487 +
    },
488 +
    "doctype": {
489 +
      "begin": "<!(?=(?i:DOCTYPE\\s))",
490 +
      "beginCaptures": {
491 +
        "0": {
492 +
          "name": "punctuation.definition.tag.begin.html"
493 +
        }
494 +
      },
495 +
      "end": ">",
496 +
      "endCaptures": {
497 +
        "0": {
498 +
          "name": "punctuation.definition.tag.end.html"
499 +
        }
500 +
      },
501 +
      "name": "meta.tag.metadata.doctype.html",
502 +
      "patterns": [
503 +
        {
504 +
          "match": "\\G(?i:DOCTYPE)",
505 +
          "name": "entity.name.tag.html"
506 +
        },
507 +
        {
508 +
          "begin": "\"",
509 +
          "end": "\"",
510 +
          "name": "string.quoted.double.html"
511 +
        },
512 +
        {
513 +
          "match": "[^>\\s]+",
514 +
          "name": "entity.other.attribute-name.html"
515 +
        }
516 +
      ]
517 +
    },
518 +
    "entities": {
519 +
      "patterns": [
520 +
        {
521 +
          "captures": {
522 +
            "1": {
523 +
              "name": "punctuation.definition.entity.html"
524 +
            },
525 +
            "912": {
526 +
              "name": "punctuation.definition.entity.html"
527 +
            }
528 +
          },
529 +
          "match": "(&)(?=[A-Za-z])((a(s(ymp(eq)?|cr|t)|n(d(slope|[dv]|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a([a-h]))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|[Ee]|acir)?|elig|f(r)?|w((?:con|)int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))|(B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h([DUdu])?|times|H([DUdu])?|d([LRlr])|u([LRlr])|plus|D([LRlr])|v([HLRhlr])?|U([LRlr])|V([HLRhlr])?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1([24])|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))|(c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr([lr])|p(s|c([au]p)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w((?:con|)int)|lubs(uit)?|a(cute|p(s|c([au]p)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly((?:Double|)Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))|(d(s(c([ry])|trok|ol)|har([lr])|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up((?:Down|)Arrow)|VerticalBar|L(ong(RightArrow|Left((?:Right|)Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))|(e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t([ah])|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(D??ot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1([34]))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty((?:|Very)SmallSquare)|acr)))|(f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(l??ig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1([2-68])|78|2([35])|3([458])|45|5([68])))))|F(scr|cy|illed((?:|Very)SmallSquare)|o(uriertrf|pf|rAll)|fr))|(G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im([el])?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(q?less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l([Eaj])?|a(cute|p|mma(d)?)|rave|g(g)?|breve))|(h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok((?:lef|righ)tarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks([ew]arow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))|(i(s(cr|in(s(v)?|dot|[Ev])?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(i??nt)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f([fr])|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))|(j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))|(k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))|(l(s(h|cr|trok|im([eg])?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(d??il)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i([ef])?|Par))?|Har|o(ng(left((?:|right)arrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r((?:d|us)har))|ur((?:ds|u)har)|jcy|par(lt)?|e(s(s(sim|dot|eq(q?gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left((?:|right)arrow)|rightarrow|Left((?:Right|)Arrow))|pf|wer((?:Righ|Lef)tArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))|(M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u((?:lti|)map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))|(n(s(hort(parallel|mid)|c(cue|[er])?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|[Ee])?|b(set(eq(q)?)?|[Ee])?)|par|qsu([bp]e)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v([abc]))?|in(dot|v([abc])|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g([et]))|fr|w(near|ar(hk|r(ow)?)|Arr)|V([Dd]ash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft((?:|right)arrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr([cw])?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft((?:|right)arrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes((?:Slant|)Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi((?:n|ck)Space)|VeryThinSpace))|Jcy|fr|acute))|(o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|[fm])?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly((?:Double|)Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))|(p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d([ou])|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))|(q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))|(R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(d??il)|aron)|Barr|t(hree|imes|ri([ef]|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng([de]|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr)))|(s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma([fv])?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot([be])?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n([Ee])|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|n([Ee])|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar([ef]))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort((?:Right|Down|Up|Left)Arrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))|(t(s(hcy|c([ry])|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead((?:lef|righ)tarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i((?:n|ck)Space)|e(ta|refore))|c(y|edil|aron)|S(H??cy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a([bu])|ripleDot))|(u(scr|h(ar([lr])|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per((?:Righ|Lef)tArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))|(v(s(cr|u(pn([Ee])|bn([Ee])))|nsu([bp])|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))|(w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))|(X(scr|i|opf|fr)|x(s(cr|qcup)|h([Aa]rr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l([Aa]rr)|r([Aa]rr)|map))|(y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))|(z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(n?j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute)))(;)",
530 +
          "name": "constant.character.entity.named.$2.html"
531 +
        },
532 +
        {
533 +
          "captures": {
534 +
            "1": {
535 +
              "name": "punctuation.definition.entity.html"
536 +
            },
537 +
            "3": {
538 +
              "name": "punctuation.definition.entity.html"
539 +
            }
540 +
          },
541 +
          "match": "(&)#[0-9]+(;)",
542 +
          "name": "constant.character.entity.numeric.decimal.html"
543 +
        },
544 +
        {
545 +
          "captures": {
546 +
            "1": {
547 +
              "name": "punctuation.definition.entity.html"
548 +
            },
549 +
            "3": {
550 +
              "name": "punctuation.definition.entity.html"
551 +
            }
552 +
          },
553 +
          "match": "(&)#[Xx]\\h+(;)",
554 +
          "name": "constant.character.entity.numeric.hexadecimal.html"
555 +
        },
556 +
        {
557 +
          "match": "&(?=[0-9A-Za-z]+;)",
558 +
          "name": "invalid.illegal.ambiguous-ampersand.html"
559 +
        }
560 +
      ]
561 +
    },
562 +
    "math": {
563 +
      "patterns": [
564 +
        {
565 +
          "begin": "(?i)(<)(math)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
566 +
          "beginCaptures": {
567 +
            "0": {
568 +
              "name": "meta.tag.structure.$2.start.html"
569 +
            },
570 +
            "1": {
571 +
              "name": "punctuation.definition.tag.begin.html"
572 +
            },
573 +
            "2": {
574 +
              "name": "entity.name.tag.html"
575 +
            },
576 +
            "3": {
577 +
              "patterns": [
578 +
                {
579 +
                  "include": "#attribute"
580 +
                }
581 +
              ]
582 +
            },
583 +
            "5": {
584 +
              "name": "punctuation.definition.tag.end.html"
585 +
            }
586 +
          },
587 +
          "end": "(?i)(</)(\\2)\\s*(>)",
588 +
          "endCaptures": {
589 +
            "0": {
590 +
              "name": "meta.tag.structure.$2.end.html"
591 +
            },
592 +
            "1": {
593 +
              "name": "punctuation.definition.tag.begin.html"
594 +
            },
595 +
            "2": {
596 +
              "name": "entity.name.tag.html"
597 +
            },
598 +
            "3": {
599 +
              "name": "punctuation.definition.tag.end.html"
600 +
            }
601 +
          },
602 +
          "name": "meta.element.structure.$2.html",
603 +
          "patterns": [
604 +
            {
605 +
              "begin": "(?<!>)\\G",
606 +
              "end": ">",
607 +
              "endCaptures": {
608 +
                "0": {
609 +
                  "name": "punctuation.definition.tag.end.html"
610 +
                }
611 +
              },
612 +
              "name": "meta.tag.structure.start.html",
613 +
              "patterns": [
614 +
                {
615 +
                  "include": "#attribute"
616 +
                }
617 +
              ]
618 +
            },
619 +
            {
620 +
              "include": "#tags"
621 +
            }
622 +
          ]
623 +
        }
624 +
      ],
625 +
      "repository": {
626 +
        "attribute": {
627 +
          "patterns": [
628 +
            {
629 +
              "begin": "(s(hift|ymmetric|cript(sizemultiplier|level|minsize)|t(ackalign|retchy)|ide|u([bp]scriptshift)|e(parator(s)?|lection)|rc)|h(eight|ref)|n(otation|umalign)|c(haralign|olumn(spa(n|cing)|width|lines|align)|lose|rossout)|i(n(dent(shift(first|last)?|target|align(first|last)?)|fixlinebreakstyle)|d)|o(pen|verflow)|d(i(splay(style)?|r)|e(nomalign|cimalpoint|pth))|position|e(dge|qual(columns|rows))|voffset|f(orm|ence|rame(spacing)?)|width|l(space|ine(thickness|leading|break(style|multchar)?)|o(ngdivstyle|cation)|ength|quote|argeop)|a(c(cent(under)?|tiontype)|l(t(text|img(-(height|valign|width))?)|ign(mentscope)?))|r(space|ow(spa(n|cing)|lines|align)|quote)|groupalign|x(link:href|mlns)|m(in(size|labelspacing)|ovablelimits|a(th(size|color|variant|background)|xsize))|bevelled)(?![-:\\w])",
630 +
              "beginCaptures": {
631 +
                "0": {
632 +
                  "name": "entity.other.attribute-name.html"
633 +
                }
634 +
              },
635 +
              "end": "(?=\\s*+[^=\\s])",
636 +
              "name": "meta.attribute.$1.html",
637 +
              "patterns": [
638 +
                {
639 +
                  "include": "#attribute-interior"
640 +
                }
641 +
              ]
642 +
            },
643 +
            {
644 +
              "begin": "([^\\x00- \"'/<=>\\x7F-\\x{9F}๏ท-๏ทฏ๏ฟพ๏ฟฟ๐Ÿฟพ๐Ÿฟฟ๐ฏฟพ๐ฏฟฟ๐ฟฟพ๐ฟฟฟ\\x{4FFFE}\\x{4FFFF}\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)",
645 +
              "beginCaptures": {
646 +
                "0": {
647 +
                  "name": "entity.other.attribute-name.html"
648 +
                }
649 +
              },
650 +
              "end": "(?=\\s*+[^=\\s])",
651 +
              "name": "meta.attribute.unrecognized.$1.html",
652 +
              "patterns": [
653 +
                {
654 +
                  "include": "#attribute-interior"
655 +
                }
656 +
              ]
657 +
            },
658 +
            {
659 +
              "match": "[^>\\s]+",
660 +
              "name": "invalid.illegal.character-not-allowed-here.html"
661 +
            }
662 +
          ]
663 +
        },
664 +
        "tags": {
665 +
          "patterns": [
666 +
            {
667 +
              "include": "#comment"
668 +
            },
669 +
            {
670 +
              "include": "#cdata"
671 +
            },
672 +
            {
673 +
              "captures": {
674 +
                "0": {
675 +
                  "name": "meta.tag.structure.math.$2.void.html"
676 +
                },
677 +
                "1": {
678 +
                  "name": "punctuation.definition.tag.begin.html"
679 +
                },
680 +
                "2": {
681 +
                  "name": "entity.name.tag.html"
682 +
                },
683 +
                "3": {
684 +
                  "patterns": [
685 +
                    {
686 +
                      "include": "#attribute"
687 +
                    }
688 +
                  ]
689 +
                },
690 +
                "5": {
691 +
                  "name": "punctuation.definition.tag.end.html"
692 +
                }
693 +
              },
694 +
              "match": "(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
695 +
              "name": "meta.element.structure.math.$2.html"
696 +
            },
697 +
            {
698 +
              "begin": "(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
699 +
              "beginCaptures": {
700 +
                "0": {
701 +
                  "name": "meta.tag.structure.math.$2.start.html"
702 +
                },
703 +
                "1": {
704 +
                  "name": "punctuation.definition.tag.begin.html"
705 +
                },
706 +
                "2": {
707 +
                  "name": "entity.name.tag.html"
708 +
                },
709 +
                "3": {
710 +
                  "patterns": [
711 +
                    {
712 +
                      "include": "#attribute"
713 +
                    }
714 +
                  ]
715 +
                },
716 +
                "5": {
717 +
                  "name": "punctuation.definition.tag.end.html"
718 +
                }
719 +
              },
720 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
721 +
              "endCaptures": {
722 +
                "0": {
723 +
                  "name": "meta.tag.structure.math.$2.end.html"
724 +
                },
725 +
                "1": {
726 +
                  "name": "punctuation.definition.tag.begin.html"
727 +
                },
728 +
                "2": {
729 +
                  "name": "entity.name.tag.html"
730 +
                },
731 +
                "3": {
732 +
                  "name": "punctuation.definition.tag.end.html"
733 +
                },
734 +
                "4": {
735 +
                  "name": "punctuation.definition.tag.end.html"
736 +
                }
737 +
              },
738 +
              "name": "meta.element.structure.math.$2.html",
739 +
              "patterns": [
740 +
                {
741 +
                  "begin": "(?<!>)\\G",
742 +
                  "end": "(?=/>)|>",
743 +
                  "endCaptures": {
744 +
                    "0": {
745 +
                      "name": "punctuation.definition.tag.end.html"
746 +
                    }
747 +
                  },
748 +
                  "name": "meta.tag.structure.start.html",
749 +
                  "patterns": [
750 +
                    {
751 +
                      "include": "#attribute"
752 +
                    }
753 +
                  ]
754 +
                },
755 +
                {
756 +
                  "include": "#tags"
757 +
                }
758 +
              ]
759 +
            },
760 +
            {
761 +
              "captures": {
762 +
                "0": {
763 +
                  "name": "meta.tag.inline.math.$2.void.html"
764 +
                },
765 +
                "1": {
766 +
                  "name": "punctuation.definition.tag.begin.html"
767 +
                },
768 +
                "2": {
769 +
                  "name": "entity.name.tag.html"
770 +
                },
771 +
                "3": {
772 +
                  "patterns": [
773 +
                    {
774 +
                      "include": "#attribute"
775 +
                    }
776 +
                  ]
777 +
                },
778 +
                "5": {
779 +
                  "name": "punctuation.definition.tag.end.html"
780 +
                }
781 +
              },
782 +
              "match": "(?i)(<)(m(?:[inos]|space|text|aligngroup|alignmark))(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
783 +
              "name": "meta.element.inline.math.$2.html"
784 +
            },
785 +
            {
786 +
              "begin": "(?i)(<)(m(?:[inos]|space|text|aligngroup|alignmark))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
787 +
              "beginCaptures": {
788 +
                "0": {
789 +
                  "name": "meta.tag.inline.math.$2.start.html"
790 +
                },
791 +
                "1": {
792 +
                  "name": "punctuation.definition.tag.begin.html"
793 +
                },
794 +
                "2": {
795 +
                  "name": "entity.name.tag.html"
796 +
                },
797 +
                "3": {
798 +
                  "patterns": [
799 +
                    {
800 +
                      "include": "#attribute"
801 +
                    }
802 +
                  ]
803 +
                },
804 +
                "5": {
805 +
                  "name": "punctuation.definition.tag.end.html"
806 +
                }
807 +
              },
808 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
809 +
              "endCaptures": {
810 +
                "0": {
811 +
                  "name": "meta.tag.inline.math.$2.end.html"
812 +
                },
813 +
                "1": {
814 +
                  "name": "punctuation.definition.tag.begin.html"
815 +
                },
816 +
                "2": {
817 +
                  "name": "entity.name.tag.html"
818 +
                },
819 +
                "3": {
820 +
                  "name": "punctuation.definition.tag.end.html"
821 +
                },
822 +
                "4": {
823 +
                  "name": "punctuation.definition.tag.end.html"
824 +
                }
825 +
              },
826 +
              "name": "meta.element.inline.math.$2.html",
827 +
              "patterns": [
828 +
                {
829 +
                  "begin": "(?<!>)\\G",
830 +
                  "end": "(?=/>)|>",
831 +
                  "endCaptures": {
832 +
                    "0": {
833 +
                      "name": "punctuation.definition.tag.end.html"
834 +
                    }
835 +
                  },
836 +
                  "name": "meta.tag.inline.start.html",
837 +
                  "patterns": [
838 +
                    {
839 +
                      "include": "#attribute"
840 +
                    }
841 +
                  ]
842 +
                },
843 +
                {
844 +
                  "include": "#tags"
845 +
                }
846 +
              ]
847 +
            },
848 +
            {
849 +
              "captures": {
850 +
                "0": {
851 +
                  "name": "meta.tag.object.math.$2.void.html"
852 +
                },
853 +
                "1": {
854 +
                  "name": "punctuation.definition.tag.begin.html"
855 +
                },
856 +
                "2": {
857 +
                  "name": "entity.name.tag.html"
858 +
                },
859 +
                "3": {
860 +
                  "patterns": [
861 +
                    {
862 +
                      "include": "#attribute"
863 +
                    }
864 +
                  ]
865 +
                },
866 +
                "5": {
867 +
                  "name": "punctuation.definition.tag.end.html"
868 +
                }
869 +
              },
870 +
              "match": "(?i)(<)(mglyph)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
871 +
              "name": "meta.element.object.math.$2.html"
872 +
            },
873 +
            {
874 +
              "begin": "(?i)(<)(mglyph)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
875 +
              "beginCaptures": {
876 +
                "0": {
877 +
                  "name": "meta.tag.object.math.$2.start.html"
878 +
                },
879 +
                "1": {
880 +
                  "name": "punctuation.definition.tag.begin.html"
881 +
                },
882 +
                "2": {
883 +
                  "name": "entity.name.tag.html"
884 +
                },
885 +
                "3": {
886 +
                  "patterns": [
887 +
                    {
888 +
                      "include": "#attribute"
889 +
                    }
890 +
                  ]
891 +
                },
892 +
                "5": {
893 +
                  "name": "punctuation.definition.tag.end.html"
894 +
                }
895 +
              },
896 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
897 +
              "endCaptures": {
898 +
                "0": {
899 +
                  "name": "meta.tag.object.math.$2.end.html"
900 +
                },
901 +
                "1": {
902 +
                  "name": "punctuation.definition.tag.begin.html"
903 +
                },
904 +
                "2": {
905 +
                  "name": "entity.name.tag.html"
906 +
                },
907 +
                "3": {
908 +
                  "name": "punctuation.definition.tag.end.html"
909 +
                },
910 +
                "4": {
911 +
                  "name": "punctuation.definition.tag.end.html"
912 +
                }
913 +
              },
914 +
              "name": "meta.element.object.math.$2.html",
915 +
              "patterns": [
916 +
                {
917 +
                  "begin": "(?<!>)\\G",
918 +
                  "end": "(?=/>)|>",
919 +
                  "endCaptures": {
920 +
                    "0": {
921 +
                      "name": "punctuation.definition.tag.end.html"
922 +
                    }
923 +
                  },
924 +
                  "name": "meta.tag.object.start.html",
925 +
                  "patterns": [
926 +
                    {
927 +
                      "include": "#attribute"
928 +
                    }
929 +
                  ]
930 +
                },
931 +
                {
932 +
                  "include": "#tags"
933 +
                }
934 +
              ]
935 +
            },
936 +
            {
937 +
              "captures": {
938 +
                "0": {
939 +
                  "name": "meta.tag.other.invalid.void.html"
940 +
                },
941 +
                "1": {
942 +
                  "name": "punctuation.definition.tag.begin.html"
943 +
                },
944 +
                "2": {
945 +
                  "name": "entity.name.tag.html"
946 +
                },
947 +
                "3": {
948 +
                  "name": "invalid.illegal.unrecognized-tag.html"
949 +
                },
950 +
                "4": {
951 +
                  "patterns": [
952 +
                    {
953 +
                      "include": "#attribute"
954 +
                    }
955 +
                  ]
956 +
                },
957 +
                "6": {
958 +
                  "name": "punctuation.definition.tag.end.html"
959 +
                }
960 +
              },
961 +
              "match": "(?i)(<)(([:\\w]+))(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
962 +
              "name": "meta.element.other.invalid.html"
963 +
            },
964 +
            {
965 +
              "begin": "(?i)(<)((\\w[^>\\s]*))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
966 +
              "beginCaptures": {
967 +
                "0": {
968 +
                  "name": "meta.tag.other.invalid.start.html"
969 +
                },
970 +
                "1": {
971 +
                  "name": "punctuation.definition.tag.begin.html"
972 +
                },
973 +
                "2": {
974 +
                  "name": "entity.name.tag.html"
975 +
                },
976 +
                "3": {
977 +
                  "name": "invalid.illegal.unrecognized-tag.html"
978 +
                },
979 +
                "4": {
980 +
                  "patterns": [
981 +
                    {
982 +
                      "include": "#attribute"
983 +
                    }
984 +
                  ]
985 +
                },
986 +
                "6": {
987 +
                  "name": "punctuation.definition.tag.end.html"
988 +
                }
989 +
              },
990 +
              "end": "(?i)(</)((\\2))\\s*(>)|(/>)|(?=</\\w+)",
991 +
              "endCaptures": {
992 +
                "0": {
993 +
                  "name": "meta.tag.other.invalid.end.html"
994 +
                },
995 +
                "1": {
996 +
                  "name": "punctuation.definition.tag.begin.html"
997 +
                },
998 +
                "2": {
999 +
                  "name": "entity.name.tag.html"
1000 +
                },
1001 +
                "3": {
1002 +
                  "name": "invalid.illegal.unrecognized-tag.html"
1003 +
                },
1004 +
                "4": {
1005 +
                  "name": "punctuation.definition.tag.end.html"
1006 +
                },
1007 +
                "5": {
1008 +
                  "name": "punctuation.definition.tag.end.html"
1009 +
                }
1010 +
              },
1011 +
              "name": "meta.element.other.invalid.html",
1012 +
              "patterns": [
1013 +
                {
1014 +
                  "begin": "(?<!>)\\G",
1015 +
                  "end": "(?=/>)|>",
1016 +
                  "endCaptures": {
1017 +
                    "0": {
1018 +
                      "name": "punctuation.definition.tag.end.html"
1019 +
                    }
1020 +
                  },
1021 +
                  "name": "meta.tag.other.invalid.start.html",
1022 +
                  "patterns": [
1023 +
                    {
1024 +
                      "include": "#attribute"
1025 +
                    }
1026 +
                  ]
1027 +
                },
1028 +
                {
1029 +
                  "include": "#tags"
1030 +
                }
1031 +
              ]
1032 +
            },
1033 +
            {
1034 +
              "include": "#tags-invalid"
1035 +
            }
1036 +
          ]
1037 +
        }
1038 +
      }
1039 +
    },
1040 +
    "svg": {
1041 +
      "patterns": [
1042 +
        {
1043 +
          "begin": "(?i)(<)(svg)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1044 +
          "beginCaptures": {
1045 +
            "0": {
1046 +
              "name": "meta.tag.structure.$2.start.html"
1047 +
            },
1048 +
            "1": {
1049 +
              "name": "punctuation.definition.tag.begin.html"
1050 +
            },
1051 +
            "2": {
1052 +
              "name": "entity.name.tag.html"
1053 +
            },
1054 +
            "3": {
1055 +
              "patterns": [
1056 +
                {
1057 +
                  "include": "#attribute"
1058 +
                }
1059 +
              ]
1060 +
            },
1061 +
            "5": {
1062 +
              "name": "punctuation.definition.tag.end.html"
1063 +
            }
1064 +
          },
1065 +
          "end": "(?i)(</)(\\2)\\s*(>)",
1066 +
          "endCaptures": {
1067 +
            "0": {
1068 +
              "name": "meta.tag.structure.$2.end.html"
1069 +
            },
1070 +
            "1": {
1071 +
              "name": "punctuation.definition.tag.begin.html"
1072 +
            },
1073 +
            "2": {
1074 +
              "name": "entity.name.tag.html"
1075 +
            },
1076 +
            "3": {
1077 +
              "name": "punctuation.definition.tag.end.html"
1078 +
            }
1079 +
          },
1080 +
          "name": "meta.element.structure.$2.html",
1081 +
          "patterns": [
1082 +
            {
1083 +
              "begin": "(?<!>)\\G",
1084 +
              "end": ">",
1085 +
              "endCaptures": {
1086 +
                "0": {
1087 +
                  "name": "punctuation.definition.tag.end.html"
1088 +
                }
1089 +
              },
1090 +
              "name": "meta.tag.structure.start.html",
1091 +
              "patterns": [
1092 +
                {
1093 +
                  "include": "#attribute"
1094 +
                }
1095 +
              ]
1096 +
            },
1097 +
            {
1098 +
              "include": "#tags"
1099 +
            }
1100 +
          ]
1101 +
        }
1102 +
      ],
1103 +
      "repository": {
1104 +
        "attribute": {
1105 +
          "patterns": [
1106 +
            {
1107 +
              "begin": "(s(hape-rendering|ystemLanguage|cale|t(yle|itchTiles|op-(color|opacity)|dDeviation|em([hv])|artOffset|r(i(ng|kethrough-(thickness|position))|oke(-(opacity|dash(offset|array)|width|line(cap|join)|miterlimit))?))|urfaceScale|p(e(cular(Constant|Exponent)|ed)|acing|readMethod)|eed|lope)|h(oriz-(origin-x|adv-x)|eight|anging|ref(lang)?)|y([12]|ChannelSelector)?|n(umOctaves|ame)|c(y|o(ntentS((?:cript|tyle)Type)|lor(-(interpolation(-filters)?|profile|rendering))?)|ursor|l(ip(-(path|rule)|PathUnits)?|ass)|a(p-height|lcMode)|x)|t(ype|o|ext(-(decoration|anchor|rendering)|Length)|a(rget([XY])?|b(index|leValues))|ransform)|i(n(tercept|2)?|d(eographic)?|mage-rendering)|z(oomAndPan)?|o(p(erator|acity)|ver(flow|line-(thickness|position))|ffset|r(i(ent(ation)?|gin)|der))|d(y|i(splay|visor|ffuseConstant|rection)|ominant-baseline|ur|e(scent|celerate)|x)?|u(1|n(i(code(-(range|bidi))?|ts-per-em)|derline-(thickness|position))|2)|p(ing|oint(s(At([XYZ]))?|er-events)|a(nose-1|t(h(Length)?|tern(ContentUnits|Transform|Units))|int-order)|r(imitiveUnits|eserveA(spectRatio|lpha)))|e(n(d|able-background)|dgeMode|levation|x(ternalResourcesRequired|ponent))|v(i(sibility|ew(Box|Target))|-(hanging|ideographic|alphabetic|mathematical)|e(ctor-effect|r(sion|t-(origin-([xy])|adv-y)))|alues)|k([123]|e(y(Splines|Times|Points)|rn(ing|el(Matrix|UnitLength)))|4)?|f(y|il(ter(Res|Units)?|l(-(opacity|rule))?)|o(nt-(s(t(yle|retch)|ize(-adjust)?)|variant|family|weight)|rmat)|lood-(color|opacity)|r(om)?|x)|w(idth(s)?|ord-spacing|riting-mode)|l(i(ghting-color|mitingConeAngle)|ocal|e(ngthAdjust|tter-spacing)|ang)|a(scent|cc(umulate|ent-height)|ttribute(Name|Type)|zimuth|dditive|utoReverse|l(ignment-baseline|phabetic|lowReorder)|rabic-form|mplitude)|r(y|otate|e(s(tart|ult)|ndering-intent|peat(Count|Dur)|quired(Extensions|Features)|f([XY]|errerPolicy)|l)|adius|x)?|g([12]|lyph(Ref|-(name|orientation-(horizontal|vertical)))|radient(Transform|Units))|x([12]|ChannelSelector|-height|link:(show|href|t(ype|itle)|a(ctuate|rcrole)|role)|ml:(space|lang|base))?|m(in|ode|e(thod|dia)|a(sk((?:Content|)Units)?|thematical|rker(Height|-(start|end|mid)|Units|Width)|x))|b(y|ias|egin|ase(Profile|line-shift|Frequency)|box))(?![-:\\w])",
1108 +
              "beginCaptures": {
1109 +
                "0": {
1110 +
                  "name": "entity.other.attribute-name.html"
1111 +
                }
1112 +
              },
1113 +
              "end": "(?=\\s*+[^=\\s])",
1114 +
              "name": "meta.attribute.$1.html",
1115 +
              "patterns": [
1116 +
                {
1117 +
                  "include": "#attribute-interior"
1118 +
                }
1119 +
              ]
1120 +
            },
1121 +
            {
1122 +
              "begin": "([^\\x00- \"'/<=>\\x7F-\\x{9F}๏ท-๏ทฏ๏ฟพ๏ฟฟ๐Ÿฟพ๐Ÿฟฟ๐ฏฟพ๐ฏฟฟ๐ฟฟพ๐ฟฟฟ\\x{4FFFE}\\x{4FFFF}\\x{5FFFE}\\x{5FFFF}\\x{6FFFE}\\x{6FFFF}\\x{7FFFE}\\x{7FFFF}\\x{8FFFE}\\x{8FFFF}\\x{9FFFE}\\x{9FFFF}\\x{AFFFE}\\x{AFFFF}\\x{BFFFE}\\x{BFFFF}\\x{CFFFE}\\x{CFFFF}\\x{DFFFE}\\x{DFFFF}\\x{EFFFE}\\x{EFFFF}\\x{FFFFE}\\x{FFFFF}\\x{10FFFE}\\x{10FFFF}]+)",
1123 +
              "beginCaptures": {
1124 +
                "0": {
1125 +
                  "name": "entity.other.attribute-name.html"
1126 +
                }
1127 +
              },
1128 +
              "end": "(?=\\s*+[^=\\s])",
1129 +
              "name": "meta.attribute.unrecognized.$1.html",
1130 +
              "patterns": [
1131 +
                {
1132 +
                  "include": "#attribute-interior"
1133 +
                }
1134 +
              ]
1135 +
            },
1136 +
            {
1137 +
              "match": "[^>\\s]+",
1138 +
              "name": "invalid.illegal.character-not-allowed-here.html"
1139 +
            }
1140 +
          ]
1141 +
        },
1142 +
        "tags": {
1143 +
          "patterns": [
1144 +
            {
1145 +
              "include": "#comment"
1146 +
            },
1147 +
            {
1148 +
              "include": "#cdata"
1149 +
            },
1150 +
            {
1151 +
              "captures": {
1152 +
                "0": {
1153 +
                  "name": "meta.tag.metadata.svg.$2.void.html"
1154 +
                },
1155 +
                "1": {
1156 +
                  "name": "punctuation.definition.tag.begin.html"
1157 +
                },
1158 +
                "2": {
1159 +
                  "name": "entity.name.tag.html"
1160 +
                },
1161 +
                "3": {
1162 +
                  "patterns": [
1163 +
                    {
1164 +
                      "include": "#attribute"
1165 +
                    }
1166 +
                  ]
1167 +
                },
1168 +
                "5": {
1169 +
                  "name": "punctuation.definition.tag.end.html"
1170 +
                }
1171 +
              },
1172 +
              "match": "(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1173 +
              "name": "meta.element.metadata.svg.$2.html"
1174 +
            },
1175 +
            {
1176 +
              "begin": "(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1177 +
              "beginCaptures": {
1178 +
                "0": {
1179 +
                  "name": "meta.tag.metadata.svg.$2.start.html"
1180 +
                },
1181 +
                "1": {
1182 +
                  "name": "punctuation.definition.tag.begin.html"
1183 +
                },
1184 +
                "2": {
1185 +
                  "name": "entity.name.tag.html"
1186 +
                },
1187 +
                "3": {
1188 +
                  "patterns": [
1189 +
                    {
1190 +
                      "include": "#attribute"
1191 +
                    }
1192 +
                  ]
1193 +
                },
1194 +
                "5": {
1195 +
                  "name": "punctuation.definition.tag.end.html"
1196 +
                }
1197 +
              },
1198 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
1199 +
              "endCaptures": {
1200 +
                "0": {
1201 +
                  "name": "meta.tag.metadata.svg.$2.end.html"
1202 +
                },
1203 +
                "1": {
1204 +
                  "name": "punctuation.definition.tag.begin.html"
1205 +
                },
1206 +
                "2": {
1207 +
                  "name": "entity.name.tag.html"
1208 +
                },
1209 +
                "3": {
1210 +
                  "name": "punctuation.definition.tag.end.html"
1211 +
                },
1212 +
                "4": {
1213 +
                  "name": "punctuation.definition.tag.end.html"
1214 +
                }
1215 +
              },
1216 +
              "name": "meta.element.metadata.svg.$2.html",
1217 +
              "patterns": [
1218 +
                {
1219 +
                  "begin": "(?<!>)\\G",
1220 +
                  "end": "(?=/>)|>",
1221 +
                  "endCaptures": {
1222 +
                    "0": {
1223 +
                      "name": "punctuation.definition.tag.end.html"
1224 +
                    }
1225 +
                  },
1226 +
                  "name": "meta.tag.metadata.start.html",
1227 +
                  "patterns": [
1228 +
                    {
1229 +
                      "include": "#attribute"
1230 +
                    }
1231 +
                  ]
1232 +
                },
1233 +
                {
1234 +
                  "include": "#tags"
1235 +
                }
1236 +
              ]
1237 +
            },
1238 +
            {
1239 +
              "captures": {
1240 +
                "0": {
1241 +
                  "name": "meta.tag.structure.svg.$2.void.html"
1242 +
                },
1243 +
                "1": {
1244 +
                  "name": "punctuation.definition.tag.begin.html"
1245 +
                },
1246 +
                "2": {
1247 +
                  "name": "entity.name.tag.html"
1248 +
                },
1249 +
                "3": {
1250 +
                  "patterns": [
1251 +
                    {
1252 +
                      "include": "#attribute"
1253 +
                    }
1254 +
                  ]
1255 +
                },
1256 +
                "5": {
1257 +
                  "name": "punctuation.definition.tag.end.html"
1258 +
                }
1259 +
              },
1260 +
              "match": "(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1261 +
              "name": "meta.element.structure.svg.$2.html"
1262 +
            },
1263 +
            {
1264 +
              "begin": "(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1265 +
              "beginCaptures": {
1266 +
                "0": {
1267 +
                  "name": "meta.tag.structure.svg.$2.start.html"
1268 +
                },
1269 +
                "1": {
1270 +
                  "name": "punctuation.definition.tag.begin.html"
1271 +
                },
1272 +
                "2": {
1273 +
                  "name": "entity.name.tag.html"
1274 +
                },
1275 +
                "3": {
1276 +
                  "patterns": [
1277 +
                    {
1278 +
                      "include": "#attribute"
1279 +
                    }
1280 +
                  ]
1281 +
                },
1282 +
                "5": {
1283 +
                  "name": "punctuation.definition.tag.end.html"
1284 +
                }
1285 +
              },
1286 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
1287 +
              "endCaptures": {
1288 +
                "0": {
1289 +
                  "name": "meta.tag.structure.svg.$2.end.html"
1290 +
                },
1291 +
                "1": {
1292 +
                  "name": "punctuation.definition.tag.begin.html"
1293 +
                },
1294 +
                "2": {
1295 +
                  "name": "entity.name.tag.html"
1296 +
                },
1297 +
                "3": {
1298 +
                  "name": "punctuation.definition.tag.end.html"
1299 +
                },
1300 +
                "4": {
1301 +
                  "name": "punctuation.definition.tag.end.html"
1302 +
                }
1303 +
              },
1304 +
              "name": "meta.element.structure.svg.$2.html",
1305 +
              "patterns": [
1306 +
                {
1307 +
                  "begin": "(?<!>)\\G",
1308 +
                  "end": "(?=/>)|>",
1309 +
                  "endCaptures": {
1310 +
                    "0": {
1311 +
                      "name": "punctuation.definition.tag.end.html"
1312 +
                    }
1313 +
                  },
1314 +
                  "name": "meta.tag.structure.start.html",
1315 +
                  "patterns": [
1316 +
                    {
1317 +
                      "include": "#attribute"
1318 +
                    }
1319 +
                  ]
1320 +
                },
1321 +
                {
1322 +
                  "include": "#tags"
1323 +
                }
1324 +
              ]
1325 +
            },
1326 +
            {
1327 +
              "captures": {
1328 +
                "0": {
1329 +
                  "name": "meta.tag.inline.svg.$2.void.html"
1330 +
                },
1331 +
                "1": {
1332 +
                  "name": "punctuation.definition.tag.begin.html"
1333 +
                },
1334 +
                "2": {
1335 +
                  "name": "entity.name.tag.html"
1336 +
                },
1337 +
                "3": {
1338 +
                  "patterns": [
1339 +
                    {
1340 +
                      "include": "#attribute"
1341 +
                    }
1342 +
                  ]
1343 +
                },
1344 +
                "5": {
1345 +
                  "name": "punctuation.definition.tag.end.html"
1346 +
                }
1347 +
              },
1348 +
              "match": "(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1349 +
              "name": "meta.element.inline.svg.$2.html"
1350 +
            },
1351 +
            {
1352 +
              "begin": "(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1353 +
              "beginCaptures": {
1354 +
                "0": {
1355 +
                  "name": "meta.tag.inline.svg.$2.start.html"
1356 +
                },
1357 +
                "1": {
1358 +
                  "name": "punctuation.definition.tag.begin.html"
1359 +
                },
1360 +
                "2": {
1361 +
                  "name": "entity.name.tag.html"
1362 +
                },
1363 +
                "3": {
1364 +
                  "patterns": [
1365 +
                    {
1366 +
                      "include": "#attribute"
1367 +
                    }
1368 +
                  ]
1369 +
                },
1370 +
                "5": {
1371 +
                  "name": "punctuation.definition.tag.end.html"
1372 +
                }
1373 +
              },
1374 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
1375 +
              "endCaptures": {
1376 +
                "0": {
1377 +
                  "name": "meta.tag.inline.svg.$2.end.html"
1378 +
                },
1379 +
                "1": {
1380 +
                  "name": "punctuation.definition.tag.begin.html"
1381 +
                },
1382 +
                "2": {
1383 +
                  "name": "entity.name.tag.html"
1384 +
                },
1385 +
                "3": {
1386 +
                  "name": "punctuation.definition.tag.end.html"
1387 +
                },
1388 +
                "4": {
1389 +
                  "name": "punctuation.definition.tag.end.html"
1390 +
                }
1391 +
              },
1392 +
              "name": "meta.element.inline.svg.$2.html",
1393 +
              "patterns": [
1394 +
                {
1395 +
                  "begin": "(?<!>)\\G",
1396 +
                  "end": "(?=/>)|>",
1397 +
                  "endCaptures": {
1398 +
                    "0": {
1399 +
                      "name": "punctuation.definition.tag.end.html"
1400 +
                    }
1401 +
                  },
1402 +
                  "name": "meta.tag.inline.start.html",
1403 +
                  "patterns": [
1404 +
                    {
1405 +
                      "include": "#attribute"
1406 +
                    }
1407 +
                  ]
1408 +
                },
1409 +
                {
1410 +
                  "include": "#tags"
1411 +
                }
1412 +
              ]
1413 +
            },
1414 +
            {
1415 +
              "captures": {
1416 +
                "0": {
1417 +
                  "name": "meta.tag.object.svg.$2.void.html"
1418 +
                },
1419 +
                "1": {
1420 +
                  "name": "punctuation.definition.tag.begin.html"
1421 +
                },
1422 +
                "2": {
1423 +
                  "name": "entity.name.tag.html"
1424 +
                },
1425 +
                "3": {
1426 +
                  "patterns": [
1427 +
                    {
1428 +
                      "include": "#attribute"
1429 +
                    }
1430 +
                  ]
1431 +
                },
1432 +
                "5": {
1433 +
                  "name": "punctuation.definition.tag.end.html"
1434 +
                }
1435 +
              },
1436 +
              "match": "(?i)(<)(circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1437 +
              "name": "meta.element.object.svg.$2.html"
1438 +
            },
1439 +
            {
1440 +
              "begin": "(?i)(<)(a|circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1441 +
              "beginCaptures": {
1442 +
                "0": {
1443 +
                  "name": "meta.tag.object.svg.$2.start.html"
1444 +
                },
1445 +
                "1": {
1446 +
                  "name": "punctuation.definition.tag.begin.html"
1447 +
                },
1448 +
                "2": {
1449 +
                  "name": "entity.name.tag.html"
1450 +
                },
1451 +
                "3": {
1452 +
                  "patterns": [
1453 +
                    {
1454 +
                      "include": "#attribute"
1455 +
                    }
1456 +
                  ]
1457 +
                },
1458 +
                "5": {
1459 +
                  "name": "punctuation.definition.tag.end.html"
1460 +
                }
1461 +
              },
1462 +
              "end": "(?i)(</)(\\2)\\s*(>)|(/>)|(?=</\\w+)",
1463 +
              "endCaptures": {
1464 +
                "0": {
1465 +
                  "name": "meta.tag.object.svg.$2.end.html"
1466 +
                },
1467 +
                "1": {
1468 +
                  "name": "punctuation.definition.tag.begin.html"
1469 +
                },
1470 +
                "2": {
1471 +
                  "name": "entity.name.tag.html"
1472 +
                },
1473 +
                "3": {
1474 +
                  "name": "punctuation.definition.tag.end.html"
1475 +
                },
1476 +
                "4": {
1477 +
                  "name": "punctuation.definition.tag.end.html"
1478 +
                }
1479 +
              },
1480 +
              "name": "meta.element.object.svg.$2.html",
1481 +
              "patterns": [
1482 +
                {
1483 +
                  "begin": "(?<!>)\\G",
1484 +
                  "end": "(?=/>)|>",
1485 +
                  "endCaptures": {
1486 +
                    "0": {
1487 +
                      "name": "punctuation.definition.tag.end.html"
1488 +
                    }
1489 +
                  },
1490 +
                  "name": "meta.tag.object.start.html",
1491 +
                  "patterns": [
1492 +
                    {
1493 +
                      "include": "#attribute"
1494 +
                    }
1495 +
                  ]
1496 +
                },
1497 +
                {
1498 +
                  "include": "#tags"
1499 +
                }
1500 +
              ]
1501 +
            },
1502 +
            {
1503 +
              "captures": {
1504 +
                "0": {
1505 +
                  "name": "meta.tag.other.svg.$2.void.html"
1506 +
                },
1507 +
                "1": {
1508 +
                  "name": "punctuation.definition.tag.begin.html"
1509 +
                },
1510 +
                "2": {
1511 +
                  "name": "entity.name.tag.html"
1512 +
                },
1513 +
                "3": {
1514 +
                  "name": "invalid.deprecated.html"
1515 +
                },
1516 +
                "4": {
1517 +
                  "patterns": [
1518 +
                    {
1519 +
                      "include": "#attribute"
1520 +
                    }
1521 +
                  ]
1522 +
                },
1523 +
                "6": {
1524 +
                  "name": "punctuation.definition.tag.end.html"
1525 +
                }
1526 +
              },
1527 +
              "match": "(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1528 +
              "name": "meta.element.other.svg.$2.html"
1529 +
            },
1530 +
            {
1531 +
              "begin": "(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1532 +
              "beginCaptures": {
1533 +
                "0": {
1534 +
                  "name": "meta.tag.other.svg.$2.start.html"
1535 +
                },
1536 +
                "1": {
1537 +
                  "name": "punctuation.definition.tag.begin.html"
1538 +
                },
1539 +
                "2": {
1540 +
                  "name": "entity.name.tag.html"
1541 +
                },
1542 +
                "3": {
1543 +
                  "name": "invalid.deprecated.html"
1544 +
                },
1545 +
                "4": {
1546 +
                  "patterns": [
1547 +
                    {
1548 +
                      "include": "#attribute"
1549 +
                    }
1550 +
                  ]
1551 +
                },
1552 +
                "6": {
1553 +
                  "name": "punctuation.definition.tag.end.html"
1554 +
                }
1555 +
              },
1556 +
              "end": "(?i)(</)((\\2))\\s*(>)|(/>)|(?=</\\w+)",
1557 +
              "endCaptures": {
1558 +
                "0": {
1559 +
                  "name": "meta.tag.other.svg.$2.end.html"
1560 +
                },
1561 +
                "1": {
1562 +
                  "name": "punctuation.definition.tag.begin.html"
1563 +
                },
1564 +
                "2": {
1565 +
                  "name": "entity.name.tag.html"
1566 +
                },
1567 +
                "3": {
1568 +
                  "name": "invalid.deprecated.html"
1569 +
                },
1570 +
                "4": {
1571 +
                  "name": "punctuation.definition.tag.end.html"
1572 +
                },
1573 +
                "5": {
1574 +
                  "name": "punctuation.definition.tag.end.html"
1575 +
                }
1576 +
              },
1577 +
              "name": "meta.element.other.svg.$2.html",
1578 +
              "patterns": [
1579 +
                {
1580 +
                  "begin": "(?<!>)\\G",
1581 +
                  "end": "(?=/>)|>",
1582 +
                  "endCaptures": {
1583 +
                    "0": {
1584 +
                      "name": "punctuation.definition.tag.end.html"
1585 +
                    }
1586 +
                  },
1587 +
                  "name": "meta.tag.other.start.html",
1588 +
                  "patterns": [
1589 +
                    {
1590 +
                      "include": "#attribute"
1591 +
                    }
1592 +
                  ]
1593 +
                },
1594 +
                {
1595 +
                  "include": "#tags"
1596 +
                }
1597 +
              ]
1598 +
            },
1599 +
            {
1600 +
              "captures": {
1601 +
                "0": {
1602 +
                  "name": "meta.tag.other.invalid.void.html"
1603 +
                },
1604 +
                "1": {
1605 +
                  "name": "punctuation.definition.tag.begin.html"
1606 +
                },
1607 +
                "2": {
1608 +
                  "name": "entity.name.tag.html"
1609 +
                },
1610 +
                "3": {
1611 +
                  "name": "invalid.illegal.unrecognized-tag.html"
1612 +
                },
1613 +
                "4": {
1614 +
                  "patterns": [
1615 +
                    {
1616 +
                      "include": "#attribute"
1617 +
                    }
1618 +
                  ]
1619 +
                },
1620 +
                "6": {
1621 +
                  "name": "punctuation.definition.tag.end.html"
1622 +
                }
1623 +
              },
1624 +
              "match": "(?i)(<)(([:\\w]+))(?=\\s|/?>)(([^\"'>]|\"[^\"]*\"|'[^']*')*)(/>)",
1625 +
              "name": "meta.element.other.invalid.html"
1626 +
            },
1627 +
            {
1628 +
              "begin": "(?i)(<)((\\w[^>\\s]*))(?=\\s|/?>)(?:(([^\"'>]|\"[^\"]*\"|'[^']*')*)(>))?",
1629 +
              "beginCaptures": {
1630 +
                "0": {
1631 +
                  "name": "meta.tag.other.invalid.start.html"
1632 +
                },
1633 +
                "1": {
1634 +
                  "name": "punctuation.definition.tag.begin.html"
1635 +
                },
1636 +
                "2": {
1637 +
                  "name": "entity.name.tag.html"
1638 +
                },
1639 +
                "3": {
1640 +
                  "name": "invalid.illegal.unrecognized-tag.html"
1641 +
                },
1642 +
                "4": {
1643 +
                  "patterns": [
1644 +
                    {
1645 +
                      "include": "#attribute"
1646 +
                    }
1647 +
                  ]
1648 +
                },
1649 +
                "6": {
1650 +
                  "name": "punctuation.definition.tag.end.html"
1651 +
                }
1652 +
              },
1653 +
              "end": "(?i)(</)((\\2))\\s*(>)|(/>)|(?=</\\w+)",
1654 +
              "endCaptures": {
1655 +
                "0": {
1656 +
                  "name": "meta.tag.other.invalid.end.html"
1657 +
                },
1658 +
                "1": {
1659 +
                  "name": "punctuation.definition.tag.begin.html"
1660 +
                },
1661 +
                "2": {
1662 +
                  "name": "entity.name.tag.html"
1663 +
                },
1664 +
                "3": {
1665 +
                  "name": "invalid.illegal.unrecognized-tag.html"
1666 +
                },
1667 +
                "4": {
1668 +
                  "name": "punctuation.definition.tag.end.html"
1669 +
                },
1670 +
                "5": {
1671 +
                  "name": "punctuation.definition.tag.end.html"
1672 +
                }
1673 +
              },
1674 +
              "name": "meta.element.other.invalid.html",
1675 +
              "patterns": [
1676 +
                {
1677 +
                  "begin": "(?<!>)\\G",
1678 +
                  "end": "(?=/>)|>",
1679 +
                  "endCaptures": {
1680 +
                    "0": {
1681 +
                      "name": "punctuation.definition.tag.end.html"
1682 +
                    }
1683 +
                  },
1684 +
                  "name": "meta.tag.other.invalid.start.html",
1685 +
                  "patterns": [
1686 +
                    {
1687 +
                      "include": "#attribute"
1688 +
                    }
1689 +
                  ]
1690 +
                },
1691 +
                {
1692 +
                  "include": "#tags"
1693 +
                }
1694 +
              ]
1695 +
            },
1696 +
            {
1697 +
              "include": "#tags-invalid"
1698 +
            }
1699 +
          ]
1700 +
        }
1701 +
      }
1702 +
    },
1703 +
    "tags-invalid": {
1704 +
      "patterns": [
1705 +
        {
1706 +
          "begin": "(</?)((\\w[^>\\s]*))(?<!/)",
1707 +
          "beginCaptures": {
1708 +
            "1": {
1709 +
              "name": "punctuation.definition.tag.begin.html"
1710 +
            },
1711 +
            "2": {
1712 +
              "name": "entity.name.tag.html"
1713 +
            },
1714 +
            "3": {
1715 +
              "name": "invalid.illegal.unrecognized-tag.html"
1716 +
            }
1717 +
          },
1718 +
          "end": "((?: ?/)?>)",
1719 +
          "endCaptures": {
1720 +
            "1": {
1721 +
              "name": "punctuation.definition.tag.end.html"
1722 +
            }
1723 +
          },
1724 +
          "name": "meta.tag.other.$2.html",
1725 +
          "patterns": [
1726 +
            {
1727 +
              "include": "#attribute"
1728 +
            }
1729 +
          ]
1730 +
        }
1731 +
      ]
1732 +
    },
1733 +
    "tags-valid": {
1734 +
      "patterns": [
1735 +
        {
1736 +
          "begin": "(^[\\t ]+)?(?=<(?i:style)\\b(?!-))",
1737 +
          "beginCaptures": {
1738 +
            "1": {
1739 +
              "name": "punctuation.whitespace.embedded.leading.html"
1740 +
            }
1741 +
          },
1742 +
          "end": "(?!\\G)([\\t ]*$\\n?)?",
1743 +
          "endCaptures": {
1744 +
            "1": {
1745 +
              "name": "punctuation.whitespace.embedded.trailing.html"
1746 +
            }
1747 +
          },
1748 +
          "patterns": [
1749 +
            {
1750 +
              "begin": "(?i)(<)(style)(?=\\s|/?>)",
1751 +
              "beginCaptures": {
1752 +
                "0": {
1753 +
                  "name": "meta.tag.metadata.style.start.html"
1754 +
                },
1755 +
                "1": {
1756 +
                  "name": "punctuation.definition.tag.begin.html"
1757 +
                },
1758 +
                "2": {
1759 +
                  "name": "entity.name.tag.html"
1760 +
                }
1761 +
              },
1762 +
              "end": "(?i)((<)/)(style)\\s*(>)",
1763 +
              "endCaptures": {
1764 +
                "0": {
1765 +
                  "name": "meta.tag.metadata.style.end.html"
1766 +
                },
1767 +
                "1": {
1768 +
                  "name": "punctuation.definition.tag.begin.html"
1769 +
                },
1770 +
                "2": {
1771 +
                  "name": "source.css-ignored-vscode"
1772 +
                },
1773 +
                "3": {
1774 +
                  "name": "entity.name.tag.html"
1775 +
                },
1776 +
                "4": {
1777 +
                  "name": "punctuation.definition.tag.end.html"
1778 +
                }
1779 +
              },
1780 +
              "name": "meta.embedded.block.html",
1781 +
              "patterns": [
1782 +
                {
1783 +
                  "begin": "\\G",
1784 +
                  "captures": {
1785 +
                    "1": {
1786 +
                      "name": "punctuation.definition.tag.end.html"
1787 +
                    }
1788 +
                  },
1789 +
                  "end": "(>)",
1790 +
                  "name": "meta.tag.metadata.style.start.html",
1791 +
                  "patterns": [
1792 +
                    {
1793 +
                      "include": "#attribute"
1794 +
                    }
1795 +
                  ]
1796 +
                },
1797 +
                {
1798 +
                  "begin": "(?!\\G)",
1799 +
                  "end": "(?=</(?i:style))",
1800 +
                  "name": "source.css",
1801 +
                  "patterns": [
1802 +
                    {
1803 +
                      "include": "source.css"
1804 +
                    }
1805 +
                  ]
1806 +
                }
1807 +
              ]
1808 +
            }
1809 +
          ]
1810 +
        },
1811 +
        {
1812 +
          "begin": "(^[\\t ]+)?(?=<(?i:script)\\b(?!-))",
1813 +
          "beginCaptures": {
1814 +
            "1": {
1815 +
              "name": "punctuation.whitespace.embedded.leading.html"
1816 +
            }
1817 +
          },
1818 +
          "end": "(?!\\G)([\\t ]*$\\n?)?",
1819 +
          "endCaptures": {
1820 +
            "1": {
1821 +
              "name": "punctuation.whitespace.embedded.trailing.html"
1822 +
            }
1823 +
          },
1824 +
          "patterns": [
1825 +
            {
1826 +
              "begin": "(<)((?i:script))\\b",
1827 +
              "beginCaptures": {
1828 +
                "0": {
1829 +
                  "name": "meta.tag.metadata.script.start.html"
1830 +
                },
1831 +
                "1": {
1832 +
                  "name": "punctuation.definition.tag.begin.html"
1833 +
                },
1834 +
                "2": {
1835 +
                  "name": "entity.name.tag.html"
1836 +
                }
1837 +
              },
1838 +
              "end": "(/)((?i:script))(>)",
1839 +
              "endCaptures": {
1840 +
                "0": {
1841 +
                  "name": "meta.tag.metadata.script.end.html"
1842 +
                },
1843 +
                "1": {
1844 +
                  "name": "punctuation.definition.tag.begin.html"
1845 +
                },
1846 +
                "2": {
1847 +
                  "name": "entity.name.tag.html"
1848 +
                },
1849 +
                "3": {
1850 +
                  "name": "punctuation.definition.tag.end.html"
1851 +
                }
1852 +
              },
1853 +
              "name": "meta.embedded.block.html",
1854 +
              "patterns": [
1855 +
                {
1856 +
                  "begin": "\\G",
1857 +
                  "end": "(?=/)",
1858 +
                  "patterns": [
1859 +
                    {
1860 +
                      "begin": "(>)",
1861 +
                      "beginCaptures": {
1862 +
                        "0": {
1863 +
                          "name": "meta.tag.metadata.script.start.html"
1864 +
                        },
1865 +
                        "1": {
1866 +
                          "name": "punctuation.definition.tag.end.html"
1867 +
                        }
1868 +
                      },
1869 +
                      "end": "((<))(?=/(?i:script))",
1870 +
                      "endCaptures": {
1871 +
                        "0": {
1872 +
                          "name": "meta.tag.metadata.script.end.html"
1873 +
                        },
1874 +
                        "1": {
1875 +
                          "name": "punctuation.definition.tag.begin.html"
1876 +
                        },
1877 +
                        "2": {
1878 +
                          "name": "source.js-ignored-vscode"
1879 +
                        }
1880 +
                      },
1881 +
                      "patterns": [
1882 +
                        {
1883 +
                          "begin": "\\G",
1884 +
                          "end": "(?=</(?i:script))",
1885 +
                          "name": "source.js",
1886 +
                          "patterns": [
1887 +
                            {
1888 +
                              "begin": "(^[\\t ]+)?(?=//)",
1889 +
                              "beginCaptures": {
1890 +
                                "1": {
1891 +
                                  "name": "punctuation.whitespace.comment.leading.js"
1892 +
                                }
1893 +
                              },
1894 +
                              "end": "(?!\\G)",
1895 +
                              "patterns": [
1896 +
                                {
1897 +
                                  "begin": "//",
1898 +
                                  "beginCaptures": {
1899 +
                                    "0": {
1900 +
                                      "name": "punctuation.definition.comment.js"
1901 +
                                    }
1902 +
                                  },
1903 +
                                  "end": "(?=</script)|\\n",
1904 +
                                  "name": "comment.line.double-slash.js"
1905 +
                                }
1906 +
                              ]
1907 +
                            },
1908 +
                            {
1909 +
                              "begin": "/\\*",
1910 +
                              "captures": {
1911 +
                                "0": {
1912 +
                                  "name": "punctuation.definition.comment.js"
1913 +
                                }
1914 +
                              },
1915 +
                              "end": "\\*/|(?=</script)",
1916 +
                              "name": "comment.block.js"
1917 +
                            },
1918 +
                            {
1919 +
                              "include": "source.js"
1920 +
                            }
1921 +
                          ]
1922 +
                        }
1923 +
                      ]
1924 +
                    },
1925 +
                    {
1926 +
                      "begin": "\\G",
1927 +
                      "end": "(?i:(?=>|type(?=[=\\s])(?!\\s*=\\s*(''|\"\"|([\"']?)(text/(javascript(1\\.[0-5])?|x-javascript|jscript|livescript|(x-)?ecmascript|babel)|application/((?:(x-)?jav|(x-)?ecm)ascript)|module)[\"'>\\s]))))",
1928 +
                      "name": "meta.tag.metadata.script.start.html",
1929 +
                      "patterns": [
1930 +
                        {
1931 +
                          "include": "#attribute"
1932 +
                        }
1933 +
                      ]
1934 +
                    },
1935 +
                    {
1936 +
                      "begin": "(?i:(?=type\\s*=\\s*([\"']?)text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\"'>\\s]))",
1937 +
                      "end": "((<))(?=/(?i:script))",
1938 +
                      "endCaptures": {
1939 +
                        "0": {
1940 +
                          "name": "meta.tag.metadata.script.end.html"
1941 +
                        },
1942 +
                        "1": {
1943 +
                          "name": "punctuation.definition.tag.begin.html"
1944 +
                        },
1945 +
                        "2": {
1946 +
                          "name": "text.html.basic"
1947 +
                        }
1948 +
                      },
1949 +
                      "patterns": [
1950 +
                        {
1951 +
                          "begin": "\\G",
1952 +
                          "end": "(>)",
1953 +
                          "endCaptures": {
1954 +
                            "1": {
1955 +
                              "name": "punctuation.definition.tag.end.html"
1956 +
                            }
1957 +
                          },
1958 +
                          "name": "meta.tag.metadata.script.start.html",
1959 +
                          "patterns": [
1960 +
                            {
1961 +
                              "include": "#attribute"
1962 +
                            }
1963 +
                          ]
1964 +
                        },
1965 +
                        {
1966 +
                          "begin": "(?!\\G)",
1967 +
                          "end": "(?=</(?i:script))",
1968 +
                          "name": "text.html.basic",
1969 +
                          "patterns": [
1970 +
                            {
1971 +
                              "include": "text.html.basic"
1972 +
                            }
1973 +
                          ]
1974 +
                        }
1975 +
                      ]
1976 +
                    },
1977 +
                    {
1978 +
                      "begin": "(?=(?i:type))",
1979 +
                      "end": "(<)(?=/(?i:script))",
1980 +
                      "endCaptures": {
1981 +
                        "0": {
1982 +
                          "name": "meta.tag.metadata.script.end.html"
1983 +
                        },
1984 +
                        "1": {
1985 +
                          "name": "punctuation.definition.tag.begin.html"
1986 +
                        }
1987 +
                      },
1988 +
                      "patterns": [
1989 +
                        {
1990 +
                          "begin": "\\G",
1991 +
                          "end": "(>)",
1992 +
                          "endCaptures": {
1993 +
                            "1": {
1994 +
                              "name": "punctuation.definition.tag.end.html"
1995 +
                            }
1996 +
                          },
1997 +
                          "name": "meta.tag.metadata.script.start.html",
1998 +
                          "patterns": [
1999 +
                            {
2000 +
                              "include": "#attribute"
2001 +
                            }
2002 +
                          ]
2003 +
                        },
2004 +
                        {
2005 +
                          "begin": "(?!\\G)",
2006 +
                          "end": "(?=</(?i:script))",
2007 +
                          "name": "source.unknown"
2008 +
                        }
2009 +
                      ]
2010 +
                    }
2011 +
                  ]
2012 +
                }
2013 +
              ]
2014 +
            }
2015 +
          ]
2016 +
        },
2017 +
        {
2018 +
          "begin": "(?i)(<)(base|link|meta)(?=\\s|/?>)",
2019 +
          "beginCaptures": {
2020 +
            "1": {
2021 +
              "name": "punctuation.definition.tag.begin.html"
2022 +
            },
2023 +
            "2": {
2024 +
              "name": "entity.name.tag.html"
2025 +
            }
2026 +
          },
2027 +
          "end": "/?>",
2028 +
          "endCaptures": {
2029 +
            "0": {
2030 +
              "name": "punctuation.definition.tag.end.html"
2031 +
            }
2032 +
          },
2033 +
          "name": "meta.tag.metadata.$2.void.html",
2034 +
          "patterns": [
2035 +
            {
2036 +
              "include": "#attribute"
2037 +
            }
2038 +
          ]
2039 +
        },
2040 +
        {
2041 +
          "begin": "(?i)(<)(noscript|title)(?=\\s|/?>)",
2042 +
          "beginCaptures": {
2043 +
            "1": {
2044 +
              "name": "punctuation.definition.tag.begin.html"
2045 +
            },
2046 +
            "2": {
2047 +
              "name": "entity.name.tag.html"
2048 +
            }
2049 +
          },
2050 +
          "end": ">",
2051 +
          "endCaptures": {
2052 +
            "0": {
2053 +
              "name": "punctuation.definition.tag.end.html"
2054 +
            }
2055 +
          },
2056 +
          "name": "meta.tag.metadata.$2.start.html",
2057 +
          "patterns": [
2058 +
            {
2059 +
              "include": "#attribute"
2060 +
            }
2061 +
          ]
2062 +
        },
2063 +
        {
2064 +
          "begin": "(?i)(</)(noscript|title)(?=\\s|/?>)",
2065 +
          "beginCaptures": {
2066 +
            "1": {
2067 +
              "name": "punctuation.definition.tag.begin.html"
2068 +
            },
2069 +
            "2": {
2070 +
              "name": "entity.name.tag.html"
2071 +
            }
2072 +
          },
2073 +
          "end": ">",
2074 +
          "endCaptures": {
2075 +
            "0": {
2076 +
              "name": "punctuation.definition.tag.end.html"
2077 +
            }
2078 +
          },
2079 +
          "name": "meta.tag.metadata.$2.end.html",
2080 +
          "patterns": [
2081 +
            {
2082 +
              "include": "#attribute"
2083 +
            }
2084 +
          ]
2085 +
        },
2086 +
        {
2087 +
          "begin": "(?i)(<)(col|hr|input)(?=\\s|/?>)",
2088 +
          "beginCaptures": {
2089 +
            "1": {
2090 +
              "name": "punctuation.definition.tag.begin.html"
2091 +
            },
2092 +
            "2": {
2093 +
              "name": "entity.name.tag.html"
2094 +
            }
2095 +
          },
2096 +
          "end": "/?>",
2097 +
          "endCaptures": {
2098 +
            "0": {
2099 +
              "name": "punctuation.definition.tag.end.html"
2100 +
            }
2101 +
          },
2102 +
          "name": "meta.tag.structure.$2.void.html",
2103 +
          "patterns": [
2104 +
            {
2105 +
              "include": "#attribute"
2106 +
            }
2107 +
          ]
2108 +
        },
2109 +
        {
2110 +
          "begin": "(?i)(<)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\s|/?>)",
2111 +
          "beginCaptures": {
2112 +
            "1": {
2113 +
              "name": "punctuation.definition.tag.begin.html"
2114 +
            },
2115 +
            "2": {
2116 +
              "name": "entity.name.tag.html"
2117 +
            }
2118 +
          },
2119 +
          "end": ">",
2120 +
          "endCaptures": {
2121 +
            "0": {
2122 +
              "name": "punctuation.definition.tag.end.html"
2123 +
            }
2124 +
          },
2125 +
          "name": "meta.tag.structure.$2.start.html",
2126 +
          "patterns": [
2127 +
            {
2128 +
              "include": "#attribute"
2129 +
            }
2130 +
          ]
2131 +
        },
2132 +
        {
2133 +
          "begin": "(?i)(</)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\s|/?>)",
2134 +
          "beginCaptures": {
2135 +
            "1": {
2136 +
              "name": "punctuation.definition.tag.begin.html"
2137 +
            },
2138 +
            "2": {
2139 +
              "name": "entity.name.tag.html"
2140 +
            }
2141 +
          },
2142 +
          "end": ">",
2143 +
          "endCaptures": {
2144 +
            "0": {
2145 +
              "name": "punctuation.definition.tag.end.html"
2146 +
            }
2147 +
          },
2148 +
          "name": "meta.tag.structure.$2.end.html",
2149 +
          "patterns": [
2150 +
            {
2151 +
              "include": "#attribute"
2152 +
            }
2153 +
          ]
2154 +
        },
2155 +
        {
2156 +
          "begin": "(?i)(<)(area|br|wbr)(?=\\s|/?>)",
2157 +
          "beginCaptures": {
2158 +
            "1": {
2159 +
              "name": "punctuation.definition.tag.begin.html"
2160 +
            },
2161 +
            "2": {
2162 +
              "name": "entity.name.tag.html"
2163 +
            }
2164 +
          },
2165 +
          "end": "/?>",
2166 +
          "endCaptures": {
2167 +
            "0": {
2168 +
              "name": "punctuation.definition.tag.end.html"
2169 +
            }
2170 +
          },
2171 +
          "name": "meta.tag.inline.$2.void.html",
2172 +
          "patterns": [
2173 +
            {
2174 +
              "include": "#attribute"
2175 +
            }
2176 +
          ]
2177 +
        },
2178 +
        {
2179 +
          "begin": "(?i)(<)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\s|/?>)",
2180 +
          "beginCaptures": {
2181 +
            "1": {
2182 +
              "name": "punctuation.definition.tag.begin.html"
2183 +
            },
2184 +
            "2": {
2185 +
              "name": "entity.name.tag.html"
2186 +
            }
2187 +
          },
2188 +
          "end": ">",
2189 +
          "endCaptures": {
2190 +
            "0": {
2191 +
              "name": "punctuation.definition.tag.end.html"
2192 +
            }
2193 +
          },
2194 +
          "name": "meta.tag.inline.$2.start.html",
2195 +
          "patterns": [
2196 +
            {
2197 +
              "include": "#attribute"
2198 +
            }
2199 +
          ]
2200 +
        },
2201 +
        {
2202 +
          "begin": "(?i)(</)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\s|/?>)",
2203 +
          "beginCaptures": {
2204 +
            "1": {
2205 +
              "name": "punctuation.definition.tag.begin.html"
2206 +
            },
2207 +
            "2": {
2208 +
              "name": "entity.name.tag.html"
2209 +
            }
2210 +
          },
2211 +
          "end": ">",
2212 +
          "endCaptures": {
2213 +
            "0": {
2214 +
              "name": "punctuation.definition.tag.end.html"
2215 +
            }
2216 +
          },
2217 +
          "name": "meta.tag.inline.$2.end.html",
2218 +
          "patterns": [
2219 +
            {
2220 +
              "include": "#attribute"
2221 +
            }
2222 +
          ]
2223 +
        },
2224 +
        {
2225 +
          "begin": "(?i)(<)(embed|img|param|source|track)(?=\\s|/?>)",
2226 +
          "beginCaptures": {
2227 +
            "1": {
2228 +
              "name": "punctuation.definition.tag.begin.html"
2229 +
            },
2230 +
            "2": {
2231 +
              "name": "entity.name.tag.html"
2232 +
            }
2233 +
          },
2234 +
          "end": "/?>",
2235 +
          "endCaptures": {
2236 +
            "0": {
2237 +
              "name": "punctuation.definition.tag.end.html"
2238 +
            }
2239 +
          },
2240 +
          "name": "meta.tag.object.$2.void.html",
2241 +
          "patterns": [
2242 +
            {
2243 +
              "include": "#attribute"
2244 +
            }
2245 +
          ]
2246 +
        },
2247 +
        {
2248 +
          "begin": "(?i)(<)(audio|canvas|iframe|object|picture|video)(?=\\s|/?>)",
2249 +
          "beginCaptures": {
2250 +
            "1": {
2251 +
              "name": "punctuation.definition.tag.begin.html"
2252 +
            },
2253 +
            "2": {
2254 +
              "name": "entity.name.tag.html"
2255 +
            }
2256 +
          },
2257 +
          "end": ">",
2258 +
          "endCaptures": {
2259 +
            "0": {
2260 +
              "name": "punctuation.definition.tag.end.html"
2261 +
            }
2262 +
          },
2263 +
          "name": "meta.tag.object.$2.start.html",
2264 +
          "patterns": [
2265 +
            {
2266 +
              "include": "#attribute"
2267 +
            }
2268 +
          ]
2269 +
        },
2270 +
        {
2271 +
          "begin": "(?i)(</)(audio|canvas|iframe|object|picture|video)(?=\\s|/?>)",
2272 +
          "beginCaptures": {
2273 +
            "1": {
2274 +
              "name": "punctuation.definition.tag.begin.html"
2275 +
            },
2276 +
            "2": {
2277 +
              "name": "entity.name.tag.html"
2278 +
            }
2279 +
          },
2280 +
          "end": ">",
2281 +
          "endCaptures": {
2282 +
            "0": {
2283 +
              "name": "punctuation.definition.tag.end.html"
2284 +
            }
2285 +
          },
2286 +
          "name": "meta.tag.object.$2.end.html",
2287 +
          "patterns": [
2288 +
            {
2289 +
              "include": "#attribute"
2290 +
            }
2291 +
          ]
2292 +
        },
2293 +
        {
2294 +
          "begin": "(?i)(<)((basefont|isindex))(?=\\s|/?>)",
2295 +
          "beginCaptures": {
2296 +
            "1": {
2297 +
              "name": "punctuation.definition.tag.begin.html"
2298 +
            },
2299 +
            "2": {
2300 +
              "name": "entity.name.tag.html"
2301 +
            },
2302 +
            "3": {
2303 +
              "name": "invalid.deprecated.html"
2304 +
            }
2305 +
          },
2306 +
          "end": "/?>",
2307 +
          "endCaptures": {
2308 +
            "0": {
2309 +
              "name": "punctuation.definition.tag.end.html"
2310 +
            }
2311 +
          },
2312 +
          "name": "meta.tag.metadata.$2.void.html",
2313 +
          "patterns": [
2314 +
            {
2315 +
              "include": "#attribute"
2316 +
            }
2317 +
          ]
2318 +
        },
2319 +
        {
2320 +
          "begin": "(?i)(<)((center|frameset|noembed|noframes))(?=\\s|/?>)",
2321 +
          "beginCaptures": {
2322 +
            "1": {
2323 +
              "name": "punctuation.definition.tag.begin.html"
2324 +
            },
2325 +
            "2": {
2326 +
              "name": "entity.name.tag.html"
2327 +
            },
2328 +
            "3": {
2329 +
              "name": "invalid.deprecated.html"
2330 +
            }
2331 +
          },
2332 +
          "end": ">",
2333 +
          "endCaptures": {
2334 +
            "0": {
2335 +
              "name": "punctuation.definition.tag.end.html"
2336 +
            }
2337 +
          },
2338 +
          "name": "meta.tag.structure.$2.start.html",
2339 +
          "patterns": [
2340 +
            {
2341 +
              "include": "#attribute"
2342 +
            }
2343 +
          ]
2344 +
        },
2345 +
        {
2346 +
          "begin": "(?i)(</)((center|frameset|noembed|noframes))(?=\\s|/?>)",
2347 +
          "beginCaptures": {
2348 +
            "1": {
2349 +
              "name": "punctuation.definition.tag.begin.html"
2350 +
            },
2351 +
            "2": {
2352 +
              "name": "entity.name.tag.html"
2353 +
            },
2354 +
            "3": {
2355 +
              "name": "invalid.deprecated.html"
2356 +
            }
2357 +
          },
2358 +
          "end": ">",
2359 +
          "endCaptures": {
2360 +
            "0": {
2361 +
              "name": "punctuation.definition.tag.end.html"
2362 +
            }
2363 +
          },
2364 +
          "name": "meta.tag.structure.$2.end.html",
2365 +
          "patterns": [
2366 +
            {
2367 +
              "include": "#attribute"
2368 +
            }
2369 +
          ]
2370 +
        },
2371 +
        {
2372 +
          "begin": "(?i)(<)((acronym|big|blink|font|strike|tt|xmp))(?=\\s|/?>)",
2373 +
          "beginCaptures": {
2374 +
            "1": {
2375 +
              "name": "punctuation.definition.tag.begin.html"
2376 +
            },
2377 +
            "2": {
2378 +
              "name": "entity.name.tag.html"
2379 +
            },
2380 +
            "3": {
2381 +
              "name": "invalid.deprecated.html"
2382 +
            }
2383 +
          },
2384 +
          "end": ">",
2385 +
          "endCaptures": {
2386 +
            "0": {
2387 +
              "name": "punctuation.definition.tag.end.html"
2388 +
            }
2389 +
          },
2390 +
          "name": "meta.tag.inline.$2.start.html",
2391 +
          "patterns": [
2392 +
            {
2393 +
              "include": "#attribute"
2394 +
            }
2395 +
          ]
2396 +
        },
2397 +
        {
2398 +
          "begin": "(?i)(</)((acronym|big|blink|font|strike|tt|xmp))(?=\\s|/?>)",
2399 +
          "beginCaptures": {
2400 +
            "1": {
2401 +
              "name": "punctuation.definition.tag.begin.html"
2402 +
            },
2403 +
            "2": {
2404 +
              "name": "entity.name.tag.html"
2405 +
            },
2406 +
            "3": {
2407 +
              "name": "invalid.deprecated.html"
2408 +
            }
2409 +
          },
2410 +
          "end": ">",
2411 +
          "endCaptures": {
2412 +
            "0": {
2413 +
              "name": "punctuation.definition.tag.end.html"
2414 +
            }
2415 +
          },
2416 +
          "name": "meta.tag.inline.$2.end.html",
2417 +
          "patterns": [
2418 +
            {
2419 +
              "include": "#attribute"
2420 +
            }
2421 +
          ]
2422 +
        },
2423 +
        {
2424 +
          "begin": "(?i)(<)((frame))(?=\\s|/?>)",
2425 +
          "beginCaptures": {
2426 +
            "1": {
2427 +
              "name": "punctuation.definition.tag.begin.html"
2428 +
            },
2429 +
            "2": {
2430 +
              "name": "entity.name.tag.html"
2431 +
            },
2432 +
            "3": {
2433 +
              "name": "invalid.deprecated.html"
2434 +
            }
2435 +
          },
2436 +
          "end": "/?>",
2437 +
          "endCaptures": {
2438 +
            "0": {
2439 +
              "name": "punctuation.definition.tag.end.html"
2440 +
            }
2441 +
          },
2442 +
          "name": "meta.tag.object.$2.void.html",
2443 +
          "patterns": [
2444 +
            {
2445 +
              "include": "#attribute"
2446 +
            }
2447 +
          ]
2448 +
        },
2449 +
        {
2450 +
          "begin": "(?i)(<)((applet))(?=\\s|/?>)",
2451 +
          "beginCaptures": {
2452 +
            "1": {
2453 +
              "name": "punctuation.definition.tag.begin.html"
2454 +
            },
2455 +
            "2": {
2456 +
              "name": "entity.name.tag.html"
2457 +
            },
2458 +
            "3": {
2459 +
              "name": "invalid.deprecated.html"
2460 +
            }
2461 +
          },
2462 +
          "end": ">",
2463 +
          "endCaptures": {
2464 +
            "0": {
2465 +
              "name": "punctuation.definition.tag.end.html"
2466 +
            }
2467 +
          },
2468 +
          "name": "meta.tag.object.$2.start.html",
2469 +
          "patterns": [
2470 +
            {
2471 +
              "include": "#attribute"
2472 +
            }
2473 +
          ]
2474 +
        },
2475 +
        {
2476 +
          "begin": "(?i)(</)((applet))(?=\\s|/?>)",
2477 +
          "beginCaptures": {
2478 +
            "1": {
2479 +
              "name": "punctuation.definition.tag.begin.html"
2480 +
            },
2481 +
            "2": {
2482 +
              "name": "entity.name.tag.html"
2483 +
            },
2484 +
            "3": {
2485 +
              "name": "invalid.deprecated.html"
2486 +
            }
2487 +
          },
2488 +
          "end": ">",
2489 +
          "endCaptures": {
2490 +
            "0": {
2491 +
              "name": "punctuation.definition.tag.end.html"
2492 +
            }
2493 +
          },
2494 +
          "name": "meta.tag.object.$2.end.html",
2495 +
          "patterns": [
2496 +
            {
2497 +
              "include": "#attribute"
2498 +
            }
2499 +
          ]
2500 +
        },
2501 +
        {
2502 +
          "begin": "(?i)(<)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\s|/?>)",
2503 +
          "beginCaptures": {
2504 +
            "1": {
2505 +
              "name": "punctuation.definition.tag.begin.html"
2506 +
            },
2507 +
            "2": {
2508 +
              "name": "entity.name.tag.html"
2509 +
            },
2510 +
            "3": {
2511 +
              "name": "invalid.illegal.no-longer-supported.html"
2512 +
            }
2513 +
          },
2514 +
          "end": ">",
2515 +
          "endCaptures": {
2516 +
            "0": {
2517 +
              "name": "punctuation.definition.tag.end.html"
2518 +
            }
2519 +
          },
2520 +
          "name": "meta.tag.other.$2.start.html",
2521 +
          "patterns": [
2522 +
            {
2523 +
              "include": "#attribute"
2524 +
            }
2525 +
          ]
2526 +
        },
2527 +
        {
2528 +
          "begin": "(?i)(</)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\s|/?>)",
2529 +
          "beginCaptures": {
2530 +
            "1": {
2531 +
              "name": "punctuation.definition.tag.begin.html"
2532 +
            },
2533 +
            "2": {
2534 +
              "name": "entity.name.tag.html"
2535 +
            },
2536 +
            "3": {
2537 +
              "name": "invalid.illegal.no-longer-supported.html"
2538 +
            }
2539 +
          },
2540 +
          "end": ">",
2541 +
          "endCaptures": {
2542 +
            "0": {
2543 +
              "name": "punctuation.definition.tag.end.html"
2544 +
            }
2545 +
          },
2546 +
          "name": "meta.tag.other.$2.end.html",
2547 +
          "patterns": [
2548 +
            {
2549 +
              "include": "#attribute"
2550 +
            }
2551 +
          ]
2552 +
        },
2553 +
        {
2554 +
          "include": "#math"
2555 +
        },
2556 +
        {
2557 +
          "include": "#svg"
2558 +
        },
2559 +
        {
2560 +
          "begin": "(<)([A-Za-z][.0-9A-Z_a-zยทร€-ร–ร˜-รถรธ-อฝอฟ-แฟฟโ€Œโ€โ€ฟโ€โฐ-โ†โฐ€-โฟฏใ€-ํŸฟ๏ค€-๏ท๏ทฐ-๏ฟฝ๐€€-\\x{EFFFF}]*-[-.0-9A-Z_a-zยทร€-ร–ร˜-รถรธ-อฝอฟ-แฟฟโ€Œโ€โ€ฟโ€โฐ-โ†โฐ€-โฟฏใ€-ํŸฟ๏ค€-๏ท๏ทฐ-๏ฟฝ๐€€-\\x{EFFFF}]*)(?=\\s|/?>)",
2561 +
          "beginCaptures": {
2562 +
            "1": {
2563 +
              "name": "punctuation.definition.tag.begin.html"
2564 +
            },
2565 +
            "2": {
2566 +
              "name": "entity.name.tag.html"
2567 +
            }
2568 +
          },
2569 +
          "end": "/?>",
2570 +
          "endCaptures": {
2571 +
            "0": {
2572 +
              "name": "punctuation.definition.tag.end.html"
2573 +
            }
2574 +
          },
2575 +
          "name": "meta.tag.custom.start.html",
2576 +
          "patterns": [
2577 +
            {
2578 +
              "include": "#attribute"
2579 +
            }
2580 +
          ]
2581 +
        },
2582 +
        {
2583 +
          "begin": "(</)([A-Za-z][.0-9A-Z_a-zยทร€-ร–ร˜-รถรธ-อฝอฟ-แฟฟโ€Œโ€โ€ฟโ€โฐ-โ†โฐ€-โฟฏใ€-ํŸฟ๏ค€-๏ท๏ทฐ-๏ฟฝ๐€€-\\x{EFFFF}]*-[-.0-9A-Z_a-zยทร€-ร–ร˜-รถรธ-อฝอฟ-แฟฟโ€Œโ€โ€ฟโ€โฐ-โ†โฐ€-โฟฏใ€-ํŸฟ๏ค€-๏ท๏ทฐ-๏ฟฝ๐€€-\\x{EFFFF}]*)(?=\\s|/?>)",
2584 +
          "beginCaptures": {
2585 +
            "1": {
2586 +
              "name": "punctuation.definition.tag.begin.html"
2587 +
            },
2588 +
            "2": {
2589 +
              "name": "entity.name.tag.html"
2590 +
            }
2591 +
          },
2592 +
          "end": ">",
2593 +
          "endCaptures": {
2594 +
            "0": {
2595 +
              "name": "punctuation.definition.tag.end.html"
2596 +
            }
2597 +
          },
2598 +
          "name": "meta.tag.custom.end.html",
2599 +
          "patterns": [
2600 +
            {
2601 +
              "include": "#attribute"
2602 +
            }
2603 +
          ]
2604 +
        }
2605 +
      ]
2606 +
    },
2607 +
    "xml-processing": {
2608 +
      "begin": "(<\\?)(xml)",
2609 +
      "captures": {
2610 +
        "1": {
2611 +
          "name": "punctuation.definition.tag.html"
2612 +
        },
2613 +
        "2": {
2614 +
          "name": "entity.name.tag.html"
2615 +
        }
2616 +
      },
2617 +
      "end": "(\\?>)",
2618 +
      "name": "meta.tag.metadata.processing.xml.html",
2619 +
      "patterns": [
2620 +
        {
2621 +
          "include": "#attribute"
2622 +
        }
2623 +
      ]
2624 +
    }
2625 +
  },
2626 +
  "scopeName": "text.html.basic"
2627 +
}
crates/diff/src/syntaxes/markdown.json added +3263 -0
1 +
{
2 +
  "displayName": "Markdown",
3 +
  "name": "markdown",
4 +
  "patterns": [
5 +
    {
6 +
      "include": "#frontMatter"
7 +
    },
8 +
    {
9 +
      "include": "#block"
10 +
    }
11 +
  ],
12 +
  "repository": {
13 +
    "ampersand": {
14 +
      "match": "&(?!([0-9A-Za-z]+|#[0-9]+|#x\\h+);)",
15 +
      "name": "meta.other.valid-ampersand.markdown"
16 +
    },
17 +
    "block": {
18 +
      "patterns": [
19 +
        {
20 +
          "include": "#separator"
21 +
        },
22 +
        {
23 +
          "include": "#heading"
24 +
        },
25 +
        {
26 +
          "include": "#blockquote"
27 +
        },
28 +
        {
29 +
          "include": "#lists"
30 +
        },
31 +
        {
32 +
          "include": "#fenced_code_block"
33 +
        },
34 +
        {
35 +
          "include": "#raw_block"
36 +
        },
37 +
        {
38 +
          "include": "#link-def"
39 +
        },
40 +
        {
41 +
          "include": "#html"
42 +
        },
43 +
        {
44 +
          "include": "#table"
45 +
        },
46 +
        {
47 +
          "include": "#paragraph"
48 +
        }
49 +
      ]
50 +
    },
51 +
    "blockquote": {
52 +
      "begin": "(^|\\G) {0,3}(>) ?",
53 +
      "captures": {
54 +
        "2": {
55 +
          "name": "punctuation.definition.quote.begin.markdown"
56 +
        }
57 +
      },
58 +
      "name": "markup.quote.markdown",
59 +
      "patterns": [
60 +
        {
61 +
          "include": "#block"
62 +
        }
63 +
      ],
64 +
      "while": "(^|\\G)\\s*(>) ?"
65 +
    },
66 +
    "bold": {
67 +
      "begin": "(?<open>(\\*\\*(?=\\w)|(?<!\\w)\\*\\*|(?<!\\w)\\b__))(?=\\S)(?=(<[^>]*+>|(?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>|\\\\[-\\]!#(-+.>\\[\\\\_`{}]?+|\\[((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+](( ?\\[[^]]*+])|(\\([\\t ]*+<?(.*?)>?[\\t ]*+((?<title>[\"'])(.*?)\\k<title>)?\\))))|(?!(?<=\\S)\\k<open>).)++(?<=\\S)(?=__\\b|\\*\\*)\\k<open>)",
68 +
      "captures": {
69 +
        "1": {
70 +
          "name": "punctuation.definition.bold.markdown"
71 +
        }
72 +
      },
73 +
      "end": "(?<=\\S)(\\1)",
74 +
      "name": "markup.bold.markdown",
75 +
      "patterns": [
76 +
        {
77 +
          "applyEndPatternLast": 1,
78 +
          "begin": "(?=<[^>]*?>)",
79 +
          "end": "(?<=>)",
80 +
          "patterns": [
81 +
            {
82 +
              "include": "text.html.derivative"
83 +
            }
84 +
          ]
85 +
        },
86 +
        {
87 +
          "include": "#escape"
88 +
        },
89 +
        {
90 +
          "include": "#ampersand"
91 +
        },
92 +
        {
93 +
          "include": "#bracket"
94 +
        },
95 +
        {
96 +
          "include": "#raw"
97 +
        },
98 +
        {
99 +
          "include": "#bold"
100 +
        },
101 +
        {
102 +
          "include": "#italic"
103 +
        },
104 +
        {
105 +
          "include": "#image-inline"
106 +
        },
107 +
        {
108 +
          "include": "#link-inline"
109 +
        },
110 +
        {
111 +
          "include": "#link-inet"
112 +
        },
113 +
        {
114 +
          "include": "#link-email"
115 +
        },
116 +
        {
117 +
          "include": "#image-ref"
118 +
        },
119 +
        {
120 +
          "include": "#link-ref-literal"
121 +
        },
122 +
        {
123 +
          "include": "#link-ref"
124 +
        },
125 +
        {
126 +
          "include": "#link-ref-shortcut"
127 +
        },
128 +
        {
129 +
          "include": "#strikethrough"
130 +
        }
131 +
      ]
132 +
    },
133 +
    "bracket": {
134 +
      "match": "<(?![!$/?A-Za-z])",
135 +
      "name": "meta.other.valid-bracket.markdown"
136 +
    },
137 +
    "escape": {
138 +
      "match": "\\\\[-\\]!#(-+.>\\[\\\\_`{}]",
139 +
      "name": "constant.character.escape.markdown"
140 +
    },
141 +
    "fenced_code_block": {
142 +
      "patterns": [
143 +
        {
144 +
          "include": "#fenced_code_block_css"
145 +
        },
146 +
        {
147 +
          "include": "#fenced_code_block_basic"
148 +
        },
149 +
        {
150 +
          "include": "#fenced_code_block_ini"
151 +
        },
152 +
        {
153 +
          "include": "#fenced_code_block_java"
154 +
        },
155 +
        {
156 +
          "include": "#fenced_code_block_lua"
157 +
        },
158 +
        {
159 +
          "include": "#fenced_code_block_makefile"
160 +
        },
161 +
        {
162 +
          "include": "#fenced_code_block_perl"
163 +
        },
164 +
        {
165 +
          "include": "#fenced_code_block_r"
166 +
        },
167 +
        {
168 +
          "include": "#fenced_code_block_ruby"
169 +
        },
170 +
        {
171 +
          "include": "#fenced_code_block_php"
172 +
        },
173 +
        {
174 +
          "include": "#fenced_code_block_sql"
175 +
        },
176 +
        {
177 +
          "include": "#fenced_code_block_vs_net"
178 +
        },
179 +
        {
180 +
          "include": "#fenced_code_block_xml"
181 +
        },
182 +
        {
183 +
          "include": "#fenced_code_block_xsl"
184 +
        },
185 +
        {
186 +
          "include": "#fenced_code_block_yaml"
187 +
        },
188 +
        {
189 +
          "include": "#fenced_code_block_dosbatch"
190 +
        },
191 +
        {
192 +
          "include": "#fenced_code_block_clojure"
193 +
        },
194 +
        {
195 +
          "include": "#fenced_code_block_coffee"
196 +
        },
197 +
        {
198 +
          "include": "#fenced_code_block_c"
199 +
        },
200 +
        {
201 +
          "include": "#fenced_code_block_cpp"
202 +
        },
203 +
        {
204 +
          "include": "#fenced_code_block_diff"
205 +
        },
206 +
        {
207 +
          "include": "#fenced_code_block_dockerfile"
208 +
        },
209 +
        {
210 +
          "include": "#fenced_code_block_git_commit"
211 +
        },
212 +
        {
213 +
          "include": "#fenced_code_block_git_rebase"
214 +
        },
215 +
        {
216 +
          "include": "#fenced_code_block_go"
217 +
        },
218 +
        {
219 +
          "include": "#fenced_code_block_groovy"
220 +
        },
221 +
        {
222 +
          "include": "#fenced_code_block_pug"
223 +
        },
224 +
        {
225 +
          "include": "#fenced_code_block_ignore"
226 +
        },
227 +
        {
228 +
          "include": "#fenced_code_block_js"
229 +
        },
230 +
        {
231 +
          "include": "#fenced_code_block_js_regexp"
232 +
        },
233 +
        {
234 +
          "include": "#fenced_code_block_json"
235 +
        },
236 +
        {
237 +
          "include": "#fenced_code_block_jsonc"
238 +
        },
239 +
        {
240 +
          "include": "#fenced_code_block_jsonl"
241 +
        },
242 +
        {
243 +
          "include": "#fenced_code_block_less"
244 +
        },
245 +
        {
246 +
          "include": "#fenced_code_block_objc"
247 +
        },
248 +
        {
249 +
          "include": "#fenced_code_block_swift"
250 +
        },
251 +
        {
252 +
          "include": "#fenced_code_block_scss"
253 +
        },
254 +
        {
255 +
          "include": "#fenced_code_block_perl6"
256 +
        },
257 +
        {
258 +
          "include": "#fenced_code_block_powershell"
259 +
        },
260 +
        {
261 +
          "include": "#fenced_code_block_python"
262 +
        },
263 +
        {
264 +
          "include": "#fenced_code_block_julia"
265 +
        },
266 +
        {
267 +
          "include": "#fenced_code_block_regexp_python"
268 +
        },
269 +
        {
270 +
          "include": "#fenced_code_block_rust"
271 +
        },
272 +
        {
273 +
          "include": "#fenced_code_block_scala"
274 +
        },
275 +
        {
276 +
          "include": "#fenced_code_block_shell"
277 +
        },
278 +
        {
279 +
          "include": "#fenced_code_block_ts"
280 +
        },
281 +
        {
282 +
          "include": "#fenced_code_block_tsx"
283 +
        },
284 +
        {
285 +
          "include": "#fenced_code_block_csharp"
286 +
        },
287 +
        {
288 +
          "include": "#fenced_code_block_fsharp"
289 +
        },
290 +
        {
291 +
          "include": "#fenced_code_block_dart"
292 +
        },
293 +
        {
294 +
          "include": "#fenced_code_block_handlebars"
295 +
        },
296 +
        {
297 +
          "include": "#fenced_code_block_markdown"
298 +
        },
299 +
        {
300 +
          "include": "#fenced_code_block_log"
301 +
        },
302 +
        {
303 +
          "include": "#fenced_code_block_erlang"
304 +
        },
305 +
        {
306 +
          "include": "#fenced_code_block_elixir"
307 +
        },
308 +
        {
309 +
          "include": "#fenced_code_block_latex"
310 +
        },
311 +
        {
312 +
          "include": "#fenced_code_block_bibtex"
313 +
        },
314 +
        {
315 +
          "include": "#fenced_code_block_twig"
316 +
        },
317 +
        {
318 +
          "include": "#fenced_code_block_yang"
319 +
        },
320 +
        {
321 +
          "include": "#fenced_code_block_abap"
322 +
        },
323 +
        {
324 +
          "include": "#fenced_code_block_restructuredtext"
325 +
        },
326 +
        {
327 +
          "include": "#fenced_code_block_unknown"
328 +
        }
329 +
      ]
330 +
    },
331 +
    "fenced_code_block_abap": {
332 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(abap)((\\s+|[,:?{])[^`]*)?$)",
333 +
      "beginCaptures": {
334 +
        "3": {
335 +
          "name": "punctuation.definition.markdown"
336 +
        },
337 +
        "4": {
338 +
          "name": "fenced_code.block.language.markdown"
339 +
        },
340 +
        "5": {
341 +
          "name": "fenced_code.block.language.attributes.markdown"
342 +
        }
343 +
      },
344 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
345 +
      "endCaptures": {
346 +
        "3": {
347 +
          "name": "punctuation.definition.markdown"
348 +
        }
349 +
      },
350 +
      "name": "markup.fenced_code.block.markdown",
351 +
      "patterns": [
352 +
        {
353 +
          "begin": "(^|\\G)(\\s*)(.*)",
354 +
          "contentName": "meta.embedded.block.abap",
355 +
          "patterns": [
356 +
            {
357 +
              "include": "source.abap"
358 +
            }
359 +
          ],
360 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
361 +
        }
362 +
      ]
363 +
    },
364 +
    "fenced_code_block_basic": {
365 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(html?|shtml|xhtml|inc|tmpl|tpl)((\\s+|[,:?{])[^`]*)?$)",
366 +
      "beginCaptures": {
367 +
        "3": {
368 +
          "name": "punctuation.definition.markdown"
369 +
        },
370 +
        "4": {
371 +
          "name": "fenced_code.block.language.markdown"
372 +
        },
373 +
        "5": {
374 +
          "name": "fenced_code.block.language.attributes.markdown"
375 +
        }
376 +
      },
377 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
378 +
      "endCaptures": {
379 +
        "3": {
380 +
          "name": "punctuation.definition.markdown"
381 +
        }
382 +
      },
383 +
      "name": "markup.fenced_code.block.markdown",
384 +
      "patterns": [
385 +
        {
386 +
          "begin": "(^|\\G)(\\s*)(.*)",
387 +
          "contentName": "meta.embedded.block.html",
388 +
          "patterns": [
389 +
            {
390 +
              "include": "text.html.basic"
391 +
            }
392 +
          ],
393 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
394 +
        }
395 +
      ]
396 +
    },
397 +
    "fenced_code_block_bibtex": {
398 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bibtex)((\\s+|[,:?{])[^`]*)?$)",
399 +
      "beginCaptures": {
400 +
        "3": {
401 +
          "name": "punctuation.definition.markdown"
402 +
        },
403 +
        "4": {
404 +
          "name": "fenced_code.block.language.markdown"
405 +
        },
406 +
        "5": {
407 +
          "name": "fenced_code.block.language.attributes.markdown"
408 +
        }
409 +
      },
410 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
411 +
      "endCaptures": {
412 +
        "3": {
413 +
          "name": "punctuation.definition.markdown"
414 +
        }
415 +
      },
416 +
      "name": "markup.fenced_code.block.markdown",
417 +
      "patterns": [
418 +
        {
419 +
          "begin": "(^|\\G)(\\s*)(.*)",
420 +
          "contentName": "meta.embedded.block.bibtex",
421 +
          "patterns": [
422 +
            {
423 +
              "include": "text.bibtex"
424 +
            }
425 +
          ],
426 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
427 +
        }
428 +
      ]
429 +
    },
430 +
    "fenced_code_block_c": {
431 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:([ch])((\\s+|[,:?{])[^`]*)?$)",
432 +
      "beginCaptures": {
433 +
        "3": {
434 +
          "name": "punctuation.definition.markdown"
435 +
        },
436 +
        "4": {
437 +
          "name": "fenced_code.block.language.markdown"
438 +
        },
439 +
        "5": {
440 +
          "name": "fenced_code.block.language.attributes.markdown"
441 +
        }
442 +
      },
443 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
444 +
      "endCaptures": {
445 +
        "3": {
446 +
          "name": "punctuation.definition.markdown"
447 +
        }
448 +
      },
449 +
      "name": "markup.fenced_code.block.markdown",
450 +
      "patterns": [
451 +
        {
452 +
          "begin": "(^|\\G)(\\s*)(.*)",
453 +
          "contentName": "meta.embedded.block.c",
454 +
          "patterns": [
455 +
            {
456 +
              "include": "source.c"
457 +
            }
458 +
          ],
459 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
460 +
        }
461 +
      ]
462 +
    },
463 +
    "fenced_code_block_clojure": {
464 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(cl(?:js??|ojure))((\\s+|[,:?{])[^`]*)?$)",
465 +
      "beginCaptures": {
466 +
        "3": {
467 +
          "name": "punctuation.definition.markdown"
468 +
        },
469 +
        "4": {
470 +
          "name": "fenced_code.block.language.markdown"
471 +
        },
472 +
        "5": {
473 +
          "name": "fenced_code.block.language.attributes.markdown"
474 +
        }
475 +
      },
476 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
477 +
      "endCaptures": {
478 +
        "3": {
479 +
          "name": "punctuation.definition.markdown"
480 +
        }
481 +
      },
482 +
      "name": "markup.fenced_code.block.markdown",
483 +
      "patterns": [
484 +
        {
485 +
          "begin": "(^|\\G)(\\s*)(.*)",
486 +
          "contentName": "meta.embedded.block.clojure",
487 +
          "patterns": [
488 +
            {
489 +
              "include": "source.clojure"
490 +
            }
491 +
          ],
492 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
493 +
        }
494 +
      ]
495 +
    },
496 +
    "fenced_code_block_coffee": {
497 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(coffee|Cakefile|coffee.erb)((\\s+|[,:?{])[^`]*)?$)",
498 +
      "beginCaptures": {
499 +
        "3": {
500 +
          "name": "punctuation.definition.markdown"
501 +
        },
502 +
        "4": {
503 +
          "name": "fenced_code.block.language.markdown"
504 +
        },
505 +
        "5": {
506 +
          "name": "fenced_code.block.language.attributes.markdown"
507 +
        }
508 +
      },
509 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
510 +
      "endCaptures": {
511 +
        "3": {
512 +
          "name": "punctuation.definition.markdown"
513 +
        }
514 +
      },
515 +
      "name": "markup.fenced_code.block.markdown",
516 +
      "patterns": [
517 +
        {
518 +
          "begin": "(^|\\G)(\\s*)(.*)",
519 +
          "contentName": "meta.embedded.block.coffee",
520 +
          "patterns": [
521 +
            {
522 +
              "include": "source.coffee"
523 +
            }
524 +
          ],
525 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
526 +
        }
527 +
      ]
528 +
    },
529 +
    "fenced_code_block_cpp": {
530 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c(?:pp|\\+\\+|xx))((\\s+|[,:?{])[^`]*)?$)",
531 +
      "beginCaptures": {
532 +
        "3": {
533 +
          "name": "punctuation.definition.markdown"
534 +
        },
535 +
        "4": {
536 +
          "name": "fenced_code.block.language.markdown"
537 +
        },
538 +
        "5": {
539 +
          "name": "fenced_code.block.language.attributes.markdown"
540 +
        }
541 +
      },
542 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
543 +
      "endCaptures": {
544 +
        "3": {
545 +
          "name": "punctuation.definition.markdown"
546 +
        }
547 +
      },
548 +
      "name": "markup.fenced_code.block.markdown",
549 +
      "patterns": [
550 +
        {
551 +
          "begin": "(^|\\G)(\\s*)(.*)",
552 +
          "contentName": "meta.embedded.block.cpp source.cpp",
553 +
          "patterns": [
554 +
            {
555 +
              "include": "source.cpp"
556 +
            }
557 +
          ],
558 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
559 +
        }
560 +
      ]
561 +
    },
562 +
    "fenced_code_block_csharp": {
563 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(c(?:s|sharp|#))((\\s+|[,:?{])[^`]*)?$)",
564 +
      "beginCaptures": {
565 +
        "3": {
566 +
          "name": "punctuation.definition.markdown"
567 +
        },
568 +
        "4": {
569 +
          "name": "fenced_code.block.language.markdown"
570 +
        },
571 +
        "5": {
572 +
          "name": "fenced_code.block.language.attributes.markdown"
573 +
        }
574 +
      },
575 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
576 +
      "endCaptures": {
577 +
        "3": {
578 +
          "name": "punctuation.definition.markdown"
579 +
        }
580 +
      },
581 +
      "name": "markup.fenced_code.block.markdown",
582 +
      "patterns": [
583 +
        {
584 +
          "begin": "(^|\\G)(\\s*)(.*)",
585 +
          "contentName": "meta.embedded.block.csharp",
586 +
          "patterns": [
587 +
            {
588 +
              "include": "source.cs"
589 +
            }
590 +
          ],
591 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
592 +
        }
593 +
      ]
594 +
    },
595 +
    "fenced_code_block_css": {
596 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(css(?:|.erb))((\\s+|[,:?{])[^`]*)?$)",
597 +
      "beginCaptures": {
598 +
        "3": {
599 +
          "name": "punctuation.definition.markdown"
600 +
        },
601 +
        "4": {
602 +
          "name": "fenced_code.block.language.markdown"
603 +
        },
604 +
        "5": {
605 +
          "name": "fenced_code.block.language.attributes.markdown"
606 +
        }
607 +
      },
608 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
609 +
      "endCaptures": {
610 +
        "3": {
611 +
          "name": "punctuation.definition.markdown"
612 +
        }
613 +
      },
614 +
      "name": "markup.fenced_code.block.markdown",
615 +
      "patterns": [
616 +
        {
617 +
          "begin": "(^|\\G)(\\s*)(.*)",
618 +
          "contentName": "meta.embedded.block.css",
619 +
          "patterns": [
620 +
            {
621 +
              "include": "source.css"
622 +
            }
623 +
          ],
624 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
625 +
        }
626 +
      ]
627 +
    },
628 +
    "fenced_code_block_dart": {
629 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(dart)((\\s+|[,:?{])[^`]*)?$)",
630 +
      "beginCaptures": {
631 +
        "3": {
632 +
          "name": "punctuation.definition.markdown"
633 +
        },
634 +
        "4": {
635 +
          "name": "fenced_code.block.language.markdown"
636 +
        },
637 +
        "5": {
638 +
          "name": "fenced_code.block.language.attributes.markdown"
639 +
        }
640 +
      },
641 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
642 +
      "endCaptures": {
643 +
        "3": {
644 +
          "name": "punctuation.definition.markdown"
645 +
        }
646 +
      },
647 +
      "name": "markup.fenced_code.block.markdown",
648 +
      "patterns": [
649 +
        {
650 +
          "begin": "(^|\\G)(\\s*)(.*)",
651 +
          "contentName": "meta.embedded.block.dart",
652 +
          "patterns": [
653 +
            {
654 +
              "include": "source.dart"
655 +
            }
656 +
          ],
657 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
658 +
        }
659 +
      ]
660 +
    },
661 +
    "fenced_code_block_diff": {
662 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|[,:?{])[^`]*)?$)",
663 +
      "beginCaptures": {
664 +
        "3": {
665 +
          "name": "punctuation.definition.markdown"
666 +
        },
667 +
        "4": {
668 +
          "name": "fenced_code.block.language.markdown"
669 +
        },
670 +
        "5": {
671 +
          "name": "fenced_code.block.language.attributes.markdown"
672 +
        }
673 +
      },
674 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
675 +
      "endCaptures": {
676 +
        "3": {
677 +
          "name": "punctuation.definition.markdown"
678 +
        }
679 +
      },
680 +
      "name": "markup.fenced_code.block.markdown",
681 +
      "patterns": [
682 +
        {
683 +
          "begin": "(^|\\G)(\\s*)(.*)",
684 +
          "contentName": "meta.embedded.block.diff",
685 +
          "patterns": [
686 +
            {
687 +
              "include": "source.diff"
688 +
            }
689 +
          ],
690 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
691 +
        }
692 +
      ]
693 +
    },
694 +
    "fenced_code_block_dockerfile": {
695 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:([Dd]ockerfile)((\\s+|[,:?{])[^`]*)?$)",
696 +
      "beginCaptures": {
697 +
        "3": {
698 +
          "name": "punctuation.definition.markdown"
699 +
        },
700 +
        "4": {
701 +
          "name": "fenced_code.block.language.markdown"
702 +
        },
703 +
        "5": {
704 +
          "name": "fenced_code.block.language.attributes.markdown"
705 +
        }
706 +
      },
707 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
708 +
      "endCaptures": {
709 +
        "3": {
710 +
          "name": "punctuation.definition.markdown"
711 +
        }
712 +
      },
713 +
      "name": "markup.fenced_code.block.markdown",
714 +
      "patterns": [
715 +
        {
716 +
          "begin": "(^|\\G)(\\s*)(.*)",
717 +
          "contentName": "meta.embedded.block.dockerfile",
718 +
          "patterns": [
719 +
            {
720 +
              "include": "source.dockerfile"
721 +
            }
722 +
          ],
723 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
724 +
        }
725 +
      ]
726 +
    },
727 +
    "fenced_code_block_dosbatch": {
728 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat(?:|ch))((\\s+|[,:?{])[^`]*)?$)",
729 +
      "beginCaptures": {
730 +
        "3": {
731 +
          "name": "punctuation.definition.markdown"
732 +
        },
733 +
        "4": {
734 +
          "name": "fenced_code.block.language.markdown"
735 +
        },
736 +
        "5": {
737 +
          "name": "fenced_code.block.language.attributes.markdown"
738 +
        }
739 +
      },
740 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
741 +
      "endCaptures": {
742 +
        "3": {
743 +
          "name": "punctuation.definition.markdown"
744 +
        }
745 +
      },
746 +
      "name": "markup.fenced_code.block.markdown",
747 +
      "patterns": [
748 +
        {
749 +
          "begin": "(^|\\G)(\\s*)(.*)",
750 +
          "contentName": "meta.embedded.block.dosbatch",
751 +
          "patterns": [
752 +
            {
753 +
              "include": "source.batchfile"
754 +
            }
755 +
          ],
756 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
757 +
        }
758 +
      ]
759 +
    },
760 +
    "fenced_code_block_elixir": {
761 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elixir)((\\s+|[,:?{])[^`]*)?$)",
762 +
      "beginCaptures": {
763 +
        "3": {
764 +
          "name": "punctuation.definition.markdown"
765 +
        },
766 +
        "4": {
767 +
          "name": "fenced_code.block.language.markdown"
768 +
        },
769 +
        "5": {
770 +
          "name": "fenced_code.block.language.attributes.markdown"
771 +
        }
772 +
      },
773 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
774 +
      "endCaptures": {
775 +
        "3": {
776 +
          "name": "punctuation.definition.markdown"
777 +
        }
778 +
      },
779 +
      "name": "markup.fenced_code.block.markdown",
780 +
      "patterns": [
781 +
        {
782 +
          "begin": "(^|\\G)(\\s*)(.*)",
783 +
          "contentName": "meta.embedded.block.elixir",
784 +
          "patterns": [
785 +
            {
786 +
              "include": "source.elixir"
787 +
            }
788 +
          ],
789 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
790 +
        }
791 +
      ]
792 +
    },
793 +
    "fenced_code_block_erlang": {
794 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(erlang)((\\s+|[,:?{])[^`]*)?$)",
795 +
      "beginCaptures": {
796 +
        "3": {
797 +
          "name": "punctuation.definition.markdown"
798 +
        },
799 +
        "4": {
800 +
          "name": "fenced_code.block.language.markdown"
801 +
        },
802 +
        "5": {
803 +
          "name": "fenced_code.block.language.attributes.markdown"
804 +
        }
805 +
      },
806 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
807 +
      "endCaptures": {
808 +
        "3": {
809 +
          "name": "punctuation.definition.markdown"
810 +
        }
811 +
      },
812 +
      "name": "markup.fenced_code.block.markdown",
813 +
      "patterns": [
814 +
        {
815 +
          "begin": "(^|\\G)(\\s*)(.*)",
816 +
          "contentName": "meta.embedded.block.erlang",
817 +
          "patterns": [
818 +
            {
819 +
              "include": "source.erlang"
820 +
            }
821 +
          ],
822 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
823 +
        }
824 +
      ]
825 +
    },
826 +
    "fenced_code_block_fsharp": {
827 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(f(?:s|sharp|#))((\\s+|[,:?{])[^`]*)?$)",
828 +
      "beginCaptures": {
829 +
        "3": {
830 +
          "name": "punctuation.definition.markdown"
831 +
        },
832 +
        "4": {
833 +
          "name": "fenced_code.block.language.markdown"
834 +
        },
835 +
        "5": {
836 +
          "name": "fenced_code.block.language.attributes.markdown"
837 +
        }
838 +
      },
839 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
840 +
      "endCaptures": {
841 +
        "3": {
842 +
          "name": "punctuation.definition.markdown"
843 +
        }
844 +
      },
845 +
      "name": "markup.fenced_code.block.markdown",
846 +
      "patterns": [
847 +
        {
848 +
          "begin": "(^|\\G)(\\s*)(.*)",
849 +
          "contentName": "meta.embedded.block.fsharp",
850 +
          "patterns": [
851 +
            {
852 +
              "include": "source.fsharp"
853 +
            }
854 +
          ],
855 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
856 +
        }
857 +
      ]
858 +
    },
859 +
    "fenced_code_block_git_commit": {
860 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:((?:COMMIT_EDIT|MERGE_)MSG)((\\s+|[,:?{])[^`]*)?$)",
861 +
      "beginCaptures": {
862 +
        "3": {
863 +
          "name": "punctuation.definition.markdown"
864 +
        },
865 +
        "4": {
866 +
          "name": "fenced_code.block.language.markdown"
867 +
        },
868 +
        "5": {
869 +
          "name": "fenced_code.block.language.attributes.markdown"
870 +
        }
871 +
      },
872 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
873 +
      "endCaptures": {
874 +
        "3": {
875 +
          "name": "punctuation.definition.markdown"
876 +
        }
877 +
      },
878 +
      "name": "markup.fenced_code.block.markdown",
879 +
      "patterns": [
880 +
        {
881 +
          "begin": "(^|\\G)(\\s*)(.*)",
882 +
          "contentName": "meta.embedded.block.git_commit",
883 +
          "patterns": [
884 +
            {
885 +
              "include": "text.git-commit"
886 +
            }
887 +
          ],
888 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
889 +
        }
890 +
      ]
891 +
    },
892 +
    "fenced_code_block_git_rebase": {
893 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(git-rebase-todo)((\\s+|[,:?{])[^`]*)?$)",
894 +
      "beginCaptures": {
895 +
        "3": {
896 +
          "name": "punctuation.definition.markdown"
897 +
        },
898 +
        "4": {
899 +
          "name": "fenced_code.block.language.markdown"
900 +
        },
901 +
        "5": {
902 +
          "name": "fenced_code.block.language.attributes.markdown"
903 +
        }
904 +
      },
905 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
906 +
      "endCaptures": {
907 +
        "3": {
908 +
          "name": "punctuation.definition.markdown"
909 +
        }
910 +
      },
911 +
      "name": "markup.fenced_code.block.markdown",
912 +
      "patterns": [
913 +
        {
914 +
          "begin": "(^|\\G)(\\s*)(.*)",
915 +
          "contentName": "meta.embedded.block.git_rebase",
916 +
          "patterns": [
917 +
            {
918 +
              "include": "text.git-rebase"
919 +
            }
920 +
          ],
921 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
922 +
        }
923 +
      ]
924 +
    },
925 +
    "fenced_code_block_go": {
926 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(go(?:|lang))((\\s+|[,:?{])[^`]*)?$)",
927 +
      "beginCaptures": {
928 +
        "3": {
929 +
          "name": "punctuation.definition.markdown"
930 +
        },
931 +
        "4": {
932 +
          "name": "fenced_code.block.language.markdown"
933 +
        },
934 +
        "5": {
935 +
          "name": "fenced_code.block.language.attributes.markdown"
936 +
        }
937 +
      },
938 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
939 +
      "endCaptures": {
940 +
        "3": {
941 +
          "name": "punctuation.definition.markdown"
942 +
        }
943 +
      },
944 +
      "name": "markup.fenced_code.block.markdown",
945 +
      "patterns": [
946 +
        {
947 +
          "begin": "(^|\\G)(\\s*)(.*)",
948 +
          "contentName": "meta.embedded.block.go",
949 +
          "patterns": [
950 +
            {
951 +
              "include": "source.go"
952 +
            }
953 +
          ],
954 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
955 +
        }
956 +
      ]
957 +
    },
958 +
    "fenced_code_block_groovy": {
959 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(g(?:roovy|vy))((\\s+|[,:?{])[^`]*)?$)",
960 +
      "beginCaptures": {
961 +
        "3": {
962 +
          "name": "punctuation.definition.markdown"
963 +
        },
964 +
        "4": {
965 +
          "name": "fenced_code.block.language.markdown"
966 +
        },
967 +
        "5": {
968 +
          "name": "fenced_code.block.language.attributes.markdown"
969 +
        }
970 +
      },
971 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
972 +
      "endCaptures": {
973 +
        "3": {
974 +
          "name": "punctuation.definition.markdown"
975 +
        }
976 +
      },
977 +
      "name": "markup.fenced_code.block.markdown",
978 +
      "patterns": [
979 +
        {
980 +
          "begin": "(^|\\G)(\\s*)(.*)",
981 +
          "contentName": "meta.embedded.block.groovy",
982 +
          "patterns": [
983 +
            {
984 +
              "include": "source.groovy"
985 +
            }
986 +
          ],
987 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
988 +
        }
989 +
      ]
990 +
    },
991 +
    "fenced_code_block_handlebars": {
992 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(h(?:andlebars|bs))((\\s+|[,:?{])[^`]*)?$)",
993 +
      "beginCaptures": {
994 +
        "3": {
995 +
          "name": "punctuation.definition.markdown"
996 +
        },
997 +
        "4": {
998 +
          "name": "fenced_code.block.language.markdown"
999 +
        },
1000 +
        "5": {
1001 +
          "name": "fenced_code.block.language.attributes.markdown"
1002 +
        }
1003 +
      },
1004 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1005 +
      "endCaptures": {
1006 +
        "3": {
1007 +
          "name": "punctuation.definition.markdown"
1008 +
        }
1009 +
      },
1010 +
      "name": "markup.fenced_code.block.markdown",
1011 +
      "patterns": [
1012 +
        {
1013 +
          "begin": "(^|\\G)(\\s*)(.*)",
1014 +
          "contentName": "meta.embedded.block.handlebars",
1015 +
          "patterns": [
1016 +
            {
1017 +
              "include": "text.html.handlebars"
1018 +
            }
1019 +
          ],
1020 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1021 +
        }
1022 +
      ]
1023 +
    },
1024 +
    "fenced_code_block_ignore": {
1025 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:((?:git|)ignore)((\\s+|[,:?{])[^`]*)?$)",
1026 +
      "beginCaptures": {
1027 +
        "3": {
1028 +
          "name": "punctuation.definition.markdown"
1029 +
        },
1030 +
        "4": {
1031 +
          "name": "fenced_code.block.language.markdown"
1032 +
        },
1033 +
        "5": {
1034 +
          "name": "fenced_code.block.language.attributes.markdown"
1035 +
        }
1036 +
      },
1037 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1038 +
      "endCaptures": {
1039 +
        "3": {
1040 +
          "name": "punctuation.definition.markdown"
1041 +
        }
1042 +
      },
1043 +
      "name": "markup.fenced_code.block.markdown",
1044 +
      "patterns": [
1045 +
        {
1046 +
          "begin": "(^|\\G)(\\s*)(.*)",
1047 +
          "contentName": "meta.embedded.block.ignore",
1048 +
          "patterns": [
1049 +
            {
1050 +
              "include": "source.ignore"
1051 +
            }
1052 +
          ],
1053 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1054 +
        }
1055 +
      ]
1056 +
    },
1057 +
    "fenced_code_block_ini": {
1058 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|[,:?{])[^`]*)?$)",
1059 +
      "beginCaptures": {
1060 +
        "3": {
1061 +
          "name": "punctuation.definition.markdown"
1062 +
        },
1063 +
        "4": {
1064 +
          "name": "fenced_code.block.language.markdown"
1065 +
        },
1066 +
        "5": {
1067 +
          "name": "fenced_code.block.language.attributes.markdown"
1068 +
        }
1069 +
      },
1070 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1071 +
      "endCaptures": {
1072 +
        "3": {
1073 +
          "name": "punctuation.definition.markdown"
1074 +
        }
1075 +
      },
1076 +
      "name": "markup.fenced_code.block.markdown",
1077 +
      "patterns": [
1078 +
        {
1079 +
          "begin": "(^|\\G)(\\s*)(.*)",
1080 +
          "contentName": "meta.embedded.block.ini",
1081 +
          "patterns": [
1082 +
            {
1083 +
              "include": "source.ini"
1084 +
            }
1085 +
          ],
1086 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1087 +
        }
1088 +
      ]
1089 +
    },
1090 +
    "fenced_code_block_java": {
1091 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|[,:?{])[^`]*)?$)",
1092 +
      "beginCaptures": {
1093 +
        "3": {
1094 +
          "name": "punctuation.definition.markdown"
1095 +
        },
1096 +
        "4": {
1097 +
          "name": "fenced_code.block.language.markdown"
1098 +
        },
1099 +
        "5": {
1100 +
          "name": "fenced_code.block.language.attributes.markdown"
1101 +
        }
1102 +
      },
1103 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1104 +
      "endCaptures": {
1105 +
        "3": {
1106 +
          "name": "punctuation.definition.markdown"
1107 +
        }
1108 +
      },
1109 +
      "name": "markup.fenced_code.block.markdown",
1110 +
      "patterns": [
1111 +
        {
1112 +
          "begin": "(^|\\G)(\\s*)(.*)",
1113 +
          "contentName": "meta.embedded.block.java",
1114 +
          "patterns": [
1115 +
            {
1116 +
              "include": "source.java"
1117 +
            }
1118 +
          ],
1119 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1120 +
        }
1121 +
      ]
1122 +
    },
1123 +
    "fenced_code_block_js": {
1124 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsx??|javascript|es6|mjs|cjs|dataviewjs|\\{\\.js.+?})((\\s+|[,:?{])[^`]*)?$)",
1125 +
      "beginCaptures": {
1126 +
        "3": {
1127 +
          "name": "punctuation.definition.markdown"
1128 +
        },
1129 +
        "4": {
1130 +
          "name": "fenced_code.block.language.markdown"
1131 +
        },
1132 +
        "5": {
1133 +
          "name": "fenced_code.block.language.attributes.markdown"
1134 +
        }
1135 +
      },
1136 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1137 +
      "endCaptures": {
1138 +
        "3": {
1139 +
          "name": "punctuation.definition.markdown"
1140 +
        }
1141 +
      },
1142 +
      "name": "markup.fenced_code.block.markdown",
1143 +
      "patterns": [
1144 +
        {
1145 +
          "begin": "(^|\\G)(\\s*)(.*)",
1146 +
          "contentName": "meta.embedded.block.javascript",
1147 +
          "patterns": [
1148 +
            {
1149 +
              "include": "source.js"
1150 +
            }
1151 +
          ],
1152 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1153 +
        }
1154 +
      ]
1155 +
    },
1156 +
    "fenced_code_block_js_regexp": {
1157 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(regexp)((\\s+|[,:?{])[^`]*)?$)",
1158 +
      "beginCaptures": {
1159 +
        "3": {
1160 +
          "name": "punctuation.definition.markdown"
1161 +
        },
1162 +
        "4": {
1163 +
          "name": "fenced_code.block.language.markdown"
1164 +
        },
1165 +
        "5": {
1166 +
          "name": "fenced_code.block.language.attributes.markdown"
1167 +
        }
1168 +
      },
1169 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1170 +
      "endCaptures": {
1171 +
        "3": {
1172 +
          "name": "punctuation.definition.markdown"
1173 +
        }
1174 +
      },
1175 +
      "name": "markup.fenced_code.block.markdown",
1176 +
      "patterns": [
1177 +
        {
1178 +
          "begin": "(^|\\G)(\\s*)(.*)",
1179 +
          "contentName": "meta.embedded.block.js_regexp",
1180 +
          "patterns": [
1181 +
            {
1182 +
              "include": "source.js.regexp"
1183 +
            }
1184 +
          ],
1185 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1186 +
        }
1187 +
      ]
1188 +
    },
1189 +
    "fenced_code_block_json": {
1190 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(json5??|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|[,:?{])[^`]*)?$)",
1191 +
      "beginCaptures": {
1192 +
        "3": {
1193 +
          "name": "punctuation.definition.markdown"
1194 +
        },
1195 +
        "4": {
1196 +
          "name": "fenced_code.block.language.markdown"
1197 +
        },
1198 +
        "5": {
1199 +
          "name": "fenced_code.block.language.attributes.markdown"
1200 +
        }
1201 +
      },
1202 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1203 +
      "endCaptures": {
1204 +
        "3": {
1205 +
          "name": "punctuation.definition.markdown"
1206 +
        }
1207 +
      },
1208 +
      "name": "markup.fenced_code.block.markdown",
1209 +
      "patterns": [
1210 +
        {
1211 +
          "begin": "(^|\\G)(\\s*)(.*)",
1212 +
          "contentName": "meta.embedded.block.json",
1213 +
          "patterns": [
1214 +
            {
1215 +
              "include": "source.json"
1216 +
            }
1217 +
          ],
1218 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1219 +
        }
1220 +
      ]
1221 +
    },
1222 +
    "fenced_code_block_jsonc": {
1223 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|[,:?{])[^`]*)?$)",
1224 +
      "beginCaptures": {
1225 +
        "3": {
1226 +
          "name": "punctuation.definition.markdown"
1227 +
        },
1228 +
        "4": {
1229 +
          "name": "fenced_code.block.language.markdown"
1230 +
        },
1231 +
        "5": {
1232 +
          "name": "fenced_code.block.language.attributes.markdown"
1233 +
        }
1234 +
      },
1235 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1236 +
      "endCaptures": {
1237 +
        "3": {
1238 +
          "name": "punctuation.definition.markdown"
1239 +
        }
1240 +
      },
1241 +
      "name": "markup.fenced_code.block.markdown",
1242 +
      "patterns": [
1243 +
        {
1244 +
          "begin": "(^|\\G)(\\s*)(.*)",
1245 +
          "contentName": "meta.embedded.block.jsonc",
1246 +
          "patterns": [
1247 +
            {
1248 +
              "include": "source.json.comments"
1249 +
            }
1250 +
          ],
1251 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1252 +
        }
1253 +
      ]
1254 +
    },
1255 +
    "fenced_code_block_jsonl": {
1256 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonl(?:|ines))((\\s+|[,:?{])[^`]*)?$)",
1257 +
      "beginCaptures": {
1258 +
        "3": {
1259 +
          "name": "punctuation.definition.markdown"
1260 +
        },
1261 +
        "4": {
1262 +
          "name": "fenced_code.block.language.markdown"
1263 +
        },
1264 +
        "5": {
1265 +
          "name": "fenced_code.block.language.attributes.markdown"
1266 +
        }
1267 +
      },
1268 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1269 +
      "endCaptures": {
1270 +
        "3": {
1271 +
          "name": "punctuation.definition.markdown"
1272 +
        }
1273 +
      },
1274 +
      "name": "markup.fenced_code.block.markdown",
1275 +
      "patterns": [
1276 +
        {
1277 +
          "begin": "(^|\\G)(\\s*)(.*)",
1278 +
          "contentName": "meta.embedded.block.jsonl",
1279 +
          "patterns": [
1280 +
            {
1281 +
              "include": "source.json.lines"
1282 +
            }
1283 +
          ],
1284 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1285 +
        }
1286 +
      ]
1287 +
    },
1288 +
    "fenced_code_block_julia": {
1289 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(julia|\\{\\.julia.+?})((\\s+|[,:?{])[^`]*)?$)",
1290 +
      "beginCaptures": {
1291 +
        "3": {
1292 +
          "name": "punctuation.definition.markdown"
1293 +
        },
1294 +
        "4": {
1295 +
          "name": "fenced_code.block.language.markdown"
1296 +
        },
1297 +
        "5": {
1298 +
          "name": "fenced_code.block.language.attributes.markdown"
1299 +
        }
1300 +
      },
1301 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1302 +
      "endCaptures": {
1303 +
        "3": {
1304 +
          "name": "punctuation.definition.markdown"
1305 +
        }
1306 +
      },
1307 +
      "name": "markup.fenced_code.block.markdown",
1308 +
      "patterns": [
1309 +
        {
1310 +
          "begin": "(^|\\G)(\\s*)(.*)",
1311 +
          "contentName": "meta.embedded.block.julia",
1312 +
          "patterns": [
1313 +
            {
1314 +
              "include": "source.julia"
1315 +
            }
1316 +
          ],
1317 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1318 +
        }
1319 +
      ]
1320 +
    },
1321 +
    "fenced_code_block_latex": {
1322 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:((?:la|)tex)((\\s+|[,:?{])[^`]*)?$)",
1323 +
      "beginCaptures": {
1324 +
        "3": {
1325 +
          "name": "punctuation.definition.markdown"
1326 +
        },
1327 +
        "4": {
1328 +
          "name": "fenced_code.block.language.markdown"
1329 +
        },
1330 +
        "5": {
1331 +
          "name": "fenced_code.block.language.attributes.markdown"
1332 +
        }
1333 +
      },
1334 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1335 +
      "endCaptures": {
1336 +
        "3": {
1337 +
          "name": "punctuation.definition.markdown"
1338 +
        }
1339 +
      },
1340 +
      "name": "markup.fenced_code.block.markdown",
1341 +
      "patterns": [
1342 +
        {
1343 +
          "begin": "(^|\\G)(\\s*)(.*)",
1344 +
          "contentName": "meta.embedded.block.latex",
1345 +
          "patterns": [
1346 +
            {
1347 +
              "include": "text.tex.latex"
1348 +
            }
1349 +
          ],
1350 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1351 +
        }
1352 +
      ]
1353 +
    },
1354 +
    "fenced_code_block_less": {
1355 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)((\\s+|[,:?{])[^`]*)?$)",
1356 +
      "beginCaptures": {
1357 +
        "3": {
1358 +
          "name": "punctuation.definition.markdown"
1359 +
        },
1360 +
        "4": {
1361 +
          "name": "fenced_code.block.language.markdown"
1362 +
        },
1363 +
        "5": {
1364 +
          "name": "fenced_code.block.language.attributes.markdown"
1365 +
        }
1366 +
      },
1367 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1368 +
      "endCaptures": {
1369 +
        "3": {
1370 +
          "name": "punctuation.definition.markdown"
1371 +
        }
1372 +
      },
1373 +
      "name": "markup.fenced_code.block.markdown",
1374 +
      "patterns": [
1375 +
        {
1376 +
          "begin": "(^|\\G)(\\s*)(.*)",
1377 +
          "contentName": "meta.embedded.block.less",
1378 +
          "patterns": [
1379 +
            {
1380 +
              "include": "source.css.less"
1381 +
            }
1382 +
          ],
1383 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1384 +
        }
1385 +
      ]
1386 +
    },
1387 +
    "fenced_code_block_log": {
1388 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(log)((\\s+|[,:?{])[^`]*)?$)",
1389 +
      "beginCaptures": {
1390 +
        "3": {
1391 +
          "name": "punctuation.definition.markdown"
1392 +
        },
1393 +
        "4": {
1394 +
          "name": "fenced_code.block.language.markdown"
1395 +
        },
1396 +
        "5": {
1397 +
          "name": "fenced_code.block.language.attributes.markdown"
1398 +
        }
1399 +
      },
1400 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1401 +
      "endCaptures": {
1402 +
        "3": {
1403 +
          "name": "punctuation.definition.markdown"
1404 +
        }
1405 +
      },
1406 +
      "name": "markup.fenced_code.block.markdown",
1407 +
      "patterns": [
1408 +
        {
1409 +
          "begin": "(^|\\G)(\\s*)(.*)",
1410 +
          "contentName": "meta.embedded.block.log",
1411 +
          "patterns": [
1412 +
            {
1413 +
              "include": "text.log"
1414 +
            }
1415 +
          ],
1416 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1417 +
        }
1418 +
      ]
1419 +
    },
1420 +
    "fenced_code_block_lua": {
1421 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|[,:?{])[^`]*)?$)",
1422 +
      "beginCaptures": {
1423 +
        "3": {
1424 +
          "name": "punctuation.definition.markdown"
1425 +
        },
1426 +
        "4": {
1427 +
          "name": "fenced_code.block.language.markdown"
1428 +
        },
1429 +
        "5": {
1430 +
          "name": "fenced_code.block.language.attributes.markdown"
1431 +
        }
1432 +
      },
1433 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1434 +
      "endCaptures": {
1435 +
        "3": {
1436 +
          "name": "punctuation.definition.markdown"
1437 +
        }
1438 +
      },
1439 +
      "name": "markup.fenced_code.block.markdown",
1440 +
      "patterns": [
1441 +
        {
1442 +
          "begin": "(^|\\G)(\\s*)(.*)",
1443 +
          "contentName": "meta.embedded.block.lua",
1444 +
          "patterns": [
1445 +
            {
1446 +
              "include": "source.lua"
1447 +
            }
1448 +
          ],
1449 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1450 +
        }
1451 +
      ]
1452 +
    },
1453 +
    "fenced_code_block_makefile": {
1454 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:((?:[Mm]|GNUm|OCamlM)akefile)((\\s+|[,:?{])[^`]*)?$)",
1455 +
      "beginCaptures": {
1456 +
        "3": {
1457 +
          "name": "punctuation.definition.markdown"
1458 +
        },
1459 +
        "4": {
1460 +
          "name": "fenced_code.block.language.markdown"
1461 +
        },
1462 +
        "5": {
1463 +
          "name": "fenced_code.block.language.attributes.markdown"
1464 +
        }
1465 +
      },
1466 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1467 +
      "endCaptures": {
1468 +
        "3": {
1469 +
          "name": "punctuation.definition.markdown"
1470 +
        }
1471 +
      },
1472 +
      "name": "markup.fenced_code.block.markdown",
1473 +
      "patterns": [
1474 +
        {
1475 +
          "begin": "(^|\\G)(\\s*)(.*)",
1476 +
          "contentName": "meta.embedded.block.makefile",
1477 +
          "patterns": [
1478 +
            {
1479 +
              "include": "source.makefile"
1480 +
            }
1481 +
          ],
1482 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1483 +
        }
1484 +
      ]
1485 +
    },
1486 +
    "fenced_code_block_markdown": {
1487 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(m(?:arkdown|d))((\\s+|[,:?{])[^`]*)?$)",
1488 +
      "beginCaptures": {
1489 +
        "3": {
1490 +
          "name": "punctuation.definition.markdown"
1491 +
        },
1492 +
        "4": {
1493 +
          "name": "fenced_code.block.language.markdown"
1494 +
        },
1495 +
        "5": {
1496 +
          "name": "fenced_code.block.language.attributes.markdown"
1497 +
        }
1498 +
      },
1499 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1500 +
      "endCaptures": {
1501 +
        "3": {
1502 +
          "name": "punctuation.definition.markdown"
1503 +
        }
1504 +
      },
1505 +
      "name": "markup.fenced_code.block.markdown",
1506 +
      "patterns": [
1507 +
        {
1508 +
          "begin": "(^|\\G)(\\s*)(.*)",
1509 +
          "contentName": "meta.embedded.block.markdown",
1510 +
          "patterns": [
1511 +
            {
1512 +
              "include": "text.html.markdown"
1513 +
            }
1514 +
          ],
1515 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1516 +
        }
1517 +
      ]
1518 +
    },
1519 +
    "fenced_code_block_objc": {
1520 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(objectivec|objective-c|mm|objc|obj-c|[hm])((\\s+|[,:?{])[^`]*)?$)",
1521 +
      "beginCaptures": {
1522 +
        "3": {
1523 +
          "name": "punctuation.definition.markdown"
1524 +
        },
1525 +
        "4": {
1526 +
          "name": "fenced_code.block.language.markdown"
1527 +
        },
1528 +
        "5": {
1529 +
          "name": "fenced_code.block.language.attributes.markdown"
1530 +
        }
1531 +
      },
1532 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1533 +
      "endCaptures": {
1534 +
        "3": {
1535 +
          "name": "punctuation.definition.markdown"
1536 +
        }
1537 +
      },
1538 +
      "name": "markup.fenced_code.block.markdown",
1539 +
      "patterns": [
1540 +
        {
1541 +
          "begin": "(^|\\G)(\\s*)(.*)",
1542 +
          "contentName": "meta.embedded.block.objc",
1543 +
          "patterns": [
1544 +
            {
1545 +
              "include": "source.objc"
1546 +
            }
1547 +
          ],
1548 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1549 +
        }
1550 +
      ]
1551 +
    },
1552 +
    "fenced_code_block_perl": {
1553 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl|pl|pm|pod|t|PL|psgi|vcl)((\\s+|[,:?{])[^`]*)?$)",
1554 +
      "beginCaptures": {
1555 +
        "3": {
1556 +
          "name": "punctuation.definition.markdown"
1557 +
        },
1558 +
        "4": {
1559 +
          "name": "fenced_code.block.language.markdown"
1560 +
        },
1561 +
        "5": {
1562 +
          "name": "fenced_code.block.language.attributes.markdown"
1563 +
        }
1564 +
      },
1565 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1566 +
      "endCaptures": {
1567 +
        "3": {
1568 +
          "name": "punctuation.definition.markdown"
1569 +
        }
1570 +
      },
1571 +
      "name": "markup.fenced_code.block.markdown",
1572 +
      "patterns": [
1573 +
        {
1574 +
          "begin": "(^|\\G)(\\s*)(.*)",
1575 +
          "contentName": "meta.embedded.block.perl",
1576 +
          "patterns": [
1577 +
            {
1578 +
              "include": "source.perl"
1579 +
            }
1580 +
          ],
1581 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1582 +
        }
1583 +
      ]
1584 +
    },
1585 +
    "fenced_code_block_perl6": {
1586 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(perl6|p6|pl6|pm6|nqp)((\\s+|[,:?{])[^`]*)?$)",
1587 +
      "beginCaptures": {
1588 +
        "3": {
1589 +
          "name": "punctuation.definition.markdown"
1590 +
        },
1591 +
        "4": {
1592 +
          "name": "fenced_code.block.language.markdown"
1593 +
        },
1594 +
        "5": {
1595 +
          "name": "fenced_code.block.language.attributes.markdown"
1596 +
        }
1597 +
      },
1598 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1599 +
      "endCaptures": {
1600 +
        "3": {
1601 +
          "name": "punctuation.definition.markdown"
1602 +
        }
1603 +
      },
1604 +
      "name": "markup.fenced_code.block.markdown",
1605 +
      "patterns": [
1606 +
        {
1607 +
          "begin": "(^|\\G)(\\s*)(.*)",
1608 +
          "contentName": "meta.embedded.block.perl6",
1609 +
          "patterns": [
1610 +
            {
1611 +
              "include": "source.perl.6"
1612 +
            }
1613 +
          ],
1614 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1615 +
        }
1616 +
      ]
1617 +
    },
1618 +
    "fenced_code_block_php": {
1619 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(php3??|php4|php5|phpt|phtml|aw|ctp)((\\s+|[,:?{])[^`]*)?$)",
1620 +
      "beginCaptures": {
1621 +
        "3": {
1622 +
          "name": "punctuation.definition.markdown"
1623 +
        },
1624 +
        "4": {
1625 +
          "name": "fenced_code.block.language.markdown"
1626 +
        },
1627 +
        "5": {
1628 +
          "name": "fenced_code.block.language.attributes.markdown"
1629 +
        }
1630 +
      },
1631 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1632 +
      "endCaptures": {
1633 +
        "3": {
1634 +
          "name": "punctuation.definition.markdown"
1635 +
        }
1636 +
      },
1637 +
      "name": "markup.fenced_code.block.markdown",
1638 +
      "patterns": [
1639 +
        {
1640 +
          "begin": "(^|\\G)(\\s*)(.*)",
1641 +
          "contentName": "meta.embedded.block.php",
1642 +
          "patterns": [
1643 +
            {
1644 +
              "include": "text.html.basic"
1645 +
            },
1646 +
            {
1647 +
              "include": "source.php"
1648 +
            }
1649 +
          ],
1650 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1651 +
        }
1652 +
      ]
1653 +
    },
1654 +
    "fenced_code_block_powershell": {
1655 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(p(?:owershell|s1|sm1|sd1|wsh))((\\s+|[,:?{])[^`]*)?$)",
1656 +
      "beginCaptures": {
1657 +
        "3": {
1658 +
          "name": "punctuation.definition.markdown"
1659 +
        },
1660 +
        "4": {
1661 +
          "name": "fenced_code.block.language.markdown"
1662 +
        },
1663 +
        "5": {
1664 +
          "name": "fenced_code.block.language.attributes.markdown"
1665 +
        }
1666 +
      },
1667 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1668 +
      "endCaptures": {
1669 +
        "3": {
1670 +
          "name": "punctuation.definition.markdown"
1671 +
        }
1672 +
      },
1673 +
      "name": "markup.fenced_code.block.markdown",
1674 +
      "patterns": [
1675 +
        {
1676 +
          "begin": "(^|\\G)(\\s*)(.*)",
1677 +
          "contentName": "meta.embedded.block.powershell",
1678 +
          "patterns": [
1679 +
            {
1680 +
              "include": "source.powershell"
1681 +
            }
1682 +
          ],
1683 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1684 +
        }
1685 +
      ]
1686 +
    },
1687 +
    "fenced_code_block_pug": {
1688 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jade|pug)((\\s+|[,:?{])[^`]*)?$)",
1689 +
      "beginCaptures": {
1690 +
        "3": {
1691 +
          "name": "punctuation.definition.markdown"
1692 +
        },
1693 +
        "4": {
1694 +
          "name": "fenced_code.block.language.markdown"
1695 +
        },
1696 +
        "5": {
1697 +
          "name": "fenced_code.block.language.attributes.markdown"
1698 +
        }
1699 +
      },
1700 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1701 +
      "endCaptures": {
1702 +
        "3": {
1703 +
          "name": "punctuation.definition.markdown"
1704 +
        }
1705 +
      },
1706 +
      "name": "markup.fenced_code.block.markdown",
1707 +
      "patterns": [
1708 +
        {
1709 +
          "begin": "(^|\\G)(\\s*)(.*)",
1710 +
          "contentName": "meta.embedded.block.pug",
1711 +
          "patterns": [
1712 +
            {
1713 +
              "include": "text.pug"
1714 +
            }
1715 +
          ],
1716 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1717 +
        }
1718 +
      ]
1719 +
    },
1720 +
    "fenced_code_block_python": {
1721 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py3??|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gypi??|\\{\\.python.+?})((\\s+|[,:?{])[^`]*)?$)",
1722 +
      "beginCaptures": {
1723 +
        "3": {
1724 +
          "name": "punctuation.definition.markdown"
1725 +
        },
1726 +
        "4": {
1727 +
          "name": "fenced_code.block.language.markdown"
1728 +
        },
1729 +
        "5": {
1730 +
          "name": "fenced_code.block.language.attributes.markdown"
1731 +
        }
1732 +
      },
1733 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1734 +
      "endCaptures": {
1735 +
        "3": {
1736 +
          "name": "punctuation.definition.markdown"
1737 +
        }
1738 +
      },
1739 +
      "name": "markup.fenced_code.block.markdown",
1740 +
      "patterns": [
1741 +
        {
1742 +
          "begin": "(^|\\G)(\\s*)(.*)",
1743 +
          "contentName": "meta.embedded.block.python",
1744 +
          "patterns": [
1745 +
            {
1746 +
              "include": "source.python"
1747 +
            }
1748 +
          ],
1749 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1750 +
        }
1751 +
      ]
1752 +
    },
1753 +
    "fenced_code_block_r": {
1754 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:([RSrs]|Rprofile|\\{\\.r.+?})((\\s+|[,:?{])[^`]*)?$)",
1755 +
      "beginCaptures": {
1756 +
        "3": {
1757 +
          "name": "punctuation.definition.markdown"
1758 +
        },
1759 +
        "4": {
1760 +
          "name": "fenced_code.block.language.markdown"
1761 +
        },
1762 +
        "5": {
1763 +
          "name": "fenced_code.block.language.attributes.markdown"
1764 +
        }
1765 +
      },
1766 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1767 +
      "endCaptures": {
1768 +
        "3": {
1769 +
          "name": "punctuation.definition.markdown"
1770 +
        }
1771 +
      },
1772 +
      "name": "markup.fenced_code.block.markdown",
1773 +
      "patterns": [
1774 +
        {
1775 +
          "begin": "(^|\\G)(\\s*)(.*)",
1776 +
          "contentName": "meta.embedded.block.r",
1777 +
          "patterns": [
1778 +
            {
1779 +
              "include": "source.r"
1780 +
            }
1781 +
          ],
1782 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1783 +
        }
1784 +
      ]
1785 +
    },
1786 +
    "fenced_code_block_regexp_python": {
1787 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|[,:?{])[^`]*)?$)",
1788 +
      "beginCaptures": {
1789 +
        "3": {
1790 +
          "name": "punctuation.definition.markdown"
1791 +
        },
1792 +
        "4": {
1793 +
          "name": "fenced_code.block.language.markdown"
1794 +
        },
1795 +
        "5": {
1796 +
          "name": "fenced_code.block.language.attributes.markdown"
1797 +
        }
1798 +
      },
1799 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1800 +
      "endCaptures": {
1801 +
        "3": {
1802 +
          "name": "punctuation.definition.markdown"
1803 +
        }
1804 +
      },
1805 +
      "name": "markup.fenced_code.block.markdown",
1806 +
      "patterns": [
1807 +
        {
1808 +
          "begin": "(^|\\G)(\\s*)(.*)",
1809 +
          "contentName": "meta.embedded.block.regexp_python",
1810 +
          "patterns": [
1811 +
            {
1812 +
              "include": "source.regexp.python"
1813 +
            }
1814 +
          ],
1815 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1816 +
        }
1817 +
      ]
1818 +
    },
1819 +
    "fenced_code_block_restructuredtext": {
1820 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(r(?:estructuredtext|st))((\\s+|[,:?{])[^`]*)?$)",
1821 +
      "beginCaptures": {
1822 +
        "3": {
1823 +
          "name": "punctuation.definition.markdown"
1824 +
        },
1825 +
        "4": {
1826 +
          "name": "fenced_code.block.language.markdown"
1827 +
        },
1828 +
        "5": {
1829 +
          "name": "fenced_code.block.language.attributes.markdown"
1830 +
        }
1831 +
      },
1832 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1833 +
      "endCaptures": {
1834 +
        "3": {
1835 +
          "name": "punctuation.definition.markdown"
1836 +
        }
1837 +
      },
1838 +
      "name": "markup.fenced_code.block.markdown",
1839 +
      "patterns": [
1840 +
        {
1841 +
          "begin": "(^|\\G)(\\s*)(.*)",
1842 +
          "contentName": "meta.embedded.block.restructuredtext",
1843 +
          "patterns": [
1844 +
            {
1845 +
              "include": "source.rst"
1846 +
            }
1847 +
          ],
1848 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1849 +
        }
1850 +
      ]
1851 +
    },
1852 +
    "fenced_code_block_ruby": {
1853 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rbx??|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|[,:?{])[^`]*)?$)",
1854 +
      "beginCaptures": {
1855 +
        "3": {
1856 +
          "name": "punctuation.definition.markdown"
1857 +
        },
1858 +
        "4": {
1859 +
          "name": "fenced_code.block.language.markdown"
1860 +
        },
1861 +
        "5": {
1862 +
          "name": "fenced_code.block.language.attributes.markdown"
1863 +
        }
1864 +
      },
1865 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1866 +
      "endCaptures": {
1867 +
        "3": {
1868 +
          "name": "punctuation.definition.markdown"
1869 +
        }
1870 +
      },
1871 +
      "name": "markup.fenced_code.block.markdown",
1872 +
      "patterns": [
1873 +
        {
1874 +
          "begin": "(^|\\G)(\\s*)(.*)",
1875 +
          "contentName": "meta.embedded.block.ruby",
1876 +
          "patterns": [
1877 +
            {
1878 +
              "include": "source.ruby"
1879 +
            }
1880 +
          ],
1881 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1882 +
        }
1883 +
      ]
1884 +
    },
1885 +
    "fenced_code_block_rust": {
1886 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?})((\\s+|[,:?{])[^`]*)?$)",
1887 +
      "beginCaptures": {
1888 +
        "3": {
1889 +
          "name": "punctuation.definition.markdown"
1890 +
        },
1891 +
        "4": {
1892 +
          "name": "fenced_code.block.language.markdown"
1893 +
        },
1894 +
        "5": {
1895 +
          "name": "fenced_code.block.language.attributes.markdown"
1896 +
        }
1897 +
      },
1898 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1899 +
      "endCaptures": {
1900 +
        "3": {
1901 +
          "name": "punctuation.definition.markdown"
1902 +
        }
1903 +
      },
1904 +
      "name": "markup.fenced_code.block.markdown",
1905 +
      "patterns": [
1906 +
        {
1907 +
          "begin": "(^|\\G)(\\s*)(.*)",
1908 +
          "contentName": "meta.embedded.block.rust",
1909 +
          "patterns": [
1910 +
            {
1911 +
              "include": "source.rust"
1912 +
            }
1913 +
          ],
1914 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1915 +
        }
1916 +
      ]
1917 +
    },
1918 +
    "fenced_code_block_scala": {
1919 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(s(?:cala|bt))((\\s+|[,:?{])[^`]*)?$)",
1920 +
      "beginCaptures": {
1921 +
        "3": {
1922 +
          "name": "punctuation.definition.markdown"
1923 +
        },
1924 +
        "4": {
1925 +
          "name": "fenced_code.block.language.markdown"
1926 +
        },
1927 +
        "5": {
1928 +
          "name": "fenced_code.block.language.attributes.markdown"
1929 +
        }
1930 +
      },
1931 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1932 +
      "endCaptures": {
1933 +
        "3": {
1934 +
          "name": "punctuation.definition.markdown"
1935 +
        }
1936 +
      },
1937 +
      "name": "markup.fenced_code.block.markdown",
1938 +
      "patterns": [
1939 +
        {
1940 +
          "begin": "(^|\\G)(\\s*)(.*)",
1941 +
          "contentName": "meta.embedded.block.scala",
1942 +
          "patterns": [
1943 +
            {
1944 +
              "include": "source.scala"
1945 +
            }
1946 +
          ],
1947 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1948 +
        }
1949 +
      ]
1950 +
    },
1951 +
    "fenced_code_block_scss": {
1952 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|[,:?{])[^`]*)?$)",
1953 +
      "beginCaptures": {
1954 +
        "3": {
1955 +
          "name": "punctuation.definition.markdown"
1956 +
        },
1957 +
        "4": {
1958 +
          "name": "fenced_code.block.language.markdown"
1959 +
        },
1960 +
        "5": {
1961 +
          "name": "fenced_code.block.language.attributes.markdown"
1962 +
        }
1963 +
      },
1964 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1965 +
      "endCaptures": {
1966 +
        "3": {
1967 +
          "name": "punctuation.definition.markdown"
1968 +
        }
1969 +
      },
1970 +
      "name": "markup.fenced_code.block.markdown",
1971 +
      "patterns": [
1972 +
        {
1973 +
          "begin": "(^|\\G)(\\s*)(.*)",
1974 +
          "contentName": "meta.embedded.block.scss",
1975 +
          "patterns": [
1976 +
            {
1977 +
              "include": "source.css.scss"
1978 +
            }
1979 +
          ],
1980 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
1981 +
        }
1982 +
      ]
1983 +
    },
1984 +
    "fenced_code_block_shell": {
1985 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?})((\\s+|[,:?{])[^`]*)?$)",
1986 +
      "beginCaptures": {
1987 +
        "3": {
1988 +
          "name": "punctuation.definition.markdown"
1989 +
        },
1990 +
        "4": {
1991 +
          "name": "fenced_code.block.language.markdown"
1992 +
        },
1993 +
        "5": {
1994 +
          "name": "fenced_code.block.language.attributes.markdown"
1995 +
        }
1996 +
      },
1997 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1998 +
      "endCaptures": {
1999 +
        "3": {
2000 +
          "name": "punctuation.definition.markdown"
2001 +
        }
2002 +
      },
2003 +
      "name": "markup.fenced_code.block.markdown",
2004 +
      "patterns": [
2005 +
        {
2006 +
          "begin": "(^|\\G)(\\s*)(.*)",
2007 +
          "contentName": "meta.embedded.block.shellscript",
2008 +
          "patterns": [
2009 +
            {
2010 +
              "include": "source.shell"
2011 +
            }
2012 +
          ],
2013 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2014 +
        }
2015 +
      ]
2016 +
    },
2017 +
    "fenced_code_block_sql": {
2018 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|[,:?{])[^`]*)?$)",
2019 +
      "beginCaptures": {
2020 +
        "3": {
2021 +
          "name": "punctuation.definition.markdown"
2022 +
        },
2023 +
        "4": {
2024 +
          "name": "fenced_code.block.language.markdown"
2025 +
        },
2026 +
        "5": {
2027 +
          "name": "fenced_code.block.language.attributes.markdown"
2028 +
        }
2029 +
      },
2030 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2031 +
      "endCaptures": {
2032 +
        "3": {
2033 +
          "name": "punctuation.definition.markdown"
2034 +
        }
2035 +
      },
2036 +
      "name": "markup.fenced_code.block.markdown",
2037 +
      "patterns": [
2038 +
        {
2039 +
          "begin": "(^|\\G)(\\s*)(.*)",
2040 +
          "contentName": "meta.embedded.block.sql",
2041 +
          "patterns": [
2042 +
            {
2043 +
              "include": "source.sql"
2044 +
            }
2045 +
          ],
2046 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2047 +
        }
2048 +
      ]
2049 +
    },
2050 +
    "fenced_code_block_swift": {
2051 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(swift)((\\s+|[,:?{])[^`]*)?$)",
2052 +
      "beginCaptures": {
2053 +
        "3": {
2054 +
          "name": "punctuation.definition.markdown"
2055 +
        },
2056 +
        "4": {
2057 +
          "name": "fenced_code.block.language.markdown"
2058 +
        },
2059 +
        "5": {
2060 +
          "name": "fenced_code.block.language.attributes.markdown"
2061 +
        }
2062 +
      },
2063 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2064 +
      "endCaptures": {
2065 +
        "3": {
2066 +
          "name": "punctuation.definition.markdown"
2067 +
        }
2068 +
      },
2069 +
      "name": "markup.fenced_code.block.markdown",
2070 +
      "patterns": [
2071 +
        {
2072 +
          "begin": "(^|\\G)(\\s*)(.*)",
2073 +
          "contentName": "meta.embedded.block.swift",
2074 +
          "patterns": [
2075 +
            {
2076 +
              "include": "source.swift"
2077 +
            }
2078 +
          ],
2079 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2080 +
        }
2081 +
      ]
2082 +
    },
2083 +
    "fenced_code_block_ts": {
2084 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(t(?:ypescript|s))((\\s+|[,:?{])[^`]*)?$)",
2085 +
      "beginCaptures": {
2086 +
        "3": {
2087 +
          "name": "punctuation.definition.markdown"
2088 +
        },
2089 +
        "4": {
2090 +
          "name": "fenced_code.block.language.markdown"
2091 +
        },
2092 +
        "5": {
2093 +
          "name": "fenced_code.block.language.attributes.markdown"
2094 +
        }
2095 +
      },
2096 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2097 +
      "endCaptures": {
2098 +
        "3": {
2099 +
          "name": "punctuation.definition.markdown"
2100 +
        }
2101 +
      },
2102 +
      "name": "markup.fenced_code.block.markdown",
2103 +
      "patterns": [
2104 +
        {
2105 +
          "begin": "(^|\\G)(\\s*)(.*)",
2106 +
          "contentName": "meta.embedded.block.typescript",
2107 +
          "patterns": [
2108 +
            {
2109 +
              "include": "source.ts"
2110 +
            }
2111 +
          ],
2112 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2113 +
        }
2114 +
      ]
2115 +
    },
2116 +
    "fenced_code_block_tsx": {
2117 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|[,:?{])[^`]*)?$)",
2118 +
      "beginCaptures": {
2119 +
        "3": {
2120 +
          "name": "punctuation.definition.markdown"
2121 +
        },
2122 +
        "4": {
2123 +
          "name": "fenced_code.block.language.markdown"
2124 +
        },
2125 +
        "5": {
2126 +
          "name": "fenced_code.block.language.attributes.markdown"
2127 +
        }
2128 +
      },
2129 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2130 +
      "endCaptures": {
2131 +
        "3": {
2132 +
          "name": "punctuation.definition.markdown"
2133 +
        }
2134 +
      },
2135 +
      "name": "markup.fenced_code.block.markdown",
2136 +
      "patterns": [
2137 +
        {
2138 +
          "begin": "(^|\\G)(\\s*)(.*)",
2139 +
          "contentName": "meta.embedded.block.typescriptreact",
2140 +
          "patterns": [
2141 +
            {
2142 +
              "include": "source.tsx"
2143 +
            }
2144 +
          ],
2145 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2146 +
        }
2147 +
      ]
2148 +
    },
2149 +
    "fenced_code_block_twig": {
2150 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(twig)((\\s+|[,:?{])[^`]*)?$)",
2151 +
      "beginCaptures": {
2152 +
        "3": {
2153 +
          "name": "punctuation.definition.markdown"
2154 +
        },
2155 +
        "4": {
2156 +
          "name": "fenced_code.block.language.markdown"
2157 +
        },
2158 +
        "5": {
2159 +
          "name": "fenced_code.block.language.attributes.markdown"
2160 +
        }
2161 +
      },
2162 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2163 +
      "endCaptures": {
2164 +
        "3": {
2165 +
          "name": "punctuation.definition.markdown"
2166 +
        }
2167 +
      },
2168 +
      "name": "markup.fenced_code.block.markdown",
2169 +
      "patterns": [
2170 +
        {
2171 +
          "begin": "(^|\\G)(\\s*)(.*)",
2172 +
          "contentName": "meta.embedded.block.twig",
2173 +
          "patterns": [
2174 +
            {
2175 +
              "include": "source.twig"
2176 +
            }
2177 +
          ],
2178 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2179 +
        }
2180 +
      ]
2181 +
    },
2182 +
    "fenced_code_block_unknown": {
2183 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?=([^`]*)?$)",
2184 +
      "beginCaptures": {
2185 +
        "3": {
2186 +
          "name": "punctuation.definition.markdown"
2187 +
        },
2188 +
        "4": {
2189 +
          "name": "fenced_code.block.language"
2190 +
        }
2191 +
      },
2192 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2193 +
      "endCaptures": {
2194 +
        "3": {
2195 +
          "name": "punctuation.definition.markdown"
2196 +
        }
2197 +
      },
2198 +
      "name": "markup.fenced_code.block.markdown"
2199 +
    },
2200 +
    "fenced_code_block_vs_net": {
2201 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(vb)((\\s+|[,:?{])[^`]*)?$)",
2202 +
      "beginCaptures": {
2203 +
        "3": {
2204 +
          "name": "punctuation.definition.markdown"
2205 +
        },
2206 +
        "4": {
2207 +
          "name": "fenced_code.block.language.markdown"
2208 +
        },
2209 +
        "5": {
2210 +
          "name": "fenced_code.block.language.attributes.markdown"
2211 +
        }
2212 +
      },
2213 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2214 +
      "endCaptures": {
2215 +
        "3": {
2216 +
          "name": "punctuation.definition.markdown"
2217 +
        }
2218 +
      },
2219 +
      "name": "markup.fenced_code.block.markdown",
2220 +
      "patterns": [
2221 +
        {
2222 +
          "begin": "(^|\\G)(\\s*)(.*)",
2223 +
          "contentName": "meta.embedded.block.vs_net",
2224 +
          "patterns": [
2225 +
            {
2226 +
              "include": "source.asp.vb.net"
2227 +
            }
2228 +
          ],
2229 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2230 +
        }
2231 +
      ]
2232 +
    },
2233 +
    "fenced_code_block_xml": {
2234 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|[,:?{])[^`]*)?$)",
2235 +
      "beginCaptures": {
2236 +
        "3": {
2237 +
          "name": "punctuation.definition.markdown"
2238 +
        },
2239 +
        "4": {
2240 +
          "name": "fenced_code.block.language.markdown"
2241 +
        },
2242 +
        "5": {
2243 +
          "name": "fenced_code.block.language.attributes.markdown"
2244 +
        }
2245 +
      },
2246 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2247 +
      "endCaptures": {
2248 +
        "3": {
2249 +
          "name": "punctuation.definition.markdown"
2250 +
        }
2251 +
      },
2252 +
      "name": "markup.fenced_code.block.markdown",
2253 +
      "patterns": [
2254 +
        {
2255 +
          "begin": "(^|\\G)(\\s*)(.*)",
2256 +
          "contentName": "meta.embedded.block.xml",
2257 +
          "patterns": [
2258 +
            {
2259 +
              "include": "text.xml"
2260 +
            }
2261 +
          ],
2262 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2263 +
        }
2264 +
      ]
2265 +
    },
2266 +
    "fenced_code_block_xsl": {
2267 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(xslt??)((\\s+|[,:?{])[^`]*)?$)",
2268 +
      "beginCaptures": {
2269 +
        "3": {
2270 +
          "name": "punctuation.definition.markdown"
2271 +
        },
2272 +
        "4": {
2273 +
          "name": "fenced_code.block.language.markdown"
2274 +
        },
2275 +
        "5": {
2276 +
          "name": "fenced_code.block.language.attributes.markdown"
2277 +
        }
2278 +
      },
2279 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2280 +
      "endCaptures": {
2281 +
        "3": {
2282 +
          "name": "punctuation.definition.markdown"
2283 +
        }
2284 +
      },
2285 +
      "name": "markup.fenced_code.block.markdown",
2286 +
      "patterns": [
2287 +
        {
2288 +
          "begin": "(^|\\G)(\\s*)(.*)",
2289 +
          "contentName": "meta.embedded.block.xsl",
2290 +
          "patterns": [
2291 +
            {
2292 +
              "include": "text.xml.xsl"
2293 +
            }
2294 +
          ],
2295 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2296 +
        }
2297 +
      ]
2298 +
    },
2299 +
    "fenced_code_block_yaml": {
2300 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(ya?ml)((\\s+|[,:?{])[^`]*)?$)",
2301 +
      "beginCaptures": {
2302 +
        "3": {
2303 +
          "name": "punctuation.definition.markdown"
2304 +
        },
2305 +
        "4": {
2306 +
          "name": "fenced_code.block.language.markdown"
2307 +
        },
2308 +
        "5": {
2309 +
          "name": "fenced_code.block.language.attributes.markdown"
2310 +
        }
2311 +
      },
2312 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2313 +
      "endCaptures": {
2314 +
        "3": {
2315 +
          "name": "punctuation.definition.markdown"
2316 +
        }
2317 +
      },
2318 +
      "name": "markup.fenced_code.block.markdown",
2319 +
      "patterns": [
2320 +
        {
2321 +
          "begin": "(^|\\G)(\\s*)(.*)",
2322 +
          "contentName": "meta.embedded.block.yaml",
2323 +
          "patterns": [
2324 +
            {
2325 +
              "include": "source.yaml"
2326 +
            }
2327 +
          ],
2328 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2329 +
        }
2330 +
      ]
2331 +
    },
2332 +
    "fenced_code_block_yang": {
2333 +
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(yang)((\\s+|[,:?{])[^`]*)?$)",
2334 +
      "beginCaptures": {
2335 +
        "3": {
2336 +
          "name": "punctuation.definition.markdown"
2337 +
        },
2338 +
        "4": {
2339 +
          "name": "fenced_code.block.language.markdown"
2340 +
        },
2341 +
        "5": {
2342 +
          "name": "fenced_code.block.language.attributes.markdown"
2343 +
        }
2344 +
      },
2345 +
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
2346 +
      "endCaptures": {
2347 +
        "3": {
2348 +
          "name": "punctuation.definition.markdown"
2349 +
        }
2350 +
      },
2351 +
      "name": "markup.fenced_code.block.markdown",
2352 +
      "patterns": [
2353 +
        {
2354 +
          "begin": "(^|\\G)(\\s*)(.*)",
2355 +
          "contentName": "meta.embedded.block.yang",
2356 +
          "patterns": [
2357 +
            {
2358 +
              "include": "source.yang"
2359 +
            }
2360 +
          ],
2361 +
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
2362 +
        }
2363 +
      ]
2364 +
    },
2365 +
    "frontMatter": {
2366 +
      "applyEndPatternLast": 1,
2367 +
      "begin": "\\A(?=(-{3,}))",
2368 +
      "end": "^(?: {0,3}\\1-*[\\t ]*|[\\t ]*\\.{3})$",
2369 +
      "endCaptures": {
2370 +
        "0": {
2371 +
          "name": "punctuation.definition.end.frontmatter"
2372 +
        }
2373 +
      },
2374 +
      "patterns": [
2375 +
        {
2376 +
          "begin": "\\A(-{3,})(.*)$",
2377 +
          "beginCaptures": {
2378 +
            "1": {
2379 +
              "name": "punctuation.definition.begin.frontmatter"
2380 +
            },
2381 +
            "2": {
2382 +
              "name": "comment.frontmatter"
2383 +
            }
2384 +
          },
2385 +
          "contentName": "meta.embedded.block.frontmatter",
2386 +
          "patterns": [
2387 +
            {
2388 +
              "include": "source.yaml"
2389 +
            }
2390 +
          ],
2391 +
          "while": "^(?!(?: {0,3}\\1-*[\\t ]*|[\\t ]*\\.{3})$)"
2392 +
        }
2393 +
      ]
2394 +
    },
2395 +
    "heading": {
2396 +
      "captures": {
2397 +
        "1": {
2398 +
          "patterns": [
2399 +
            {
2400 +
              "captures": {
2401 +
                "1": {
2402 +
                  "name": "punctuation.definition.heading.markdown"
2403 +
                },
2404 +
                "2": {
2405 +
                  "name": "entity.name.section.markdown",
2406 +
                  "patterns": [
2407 +
                    {
2408 +
                      "include": "#inline"
2409 +
                    },
2410 +
                    {
2411 +
                      "include": "text.html.derivative"
2412 +
                    }
2413 +
                  ]
2414 +
                },
2415 +
                "3": {
2416 +
                  "name": "punctuation.definition.heading.markdown"
2417 +
                }
2418 +
              },
2419 +
              "match": "(#{6})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2420 +
              "name": "heading.6.markdown"
2421 +
            },
2422 +
            {
2423 +
              "captures": {
2424 +
                "1": {
2425 +
                  "name": "punctuation.definition.heading.markdown"
2426 +
                },
2427 +
                "2": {
2428 +
                  "name": "entity.name.section.markdown",
2429 +
                  "patterns": [
2430 +
                    {
2431 +
                      "include": "#inline"
2432 +
                    },
2433 +
                    {
2434 +
                      "include": "text.html.derivative"
2435 +
                    }
2436 +
                  ]
2437 +
                },
2438 +
                "3": {
2439 +
                  "name": "punctuation.definition.heading.markdown"
2440 +
                }
2441 +
              },
2442 +
              "match": "(#{5})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2443 +
              "name": "heading.5.markdown"
2444 +
            },
2445 +
            {
2446 +
              "captures": {
2447 +
                "1": {
2448 +
                  "name": "punctuation.definition.heading.markdown"
2449 +
                },
2450 +
                "2": {
2451 +
                  "name": "entity.name.section.markdown",
2452 +
                  "patterns": [
2453 +
                    {
2454 +
                      "include": "#inline"
2455 +
                    },
2456 +
                    {
2457 +
                      "include": "text.html.derivative"
2458 +
                    }
2459 +
                  ]
2460 +
                },
2461 +
                "3": {
2462 +
                  "name": "punctuation.definition.heading.markdown"
2463 +
                }
2464 +
              },
2465 +
              "match": "(#{4})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2466 +
              "name": "heading.4.markdown"
2467 +
            },
2468 +
            {
2469 +
              "captures": {
2470 +
                "1": {
2471 +
                  "name": "punctuation.definition.heading.markdown"
2472 +
                },
2473 +
                "2": {
2474 +
                  "name": "entity.name.section.markdown",
2475 +
                  "patterns": [
2476 +
                    {
2477 +
                      "include": "#inline"
2478 +
                    },
2479 +
                    {
2480 +
                      "include": "text.html.derivative"
2481 +
                    }
2482 +
                  ]
2483 +
                },
2484 +
                "3": {
2485 +
                  "name": "punctuation.definition.heading.markdown"
2486 +
                }
2487 +
              },
2488 +
              "match": "(#{3})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2489 +
              "name": "heading.3.markdown"
2490 +
            },
2491 +
            {
2492 +
              "captures": {
2493 +
                "1": {
2494 +
                  "name": "punctuation.definition.heading.markdown"
2495 +
                },
2496 +
                "2": {
2497 +
                  "name": "entity.name.section.markdown",
2498 +
                  "patterns": [
2499 +
                    {
2500 +
                      "include": "#inline"
2501 +
                    },
2502 +
                    {
2503 +
                      "include": "text.html.derivative"
2504 +
                    }
2505 +
                  ]
2506 +
                },
2507 +
                "3": {
2508 +
                  "name": "punctuation.definition.heading.markdown"
2509 +
                }
2510 +
              },
2511 +
              "match": "(#{2})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2512 +
              "name": "heading.2.markdown"
2513 +
            },
2514 +
            {
2515 +
              "captures": {
2516 +
                "1": {
2517 +
                  "name": "punctuation.definition.heading.markdown"
2518 +
                },
2519 +
                "2": {
2520 +
                  "name": "entity.name.section.markdown",
2521 +
                  "patterns": [
2522 +
                    {
2523 +
                      "include": "#inline"
2524 +
                    },
2525 +
                    {
2526 +
                      "include": "text.html.derivative"
2527 +
                    }
2528 +
                  ]
2529 +
                },
2530 +
                "3": {
2531 +
                  "name": "punctuation.definition.heading.markdown"
2532 +
                }
2533 +
              },
2534 +
              "match": "(#{1})\\s+(.*?)(?:\\s+(#+))?\\s*$",
2535 +
              "name": "heading.1.markdown"
2536 +
            }
2537 +
          ]
2538 +
        }
2539 +
      },
2540 +
      "match": "(?:^|\\G) {0,3}(#{1,6}\\s+(.*?)(\\s+#{1,6})?\\s*)$",
2541 +
      "name": "markup.heading.markdown"
2542 +
    },
2543 +
    "heading-setext": {
2544 +
      "patterns": [
2545 +
        {
2546 +
          "match": "^(={3,})(?=[\\t ]*$\\n?)",
2547 +
          "name": "markup.heading.setext.1.markdown"
2548 +
        },
2549 +
        {
2550 +
          "match": "^(-{3,})(?=[\\t ]*$\\n?)",
2551 +
          "name": "markup.heading.setext.2.markdown"
2552 +
        }
2553 +
      ]
2554 +
    },
2555 +
    "html": {
2556 +
      "patterns": [
2557 +
        {
2558 +
          "begin": "(^|\\G)\\s*(<!--)",
2559 +
          "captures": {
2560 +
            "1": {
2561 +
              "name": "punctuation.definition.comment.html"
2562 +
            },
2563 +
            "2": {
2564 +
              "name": "punctuation.definition.comment.html"
2565 +
            }
2566 +
          },
2567 +
          "end": "(-->)",
2568 +
          "name": "comment.block.html"
2569 +
        },
2570 +
        {
2571 +
          "begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?</(script|style|pre)>))",
2572 +
          "end": "(?i)(.*)((</)(script|style|pre)(>))",
2573 +
          "endCaptures": {
2574 +
            "1": {
2575 +
              "patterns": [
2576 +
                {
2577 +
                  "include": "text.html.derivative"
2578 +
                }
2579 +
              ]
2580 +
            },
2581 +
            "2": {
2582 +
              "name": "meta.tag.structure.$4.end.html"
2583 +
            },
2584 +
            "3": {
2585 +
              "name": "punctuation.definition.tag.begin.html"
2586 +
            },
2587 +
            "4": {
2588 +
              "name": "entity.name.tag.html"
2589 +
            },
2590 +
            "5": {
2591 +
              "name": "punctuation.definition.tag.end.html"
2592 +
            }
2593 +
          },
2594 +
          "patterns": [
2595 +
            {
2596 +
              "begin": "(\\s*|$)",
2597 +
              "patterns": [
2598 +
                {
2599 +
                  "include": "text.html.derivative"
2600 +
                }
2601 +
              ],
2602 +
              "while": "(?i)^(?!.*</(script|style|pre)>)"
2603 +
            }
2604 +
          ]
2605 +
        },
2606 +
        {
2607 +
          "begin": "(?i)(^|\\G)\\s*(?=</?[A-Za-z]+[^\\&/;gt\\s]*(\\s|$|/?>))",
2608 +
          "patterns": [
2609 +
            {
2610 +
              "include": "text.html.derivative"
2611 +
            }
2612 +
          ],
2613 +
          "while": "^(?!\\s*$)"
2614 +
        },
2615 +
        {
2616 +
          "begin": "(^|\\G)\\s*(?=(<(?:[-0-9A-Za-z](/?>|\\s.*?>)|/[-0-9A-Za-z]>))\\s*$)",
2617 +
          "patterns": [
2618 +
            {
2619 +
              "include": "text.html.derivative"
2620 +
            }
2621 +
          ],
2622 +
          "while": "^(?!\\s*$)"
2623 +
        }
2624 +
      ]
2625 +
    },
2626 +
    "image-inline": {
2627 +
      "captures": {
2628 +
        "1": {
2629 +
          "name": "punctuation.definition.link.description.begin.markdown"
2630 +
        },
2631 +
        "10": {
2632 +
          "name": "markup.underline.link.image.markdown"
2633 +
        },
2634 +
        "12": {
2635 +
          "name": "string.other.link.description.title.markdown"
2636 +
        },
2637 +
        "13": {
2638 +
          "name": "punctuation.definition.string.begin.markdown"
2639 +
        },
2640 +
        "14": {
2641 +
          "name": "punctuation.definition.string.end.markdown"
2642 +
        },
2643 +
        "15": {
2644 +
          "name": "string.other.link.description.title.markdown"
2645 +
        },
2646 +
        "16": {
2647 +
          "name": "punctuation.definition.string.begin.markdown"
2648 +
        },
2649 +
        "17": {
2650 +
          "name": "punctuation.definition.string.end.markdown"
2651 +
        },
2652 +
        "18": {
2653 +
          "name": "string.other.link.description.title.markdown"
2654 +
        },
2655 +
        "19": {
2656 +
          "name": "punctuation.definition.string.begin.markdown"
2657 +
        },
2658 +
        "2": {
2659 +
          "name": "string.other.link.description.markdown"
2660 +
        },
2661 +
        "20": {
2662 +
          "name": "punctuation.definition.string.end.markdown"
2663 +
        },
2664 +
        "21": {
2665 +
          "name": "punctuation.definition.metadata.markdown"
2666 +
        },
2667 +
        "4": {
2668 +
          "name": "punctuation.definition.link.description.end.markdown"
2669 +
        },
2670 +
        "5": {
2671 +
          "name": "punctuation.definition.metadata.markdown"
2672 +
        },
2673 +
        "7": {
2674 +
          "name": "punctuation.definition.link.markdown"
2675 +
        },
2676 +
        "8": {
2677 +
          "name": "markup.underline.link.image.markdown"
2678 +
        },
2679 +
        "9": {
2680 +
          "name": "punctuation.definition.link.markdown"
2681 +
        }
2682 +
      },
2683 +
      "match": "(!\\[)((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+)(])(\\()[\\t ]*((<)((?:\\\\[<>]|[^\\n<>])*)(>)|((?<url>(?>[^()\\s]+)|\\(\\g<url>*\\))*))[\\t ]*(?:((\\().+?(\\)))|((\").+?(\"))|((').+?(')))?\\s*(\\))",
2684 +
      "name": "meta.image.inline.markdown"
2685 +
    },
2686 +
    "image-ref": {
2687 +
      "captures": {
2688 +
        "1": {
2689 +
          "name": "punctuation.definition.link.description.begin.markdown"
2690 +
        },
2691 +
        "2": {
2692 +
          "name": "string.other.link.description.markdown"
2693 +
        },
2694 +
        "4": {
2695 +
          "name": "punctuation.definition.link.description.end.markdown"
2696 +
        },
2697 +
        "5": {
2698 +
          "name": "punctuation.definition.constant.markdown"
2699 +
        },
2700 +
        "6": {
2701 +
          "name": "constant.other.reference.link.markdown"
2702 +
        },
2703 +
        "7": {
2704 +
          "name": "punctuation.definition.constant.markdown"
2705 +
        }
2706 +
      },
2707 +
      "match": "(!\\[)((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+)(]) ?(\\[)(.*?)(])",
2708 +
      "name": "meta.image.reference.markdown"
2709 +
    },
2710 +
    "inline": {
2711 +
      "patterns": [
2712 +
        {
2713 +
          "include": "#ampersand"
2714 +
        },
2715 +
        {
2716 +
          "include": "#bracket"
2717 +
        },
2718 +
        {
2719 +
          "include": "#bold"
2720 +
        },
2721 +
        {
2722 +
          "include": "#italic"
2723 +
        },
2724 +
        {
2725 +
          "include": "#raw"
2726 +
        },
2727 +
        {
2728 +
          "include": "#strikethrough"
2729 +
        },
2730 +
        {
2731 +
          "include": "#escape"
2732 +
        },
2733 +
        {
2734 +
          "include": "#image-inline"
2735 +
        },
2736 +
        {
2737 +
          "include": "#image-ref"
2738 +
        },
2739 +
        {
2740 +
          "include": "#link-email"
2741 +
        },
2742 +
        {
2743 +
          "include": "#link-inet"
2744 +
        },
2745 +
        {
2746 +
          "include": "#link-inline"
2747 +
        },
2748 +
        {
2749 +
          "include": "#link-ref"
2750 +
        },
2751 +
        {
2752 +
          "include": "#link-ref-literal"
2753 +
        },
2754 +
        {
2755 +
          "include": "#link-ref-shortcut"
2756 +
        }
2757 +
      ]
2758 +
    },
2759 +
    "italic": {
2760 +
      "begin": "(?<open>(\\*(?=\\w)|(?<!\\w)\\*|(?<!\\w)\\b_))(?=\\S)(?=(<[^>]*+>|(?<raw>`+)([^`]|(?!(?<!`)\\k<raw>(?!`))`)*+\\k<raw>|\\\\[-\\]!#(-+.>\\[\\\\_`{}]?+|\\[((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+](( ?\\[[^]]*+])|(\\([\\t ]*+<?(.*?)>?[\\t ]*+((?<title>[\"'])(.*?)\\k<title>)?\\))))|\\k<open>\\k<open>|(?!(?<=\\S)\\k<open>).)++(?<=\\S)(?=_\\b|\\*)\\k<open>)",
2761 +
      "captures": {
2762 +
        "1": {
2763 +
          "name": "punctuation.definition.italic.markdown"
2764 +
        }
2765 +
      },
2766 +
      "end": "(?<=\\S)(\\1)((?!\\1)|(?=\\1\\1))",
2767 +
      "name": "markup.italic.markdown",
2768 +
      "patterns": [
2769 +
        {
2770 +
          "applyEndPatternLast": 1,
2771 +
          "begin": "(?=<[^>]*?>)",
2772 +
          "end": "(?<=>)",
2773 +
          "patterns": [
2774 +
            {
2775 +
              "include": "text.html.derivative"
2776 +
            }
2777 +
          ]
2778 +
        },
2779 +
        {
2780 +
          "include": "#escape"
2781 +
        },
2782 +
        {
2783 +
          "include": "#ampersand"
2784 +
        },
2785 +
        {
2786 +
          "include": "#bracket"
2787 +
        },
2788 +
        {
2789 +
          "include": "#raw"
2790 +
        },
2791 +
        {
2792 +
          "include": "#bold"
2793 +
        },
2794 +
        {
2795 +
          "include": "#image-inline"
2796 +
        },
2797 +
        {
2798 +
          "include": "#link-inline"
2799 +
        },
2800 +
        {
2801 +
          "include": "#link-inet"
2802 +
        },
2803 +
        {
2804 +
          "include": "#link-email"
2805 +
        },
2806 +
        {
2807 +
          "include": "#image-ref"
2808 +
        },
2809 +
        {
2810 +
          "include": "#link-ref-literal"
2811 +
        },
2812 +
        {
2813 +
          "include": "#link-ref"
2814 +
        },
2815 +
        {
2816 +
          "include": "#link-ref-shortcut"
2817 +
        },
2818 +
        {
2819 +
          "include": "#strikethrough"
2820 +
        }
2821 +
      ]
2822 +
    },
2823 +
    "link-def": {
2824 +
      "captures": {
2825 +
        "1": {
2826 +
          "name": "punctuation.definition.constant.markdown"
2827 +
        },
2828 +
        "10": {
2829 +
          "name": "punctuation.definition.string.begin.markdown"
2830 +
        },
2831 +
        "11": {
2832 +
          "name": "punctuation.definition.string.end.markdown"
2833 +
        },
2834 +
        "12": {
2835 +
          "name": "string.other.link.description.title.markdown"
2836 +
        },
2837 +
        "13": {
2838 +
          "name": "punctuation.definition.string.begin.markdown"
2839 +
        },
2840 +
        "14": {
2841 +
          "name": "punctuation.definition.string.end.markdown"
2842 +
        },
2843 +
        "15": {
2844 +
          "name": "string.other.link.description.title.markdown"
2845 +
        },
2846 +
        "16": {
2847 +
          "name": "punctuation.definition.string.begin.markdown"
2848 +
        },
2849 +
        "17": {
2850 +
          "name": "punctuation.definition.string.end.markdown"
2851 +
        },
2852 +
        "2": {
2853 +
          "name": "constant.other.reference.link.markdown"
2854 +
        },
2855 +
        "3": {
2856 +
          "name": "punctuation.definition.constant.markdown"
2857 +
        },
2858 +
        "4": {
2859 +
          "name": "punctuation.separator.key-value.markdown"
2860 +
        },
2861 +
        "5": {
2862 +
          "name": "punctuation.definition.link.markdown"
2863 +
        },
2864 +
        "6": {
2865 +
          "name": "markup.underline.link.markdown"
2866 +
        },
2867 +
        "7": {
2868 +
          "name": "punctuation.definition.link.markdown"
2869 +
        },
2870 +
        "8": {
2871 +
          "name": "markup.underline.link.markdown"
2872 +
        },
2873 +
        "9": {
2874 +
          "name": "string.other.link.description.title.markdown"
2875 +
        }
2876 +
      },
2877 +
      "match": "\\s*(\\[)([^]]+?)(])(:)[\\t ]*(?:(<)((?:\\\\[<>]|[^\\n<>])*)(>)|(\\S+?))[\\t ]*(?:((\\().+?(\\)))|((\").+?(\"))|((').+?(')))?\\s*$",
2878 +
      "name": "meta.link.reference.def.markdown"
2879 +
    },
2880 +
    "link-email": {
2881 +
      "captures": {
2882 +
        "1": {
2883 +
          "name": "punctuation.definition.link.markdown"
2884 +
        },
2885 +
        "2": {
2886 +
          "name": "markup.underline.link.markdown"
2887 +
        },
2888 +
        "4": {
2889 +
          "name": "punctuation.definition.link.markdown"
2890 +
        }
2891 +
      },
2892 +
      "match": "(<)((?:mailto:)?[!#-'*+\\--9=?A-Z^-~]+@[-0-9A-Za-z]+(?:\\.[-0-9A-Za-z]+)*)(>)",
2893 +
      "name": "meta.link.email.lt-gt.markdown"
2894 +
    },
2895 +
    "link-inet": {
2896 +
      "captures": {
2897 +
        "1": {
2898 +
          "name": "punctuation.definition.link.markdown"
2899 +
        },
2900 +
        "2": {
2901 +
          "name": "markup.underline.link.markdown"
2902 +
        },
2903 +
        "3": {
2904 +
          "name": "punctuation.definition.link.markdown"
2905 +
        }
2906 +
      },
2907 +
      "match": "(<)((?:https?|ftp)://.*?)(>)",
2908 +
      "name": "meta.link.inet.markdown"
2909 +
    },
2910 +
    "link-inline": {
2911 +
      "captures": {
2912 +
        "1": {
2913 +
          "name": "punctuation.definition.link.title.begin.markdown"
2914 +
        },
2915 +
        "10": {
2916 +
          "name": "markup.underline.link.markdown"
2917 +
        },
2918 +
        "12": {
2919 +
          "name": "string.other.link.description.title.markdown"
2920 +
        },
2921 +
        "13": {
2922 +
          "name": "punctuation.definition.string.begin.markdown"
2923 +
        },
2924 +
        "14": {
2925 +
          "name": "punctuation.definition.string.end.markdown"
2926 +
        },
2927 +
        "15": {
2928 +
          "name": "string.other.link.description.title.markdown"
2929 +
        },
2930 +
        "16": {
2931 +
          "name": "punctuation.definition.string.begin.markdown"
2932 +
        },
2933 +
        "17": {
2934 +
          "name": "punctuation.definition.string.end.markdown"
2935 +
        },
2936 +
        "18": {
2937 +
          "name": "string.other.link.description.title.markdown"
2938 +
        },
2939 +
        "19": {
2940 +
          "name": "punctuation.definition.string.begin.markdown"
2941 +
        },
2942 +
        "2": {
2943 +
          "name": "string.other.link.title.markdown",
2944 +
          "patterns": [
2945 +
            {
2946 +
              "include": "#raw"
2947 +
            },
2948 +
            {
2949 +
              "include": "#bold"
2950 +
            },
2951 +
            {
2952 +
              "include": "#italic"
2953 +
            },
2954 +
            {
2955 +
              "include": "#strikethrough"
2956 +
            },
2957 +
            {
2958 +
              "include": "#image-inline"
2959 +
            }
2960 +
          ]
2961 +
        },
2962 +
        "20": {
2963 +
          "name": "punctuation.definition.string.end.markdown"
2964 +
        },
2965 +
        "21": {
2966 +
          "name": "punctuation.definition.metadata.markdown"
2967 +
        },
2968 +
        "4": {
2969 +
          "name": "punctuation.definition.link.title.end.markdown"
2970 +
        },
2971 +
        "5": {
2972 +
          "name": "punctuation.definition.metadata.markdown"
2973 +
        },
2974 +
        "7": {
2975 +
          "name": "punctuation.definition.link.markdown"
2976 +
        },
2977 +
        "8": {
2978 +
          "name": "markup.underline.link.markdown"
2979 +
        },
2980 +
        "9": {
2981 +
          "name": "punctuation.definition.link.markdown"
2982 +
        }
2983 +
      },
2984 +
      "match": "(\\[)((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+)(])(\\()[\\t ]*((<)((?:\\\\[<>]|[^\\n<>])*)(>)|((?<url>(?>[^()\\s]+)|\\(\\g<url>*\\))*))[\\t ]*(?:((\\()[^()]*(\\)))|((\")[^\"]*(\"))|((')[^']*(')))?\\s*(\\))",
2985 +
      "name": "meta.link.inline.markdown"
2986 +
    },
2987 +
    "link-ref": {
2988 +
      "captures": {
2989 +
        "1": {
2990 +
          "name": "punctuation.definition.link.title.begin.markdown"
2991 +
        },
2992 +
        "2": {
2993 +
          "name": "string.other.link.title.markdown",
2994 +
          "patterns": [
2995 +
            {
2996 +
              "include": "#raw"
2997 +
            },
2998 +
            {
2999 +
              "include": "#bold"
3000 +
            },
3001 +
            {
3002 +
              "include": "#italic"
3003 +
            },
3004 +
            {
3005 +
              "include": "#strikethrough"
3006 +
            },
3007 +
            {
3008 +
              "include": "#image-inline"
3009 +
            }
3010 +
          ]
3011 +
        },
3012 +
        "4": {
3013 +
          "name": "punctuation.definition.link.title.end.markdown"
3014 +
        },
3015 +
        "5": {
3016 +
          "name": "punctuation.definition.constant.begin.markdown"
3017 +
        },
3018 +
        "6": {
3019 +
          "name": "constant.other.reference.link.markdown"
3020 +
        },
3021 +
        "7": {
3022 +
          "name": "punctuation.definition.constant.end.markdown"
3023 +
        }
3024 +
      },
3025 +
      "match": "(?<![]\\\\])(\\[)((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+)(])(\\[)([^]]*+)(])",
3026 +
      "name": "meta.link.reference.markdown"
3027 +
    },
3028 +
    "link-ref-literal": {
3029 +
      "captures": {
3030 +
        "1": {
3031 +
          "name": "punctuation.definition.link.title.begin.markdown"
3032 +
        },
3033 +
        "2": {
3034 +
          "name": "string.other.link.title.markdown"
3035 +
        },
3036 +
        "4": {
3037 +
          "name": "punctuation.definition.link.title.end.markdown"
3038 +
        },
3039 +
        "5": {
3040 +
          "name": "punctuation.definition.constant.begin.markdown"
3041 +
        },
3042 +
        "6": {
3043 +
          "name": "punctuation.definition.constant.end.markdown"
3044 +
        }
3045 +
      },
3046 +
      "match": "(?<![]\\\\])(\\[)((?<square>[^]\\[\\\\]|\\\\.|\\[\\g<square>*+])*+)(]) ?(\\[)(])",
3047 +
      "name": "meta.link.reference.literal.markdown"
3048 +
    },
3049 +
    "link-ref-shortcut": {
3050 +
      "captures": {
3051 +
        "1": {
3052 +
          "name": "punctuation.definition.link.title.begin.markdown"
3053 +
        },
3054 +
        "2": {
3055 +
          "name": "string.other.link.title.markdown"
3056 +
        },
3057 +
        "3": {
3058 +
          "name": "punctuation.definition.link.title.end.markdown"
3059 +
        }
3060 +
      },
3061 +
      "match": "(?<![]\\\\])(\\[)((?:[^]\\[\\\\\\s]|\\\\[]\\[])+?)((?<!\\\\)])",
3062 +
      "name": "meta.link.reference.markdown"
3063 +
    },
3064 +
    "list_paragraph": {
3065 +
      "begin": "(^|\\G)(?=\\S)(?![*->]\\s|[0-9]+\\.\\s)",
3066 +
      "name": "meta.paragraph.markdown",
3067 +
      "patterns": [
3068 +
        {
3069 +
          "include": "#inline"
3070 +
        },
3071 +
        {
3072 +
          "include": "text.html.derivative"
3073 +
        },
3074 +
        {
3075 +
          "include": "#heading-setext"
3076 +
        }
3077 +
      ],
3078 +
      "while": "(^|\\G)(?!\\s*$|#| {0,3}([-*>_] {2,}){3,}[\\t ]*$\\n?| {0,3}[*->]| {0,3}[0-9]+\\.)"
3079 +
    },
3080 +
    "lists": {
3081 +
      "patterns": [
3082 +
        {
3083 +
          "begin": "(^|\\G)( {0,3})([-*+])([\\t ])",
3084 +
          "beginCaptures": {
3085 +
            "3": {
3086 +
              "name": "punctuation.definition.list.begin.markdown"
3087 +
            }
3088 +
          },
3089 +
          "name": "markup.list.unnumbered.markdown",
3090 +
          "patterns": [
3091 +
            {
3092 +
              "include": "#block"
3093 +
            },
3094 +
            {
3095 +
              "include": "#list_paragraph"
3096 +
            }
3097 +
          ],
3098 +
          "while": "((^|\\G)( {2,4}|\\t))|^([\\t ]*)$"
3099 +
        },
3100 +
        {
3101 +
          "begin": "(^|\\G)( {0,3})([0-9]+[).])([\\t ])",
3102 +
          "beginCaptures": {
3103 +
            "3": {
3104 +
              "name": "punctuation.definition.list.begin.markdown"
3105 +
            }
3106 +
          },
3107 +
          "name": "markup.list.numbered.markdown",
3108 +
          "patterns": [
3109 +
            {
3110 +
              "include": "#block"
3111 +
            },
3112 +
            {
3113 +
              "include": "#list_paragraph"
3114 +
            }
3115 +
          ],
3116 +
          "while": "((^|\\G)( {2,4}|\\t))|^([\\t ]*)$"
3117 +
        }
3118 +
      ]
3119 +
    },
3120 +
    "paragraph": {
3121 +
      "begin": "(^|\\G) {0,3}(?=[^\\t\\n ])",
3122 +
      "name": "meta.paragraph.markdown",
3123 +
      "patterns": [
3124 +
        {
3125 +
          "include": "#inline"
3126 +
        },
3127 +
        {
3128 +
          "include": "text.html.derivative"
3129 +
        },
3130 +
        {
3131 +
          "include": "#heading-setext"
3132 +
        }
3133 +
      ],
3134 +
      "while": "(^|\\G)((?=\\s*[-=]{3,}\\s*$)| {4,}(?=[^\\t\\n ]))"
3135 +
    },
3136 +
    "raw": {
3137 +
      "captures": {
3138 +
        "1": {
3139 +
          "name": "punctuation.definition.raw.markdown"
3140 +
        },
3141 +
        "3": {
3142 +
          "name": "punctuation.definition.raw.markdown"
3143 +
        }
3144 +
      },
3145 +
      "match": "(`+)((?:[^`]|(?!(?<!`)\\1(?!`))`)*+)(\\1)",
3146 +
      "name": "markup.inline.raw.string.markdown"
3147 +
    },
3148 +
    "raw_block": {
3149 +
      "begin": "(^|\\G)( {4}|\\t)",
3150 +
      "name": "markup.raw.block.markdown",
3151 +
      "while": "(^|\\G)( {4}|\\t)"
3152 +
    },
3153 +
    "separator": {
3154 +
      "match": "(^|\\G) {0,3}([-*_])( {0,2}\\2){2,}[\\t ]*$\\n?",
3155 +
      "name": "meta.separator.markdown"
3156 +
    },
3157 +
    "strikethrough": {
3158 +
      "captures": {
3159 +
        "1": {
3160 +
          "name": "punctuation.definition.strikethrough.markdown"
3161 +
        },
3162 +
        "2": {
3163 +
          "patterns": [
3164 +
            {
3165 +
              "applyEndPatternLast": 1,
3166 +
              "begin": "(?=<[^>]*?>)",
3167 +
              "end": "(?<=>)",
3168 +
              "patterns": [
3169 +
                {
3170 +
                  "include": "text.html.derivative"
3171 +
                }
3172 +
              ]
3173 +
            },
3174 +
            {
3175 +
              "include": "#escape"
3176 +
            },
3177 +
            {
3178 +
              "include": "#ampersand"
3179 +
            },
3180 +
            {
3181 +
              "include": "#bracket"
3182 +
            },
3183 +
            {
3184 +
              "include": "#raw"
3185 +
            },
3186 +
            {
3187 +
              "include": "#bold"
3188 +
            },
3189 +
            {
3190 +
              "include": "#italic"
3191 +
            },
3192 +
            {
3193 +
              "include": "#image-inline"
3194 +
            },
3195 +
            {
3196 +
              "include": "#link-inline"
3197 +
            },
3198 +
            {
3199 +
              "include": "#link-inet"
3200 +
            },
3201 +
            {
3202 +
              "include": "#link-email"
3203 +
            },
3204 +
            {
3205 +
              "include": "#image-ref"
3206 +
            },
3207 +
            {
3208 +
              "include": "#link-ref-literal"
3209 +
            },
3210 +
            {
3211 +
              "include": "#link-ref"
3212 +
            },
3213 +
            {
3214 +
              "include": "#link-ref-shortcut"
3215 +
            }
3216 +
          ]
3217 +
        },
3218 +
        "3": {
3219 +
          "name": "punctuation.definition.strikethrough.markdown"
3220 +
        }
3221 +
      },
3222 +
      "match": "(?<!\\\\)(~{2,})(?!(?<=\\w~~)_)((?:[^~]|(?!(?<![\\\\~])\\1(?!~))~)*+)(\\1)(?!(?<=_\\1)\\w)",
3223 +
      "name": "markup.strikethrough.markdown"
3224 +
    },
3225 +
    "table": {
3226 +
      "begin": "(^|\\G)(\\|)(?=[^|].+\\|\\s*$)",
3227 +
      "beginCaptures": {
3228 +
        "2": {
3229 +
          "name": "punctuation.definition.table.markdown"
3230 +
        }
3231 +
      },
3232 +
      "name": "markup.table.markdown",
3233 +
      "patterns": [
3234 +
        {
3235 +
          "match": "\\|",
3236 +
          "name": "punctuation.definition.table.markdown"
3237 +
        },
3238 +
        {
3239 +
          "captures": {
3240 +
            "1": {
3241 +
              "name": "punctuation.separator.table.markdown"
3242 +
            }
3243 +
          },
3244 +
          "match": "(?<=\\|)\\s*(:?-+:?)\\s*(?=\\|)"
3245 +
        },
3246 +
        {
3247 +
          "captures": {
3248 +
            "1": {
3249 +
              "patterns": [
3250 +
                {
3251 +
                  "include": "#inline"
3252 +
                }
3253 +
              ]
3254 +
            }
3255 +
          },
3256 +
          "match": "(?<=\\|)\\s*(?=\\S)((\\\\\\||[^|])+)(?<=\\S)\\s*(?=\\|)"
3257 +
        }
3258 +
      ],
3259 +
      "while": "(^|\\G)(?=\\|)"
3260 +
    }
3261 +
  },
3262 +
  "scopeName": "text.html.markdown"
3263 +
}
crates/diff/src/syntaxes/typescript.json added +5747 -0
1 +
{
2 +
  "displayName": "TypeScript",
3 +
  "name": "typescript",
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.ts"
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.ts"
25 +
        }
26 +
      },
27 +
      "end": "}",
28 +
      "endCaptures": {
29 +
        "0": {
30 +
          "name": "punctuation.definition.block.ts"
31 +
        }
32 +
      },
33 +
      "name": "meta.objectliteral.ts",
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.ts"
45 +
        },
46 +
        "2": {
47 +
          "name": "punctuation.definition.binding-pattern.array.ts"
48 +
        }
49 +
      },
50 +
      "end": "]",
51 +
      "endCaptures": {
52 +
        "0": {
53 +
          "name": "punctuation.definition.binding-pattern.array.ts"
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.ts"
70 +
        },
71 +
        "2": {
72 +
          "name": "punctuation.definition.binding-pattern.array.ts"
73 +
        }
74 +
      },
75 +
      "end": "]",
76 +
      "endCaptures": {
77 +
        "0": {
78 +
          "name": "punctuation.definition.binding-pattern.array.ts"
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.ts"
95 +
        }
96 +
      },
97 +
      "end": "]",
98 +
      "endCaptures": {
99 +
        "0": {
100 +
          "name": "meta.brace.square.ts"
101 +
        }
102 +
      },
103 +
      "name": "meta.array.literal.ts",
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.ts"
119 +
            },
120 +
            "2": {
121 +
              "name": "variable.parameter.ts"
122 +
            }
123 +
          },
124 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(async)\\s+)?([$_[:alpha:]][$_[:alnum:]]*)\\s*(?==>)",
125 +
          "name": "meta.arrow.ts"
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*(((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.ts"
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.ts",
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.ts"
159 +
            }
160 +
          },
161 +
          "end": "((?<=[}\\S])(?<!=>)|((?!\\{)(?=\\S)))(?!/[*/])",
162 +
          "name": "meta.arrow.ts",
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.ts"
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.ts",
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.ts"
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.ts"
276 +
        },
277 +
        {
278 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
279 +
          "name": "constant.language.boolean.false.ts"
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 +
          "captures": {
309 +
            "1": {
310 +
              "name": "meta.brace.angle.ts"
311 +
            },
312 +
            "2": {
313 +
              "name": "storage.modifier.ts"
314 +
            },
315 +
            "3": {
316 +
              "name": "meta.brace.angle.ts"
317 +
            }
318 +
          },
319 +
          "match": "\\s*(<)\\s*(const)\\s*(>)",
320 +
          "name": "cast.expr.ts"
321 +
        },
322 +
        {
323 +
          "begin": "(?<!\\+\\+|--)(?<=^return|[^$._[:alnum:]]return|^throw|[^$._[:alnum:]]throw|^yield|[^$._[:alnum:]]yield|^await|[^$._[:alnum:]]await|^default|[^$._[:alnum:]]default|[\\&(*,:=>?^|]|[^$_[:alnum:]](?:\\+\\+|--)|[^+]\\+|[^-]-)\\s*(<)(?!<?=)(?!\\s*$)",
324 +
          "beginCaptures": {
325 +
            "1": {
326 +
              "name": "meta.brace.angle.ts"
327 +
            }
328 +
          },
329 +
          "end": "(>)",
330 +
          "endCaptures": {
331 +
            "1": {
332 +
              "name": "meta.brace.angle.ts"
333 +
            }
334 +
          },
335 +
          "name": "cast.expr.ts",
336 +
          "patterns": [
337 +
            {
338 +
              "include": "#type"
339 +
            }
340 +
          ]
341 +
        },
342 +
        {
343 +
          "begin": "(?<=^)\\s*(<)(?=[$_[:alpha:]][$_[:alnum:]]*\\s*>)",
344 +
          "beginCaptures": {
345 +
            "1": {
346 +
              "name": "meta.brace.angle.ts"
347 +
            }
348 +
          },
349 +
          "end": "(>)",
350 +
          "endCaptures": {
351 +
            "1": {
352 +
              "name": "meta.brace.angle.ts"
353 +
            }
354 +
          },
355 +
          "name": "cast.expr.ts",
356 +
          "patterns": [
357 +
            {
358 +
              "include": "#type"
359 +
            }
360 +
          ]
361 +
        }
362 +
      ]
363 +
    },
364 +
    "class-declaration": {
365 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[*/])",
366 +
      "beginCaptures": {
367 +
        "1": {
368 +
          "name": "keyword.control.export.ts"
369 +
        },
370 +
        "2": {
371 +
          "name": "storage.modifier.ts"
372 +
        },
373 +
        "3": {
374 +
          "name": "storage.modifier.ts"
375 +
        },
376 +
        "4": {
377 +
          "name": "storage.type.class.ts"
378 +
        }
379 +
      },
380 +
      "end": "(?<=})",
381 +
      "name": "meta.class.ts",
382 +
      "patterns": [
383 +
        {
384 +
          "include": "#class-declaration-or-expression-patterns"
385 +
        }
386 +
      ]
387 +
    },
388 +
    "class-declaration-or-expression-patterns": {
389 +
      "patterns": [
390 +
        {
391 +
          "include": "#comment"
392 +
        },
393 +
        {
394 +
          "include": "#class-or-interface-heritage"
395 +
        },
396 +
        {
397 +
          "captures": {
398 +
            "0": {
399 +
              "name": "entity.name.type.class.ts"
400 +
            }
401 +
          },
402 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
403 +
        },
404 +
        {
405 +
          "include": "#type-parameters"
406 +
        },
407 +
        {
408 +
          "include": "#class-or-interface-body"
409 +
        }
410 +
      ]
411 +
    },
412 +
    "class-expression": {
413 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|/[*/])",
414 +
      "beginCaptures": {
415 +
        "1": {
416 +
          "name": "storage.modifier.ts"
417 +
        },
418 +
        "2": {
419 +
          "name": "storage.type.class.ts"
420 +
        }
421 +
      },
422 +
      "end": "(?<=})",
423 +
      "name": "meta.class.ts",
424 +
      "patterns": [
425 +
        {
426 +
          "include": "#class-declaration-or-expression-patterns"
427 +
        }
428 +
      ]
429 +
    },
430 +
    "class-or-interface-body": {
431 +
      "begin": "\\{",
432 +
      "beginCaptures": {
433 +
        "0": {
434 +
          "name": "punctuation.definition.block.ts"
435 +
        }
436 +
      },
437 +
      "end": "}",
438 +
      "endCaptures": {
439 +
        "0": {
440 +
          "name": "punctuation.definition.block.ts"
441 +
        }
442 +
      },
443 +
      "patterns": [
444 +
        {
445 +
          "include": "#comment"
446 +
        },
447 +
        {
448 +
          "include": "#decorator"
449 +
        },
450 +
        {
451 +
          "begin": "(?<=:)\\s*",
452 +
          "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)",
453 +
          "patterns": [
454 +
            {
455 +
              "include": "#expression"
456 +
            }
457 +
          ]
458 +
        },
459 +
        {
460 +
          "include": "#method-declaration"
461 +
        },
462 +
        {
463 +
          "include": "#indexer-declaration"
464 +
        },
465 +
        {
466 +
          "include": "#field-declaration"
467 +
        },
468 +
        {
469 +
          "include": "#string"
470 +
        },
471 +
        {
472 +
          "include": "#type-annotation"
473 +
        },
474 +
        {
475 +
          "include": "#variable-initializer"
476 +
        },
477 +
        {
478 +
          "include": "#access-modifier"
479 +
        },
480 +
        {
481 +
          "include": "#property-accessor"
482 +
        },
483 +
        {
484 +
          "include": "#async-modifier"
485 +
        },
486 +
        {
487 +
          "include": "#after-operator-block-as-object-literal"
488 +
        },
489 +
        {
490 +
          "include": "#decl-block"
491 +
        },
492 +
        {
493 +
          "include": "#expression"
494 +
        },
495 +
        {
496 +
          "include": "#punctuation-comma"
497 +
        },
498 +
        {
499 +
          "include": "#punctuation-semicolon"
500 +
        }
501 +
      ]
502 +
    },
503 +
    "class-or-interface-heritage": {
504 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(extends|implements)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
505 +
      "beginCaptures": {
506 +
        "1": {
507 +
          "name": "storage.modifier.ts"
508 +
        }
509 +
      },
510 +
      "end": "(?=\\{)",
511 +
      "patterns": [
512 +
        {
513 +
          "include": "#comment"
514 +
        },
515 +
        {
516 +
          "include": "#class-or-interface-heritage"
517 +
        },
518 +
        {
519 +
          "include": "#type-parameters"
520 +
        },
521 +
        {
522 +
          "include": "#expressionWithoutIdentifiers"
523 +
        },
524 +
        {
525 +
          "captures": {
526 +
            "1": {
527 +
              "name": "entity.name.type.module.ts"
528 +
            },
529 +
            "2": {
530 +
              "name": "punctuation.accessor.ts"
531 +
            },
532 +
            "3": {
533 +
              "name": "punctuation.accessor.optional.ts"
534 +
            }
535 +
          },
536 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))(?=\\s*[$_[:alpha:]][$_[:alnum:]]*(\\s*\\??\\.\\s*[$_[:alpha:]][$_[:alnum:]]*)*\\s*)"
537 +
        },
538 +
        {
539 +
          "captures": {
540 +
            "1": {
541 +
              "name": "entity.other.inherited-class.ts"
542 +
            }
543 +
          },
544 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)"
545 +
        },
546 +
        {
547 +
          "include": "#expressionPunctuations"
548 +
        }
549 +
      ]
550 +
    },
551 +
    "comment": {
552 +
      "patterns": [
553 +
        {
554 +
          "begin": "/\\*\\*(?!/)",
555 +
          "beginCaptures": {
556 +
            "0": {
557 +
              "name": "punctuation.definition.comment.ts"
558 +
            }
559 +
          },
560 +
          "end": "\\*/",
561 +
          "endCaptures": {
562 +
            "0": {
563 +
              "name": "punctuation.definition.comment.ts"
564 +
            }
565 +
          },
566 +
          "name": "comment.block.documentation.ts",
567 +
          "patterns": [
568 +
            {
569 +
              "include": "#docblock"
570 +
            }
571 +
          ]
572 +
        },
573 +
        {
574 +
          "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
575 +
          "beginCaptures": {
576 +
            "1": {
577 +
              "name": "punctuation.definition.comment.ts"
578 +
            },
579 +
            "2": {
580 +
              "name": "storage.type.internaldeclaration.ts"
581 +
            },
582 +
            "3": {
583 +
              "name": "punctuation.decorator.internaldeclaration.ts"
584 +
            }
585 +
          },
586 +
          "end": "\\*/",
587 +
          "endCaptures": {
588 +
            "0": {
589 +
              "name": "punctuation.definition.comment.ts"
590 +
            }
591 +
          },
592 +
          "name": "comment.block.ts"
593 +
        },
594 +
        {
595 +
          "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
596 +
          "beginCaptures": {
597 +
            "1": {
598 +
              "name": "punctuation.whitespace.comment.leading.ts"
599 +
            },
600 +
            "2": {
601 +
              "name": "comment.line.double-slash.ts"
602 +
            },
603 +
            "3": {
604 +
              "name": "punctuation.definition.comment.ts"
605 +
            },
606 +
            "4": {
607 +
              "name": "storage.type.internaldeclaration.ts"
608 +
            },
609 +
            "5": {
610 +
              "name": "punctuation.decorator.internaldeclaration.ts"
611 +
            }
612 +
          },
613 +
          "contentName": "comment.line.double-slash.ts",
614 +
          "end": "(?=$)"
615 +
        }
616 +
      ]
617 +
    },
618 +
    "control-statement": {
619 +
      "patterns": [
620 +
        {
621 +
          "include": "#switch-statement"
622 +
        },
623 +
        {
624 +
          "include": "#for-loop"
625 +
        },
626 +
        {
627 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
628 +
          "name": "keyword.control.trycatch.ts"
629 +
        },
630 +
        {
631 +
          "captures": {
632 +
            "1": {
633 +
              "name": "keyword.control.loop.ts"
634 +
            },
635 +
            "2": {
636 +
              "name": "entity.name.label.ts"
637 +
            }
638 +
          },
639 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
640 +
        },
641 +
        {
642 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
643 +
          "name": "keyword.control.loop.ts"
644 +
        },
645 +
        {
646 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
647 +
          "beginCaptures": {
648 +
            "0": {
649 +
              "name": "keyword.control.flow.ts"
650 +
            }
651 +
          },
652 +
          "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)",
653 +
          "patterns": [
654 +
            {
655 +
              "include": "#expression"
656 +
            }
657 +
          ]
658 +
        },
659 +
        {
660 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
661 +
          "name": "keyword.control.switch.ts"
662 +
        },
663 +
        {
664 +
          "include": "#if-statement"
665 +
        },
666 +
        {
667 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
668 +
          "name": "keyword.control.conditional.ts"
669 +
        },
670 +
        {
671 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
672 +
          "name": "keyword.control.with.ts"
673 +
        },
674 +
        {
675 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
676 +
          "name": "keyword.control.ts"
677 +
        },
678 +
        {
679 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
680 +
          "name": "keyword.other.debugger.ts"
681 +
        }
682 +
      ]
683 +
    },
684 +
    "decl-block": {
685 +
      "begin": "\\{",
686 +
      "beginCaptures": {
687 +
        "0": {
688 +
          "name": "punctuation.definition.block.ts"
689 +
        }
690 +
      },
691 +
      "end": "}",
692 +
      "endCaptures": {
693 +
        "0": {
694 +
          "name": "punctuation.definition.block.ts"
695 +
        }
696 +
      },
697 +
      "name": "meta.block.ts",
698 +
      "patterns": [
699 +
        {
700 +
          "include": "#statements"
701 +
        }
702 +
      ]
703 +
    },
704 +
    "declaration": {
705 +
      "patterns": [
706 +
        {
707 +
          "include": "#decorator"
708 +
        },
709 +
        {
710 +
          "include": "#var-expr"
711 +
        },
712 +
        {
713 +
          "include": "#function-declaration"
714 +
        },
715 +
        {
716 +
          "include": "#class-declaration"
717 +
        },
718 +
        {
719 +
          "include": "#interface-declaration"
720 +
        },
721 +
        {
722 +
          "include": "#enum-declaration"
723 +
        },
724 +
        {
725 +
          "include": "#namespace-declaration"
726 +
        },
727 +
        {
728 +
          "include": "#type-alias-declaration"
729 +
        },
730 +
        {
731 +
          "include": "#import-equals-declaration"
732 +
        },
733 +
        {
734 +
          "include": "#import-declaration"
735 +
        },
736 +
        {
737 +
          "include": "#export-declaration"
738 +
        },
739 +
        {
740 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
741 +
          "name": "storage.modifier.ts"
742 +
        }
743 +
      ]
744 +
    },
745 +
    "decorator": {
746 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))@",
747 +
      "beginCaptures": {
748 +
        "0": {
749 +
          "name": "punctuation.decorator.ts"
750 +
        }
751 +
      },
752 +
      "end": "(?=\\s)",
753 +
      "name": "meta.decorator.ts",
754 +
      "patterns": [
755 +
        {
756 +
          "include": "#expression"
757 +
        }
758 +
      ]
759 +
    },
760 +
    "destructuring-const": {
761 +
      "patterns": [
762 +
        {
763 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
764 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
765 +
          "name": "meta.object-binding-pattern-variable.ts",
766 +
          "patterns": [
767 +
            {
768 +
              "include": "#object-binding-pattern-const"
769 +
            },
770 +
            {
771 +
              "include": "#type-annotation"
772 +
            },
773 +
            {
774 +
              "include": "#comment"
775 +
            }
776 +
          ]
777 +
        },
778 +
        {
779 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
780 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
781 +
          "name": "meta.array-binding-pattern-variable.ts",
782 +
          "patterns": [
783 +
            {
784 +
              "include": "#array-binding-pattern-const"
785 +
            },
786 +
            {
787 +
              "include": "#type-annotation"
788 +
            },
789 +
            {
790 +
              "include": "#comment"
791 +
            }
792 +
          ]
793 +
        }
794 +
      ]
795 +
    },
796 +
    "destructuring-parameter": {
797 +
      "patterns": [
798 +
        {
799 +
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
800 +
          "beginCaptures": {
801 +
            "1": {
802 +
              "name": "keyword.operator.rest.ts"
803 +
            },
804 +
            "2": {
805 +
              "name": "punctuation.definition.binding-pattern.object.ts"
806 +
            }
807 +
          },
808 +
          "end": "}",
809 +
          "endCaptures": {
810 +
            "0": {
811 +
              "name": "punctuation.definition.binding-pattern.object.ts"
812 +
            }
813 +
          },
814 +
          "name": "meta.parameter.object-binding-pattern.ts",
815 +
          "patterns": [
816 +
            {
817 +
              "include": "#parameter-object-binding-element"
818 +
            }
819 +
          ]
820 +
        },
821 +
        {
822 +
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
823 +
          "beginCaptures": {
824 +
            "1": {
825 +
              "name": "keyword.operator.rest.ts"
826 +
            },
827 +
            "2": {
828 +
              "name": "punctuation.definition.binding-pattern.array.ts"
829 +
            }
830 +
          },
831 +
          "end": "]",
832 +
          "endCaptures": {
833 +
            "0": {
834 +
              "name": "punctuation.definition.binding-pattern.array.ts"
835 +
            }
836 +
          },
837 +
          "name": "meta.paramter.array-binding-pattern.ts",
838 +
          "patterns": [
839 +
            {
840 +
              "include": "#parameter-binding-element"
841 +
            },
842 +
            {
843 +
              "include": "#punctuation-comma"
844 +
            }
845 +
          ]
846 +
        }
847 +
      ]
848 +
    },
849 +
    "destructuring-parameter-rest": {
850 +
      "captures": {
851 +
        "1": {
852 +
          "name": "keyword.operator.rest.ts"
853 +
        },
854 +
        "2": {
855 +
          "name": "variable.parameter.ts"
856 +
        }
857 +
      },
858 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
859 +
    },
860 +
    "destructuring-variable": {
861 +
      "patterns": [
862 +
        {
863 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
864 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
865 +
          "name": "meta.object-binding-pattern-variable.ts",
866 +
          "patterns": [
867 +
            {
868 +
              "include": "#object-binding-pattern"
869 +
            },
870 +
            {
871 +
              "include": "#type-annotation"
872 +
            },
873 +
            {
874 +
              "include": "#comment"
875 +
            }
876 +
          ]
877 +
        },
878 +
        {
879 +
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
880 +
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
881 +
          "name": "meta.array-binding-pattern-variable.ts",
882 +
          "patterns": [
883 +
            {
884 +
              "include": "#array-binding-pattern"
885 +
            },
886 +
            {
887 +
              "include": "#type-annotation"
888 +
            },
889 +
            {
890 +
              "include": "#comment"
891 +
            }
892 +
          ]
893 +
        }
894 +
      ]
895 +
    },
896 +
    "destructuring-variable-rest": {
897 +
      "captures": {
898 +
        "1": {
899 +
          "name": "keyword.operator.rest.ts"
900 +
        },
901 +
        "2": {
902 +
          "name": "meta.definition.variable.ts variable.other.readwrite.ts"
903 +
        }
904 +
      },
905 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
906 +
    },
907 +
    "destructuring-variable-rest-const": {
908 +
      "captures": {
909 +
        "1": {
910 +
          "name": "keyword.operator.rest.ts"
911 +
        },
912 +
        "2": {
913 +
          "name": "meta.definition.variable.ts variable.other.constant.ts"
914 +
        }
915 +
      },
916 +
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
917 +
    },
918 +
    "directives": {
919 +
      "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))+\\s*/>\\s*$)",
920 +
      "beginCaptures": {
921 +
        "1": {
922 +
          "name": "punctuation.definition.comment.ts"
923 +
        }
924 +
      },
925 +
      "end": "(?=$)",
926 +
      "name": "comment.line.triple-slash.directive.ts",
927 +
      "patterns": [
928 +
        {
929 +
          "begin": "(<)(reference|amd-dependency|amd-module)",
930 +
          "beginCaptures": {
931 +
            "1": {
932 +
              "name": "punctuation.definition.tag.directive.ts"
933 +
            },
934 +
            "2": {
935 +
              "name": "entity.name.tag.directive.ts"
936 +
            }
937 +
          },
938 +
          "end": "/>",
939 +
          "endCaptures": {
940 +
            "0": {
941 +
              "name": "punctuation.definition.tag.directive.ts"
942 +
            }
943 +
          },
944 +
          "name": "meta.tag.ts",
945 +
          "patterns": [
946 +
            {
947 +
              "match": "path|types|no-default-lib|lib|name|resolution-mode",
948 +
              "name": "entity.other.attribute-name.directive.ts"
949 +
            },
950 +
            {
951 +
              "match": "=",
952 +
              "name": "keyword.operator.assignment.ts"
953 +
            },
954 +
            {
955 +
              "include": "#string"
956 +
            }
957 +
          ]
958 +
        }
959 +
      ]
960 +
    },
961 +
    "docblock": {
962 +
      "patterns": [
963 +
        {
964 +
          "captures": {
965 +
            "1": {
966 +
              "name": "storage.type.class.jsdoc"
967 +
            },
968 +
            "2": {
969 +
              "name": "punctuation.definition.block.tag.jsdoc"
970 +
            },
971 +
            "3": {
972 +
              "name": "constant.language.access-type.jsdoc"
973 +
            }
974 +
          },
975 +
          "match": "((@)a(?:ccess|pi))\\s+(p(?:rivate|rotected|ublic))\\b"
976 +
        },
977 +
        {
978 +
          "captures": {
979 +
            "1": {
980 +
              "name": "storage.type.class.jsdoc"
981 +
            },
982 +
            "2": {
983 +
              "name": "punctuation.definition.block.tag.jsdoc"
984 +
            },
985 +
            "3": {
986 +
              "name": "entity.name.type.instance.jsdoc"
987 +
            },
988 +
            "4": {
989 +
              "name": "punctuation.definition.bracket.angle.begin.jsdoc"
990 +
            },
991 +
            "5": {
992 +
              "name": "constant.other.email.link.underline.jsdoc"
993 +
            },
994 +
            "6": {
995 +
              "name": "punctuation.definition.bracket.angle.end.jsdoc"
996 +
            }
997 +
          },
998 +
          "match": "((@)author)\\s+([^*/<>@\\s](?:[^*/<>@]|\\*[^/])*)(?:\\s*(<)([^>\\s]+)(>))?"
999 +
        },
1000 +
        {
1001 +
          "captures": {
1002 +
            "1": {
1003 +
              "name": "storage.type.class.jsdoc"
1004 +
            },
1005 +
            "2": {
1006 +
              "name": "punctuation.definition.block.tag.jsdoc"
1007 +
            },
1008 +
            "3": {
1009 +
              "name": "entity.name.type.instance.jsdoc"
1010 +
            },
1011 +
            "4": {
1012 +
              "name": "keyword.operator.control.jsdoc"
1013 +
            },
1014 +
            "5": {
1015 +
              "name": "entity.name.type.instance.jsdoc"
1016 +
            }
1017 +
          },
1018 +
          "match": "((@)borrows)\\s+((?:[^*/@\\s]|\\*[^/])+)\\s+(as)\\s+((?:[^*/@\\s]|\\*[^/])+)"
1019 +
        },
1020 +
        {
1021 +
          "begin": "((@)example)\\s+",
1022 +
          "beginCaptures": {
1023 +
            "1": {
1024 +
              "name": "storage.type.class.jsdoc"
1025 +
            },
1026 +
            "2": {
1027 +
              "name": "punctuation.definition.block.tag.jsdoc"
1028 +
            }
1029 +
          },
1030 +
          "end": "(?=@|\\*/)",
1031 +
          "name": "meta.example.jsdoc",
1032 +
          "patterns": [
1033 +
            {
1034 +
              "match": "^\\s\\*\\s+"
1035 +
            },
1036 +
            {
1037 +
              "begin": "\\G(<)caption(>)",
1038 +
              "beginCaptures": {
1039 +
                "0": {
1040 +
                  "name": "entity.name.tag.inline.jsdoc"
1041 +
                },
1042 +
                "1": {
1043 +
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
1044 +
                },
1045 +
                "2": {
1046 +
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
1047 +
                }
1048 +
              },
1049 +
              "contentName": "constant.other.description.jsdoc",
1050 +
              "end": "(</)caption(>)|(?=\\*/)",
1051 +
              "endCaptures": {
1052 +
                "0": {
1053 +
                  "name": "entity.name.tag.inline.jsdoc"
1054 +
                },
1055 +
                "1": {
1056 +
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
1057 +
                },
1058 +
                "2": {
1059 +
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
1060 +
                }
1061 +
              }
1062 +
            },
1063 +
            {
1064 +
              "captures": {
1065 +
                "0": {
1066 +
                  "name": "source.embedded.ts"
1067 +
                }
1068 +
              },
1069 +
              "match": "[^*@\\s](?:[^*]|\\*[^/])*"
1070 +
            }
1071 +
          ]
1072 +
        },
1073 +
        {
1074 +
          "captures": {
1075 +
            "1": {
1076 +
              "name": "storage.type.class.jsdoc"
1077 +
            },
1078 +
            "2": {
1079 +
              "name": "punctuation.definition.block.tag.jsdoc"
1080 +
            },
1081 +
            "3": {
1082 +
              "name": "constant.language.symbol-type.jsdoc"
1083 +
            }
1084 +
          },
1085 +
          "match": "((@)kind)\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\b"
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.link.underline.jsdoc"
1097 +
            },
1098 +
            "4": {
1099 +
              "name": "entity.name.type.instance.jsdoc"
1100 +
            }
1101 +
          },
1102 +
          "match": "((@)see)\\s+(?:((?=https?://)(?:[^*\\s]|\\*[^/])+)|((?!https?://|(?:\\[[^]\\[]*])?\\{@(?:link|linkcode|linkplain|tutorial)\\b)(?:[^*/@\\s]|\\*[^/])+))"
1103 +
        },
1104 +
        {
1105 +
          "captures": {
1106 +
            "1": {
1107 +
              "name": "storage.type.class.jsdoc"
1108 +
            },
1109 +
            "2": {
1110 +
              "name": "punctuation.definition.block.tag.jsdoc"
1111 +
            },
1112 +
            "3": {
1113 +
              "name": "variable.other.jsdoc"
1114 +
            }
1115 +
          },
1116 +
          "match": "((@)template)\\s+([$A-Z_a-z][]$.\\[\\w]*(?:\\s*,\\s*[$A-Z_a-z][]$.\\[\\w]*)*)"
1117 +
        },
1118 +
        {
1119 +
          "begin": "((@)template)\\s+(?=\\{)",
1120 +
          "beginCaptures": {
1121 +
            "1": {
1122 +
              "name": "storage.type.class.jsdoc"
1123 +
            },
1124 +
            "2": {
1125 +
              "name": "punctuation.definition.block.tag.jsdoc"
1126 +
            }
1127 +
          },
1128 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1129 +
          "patterns": [
1130 +
            {
1131 +
              "include": "#jsdoctype"
1132 +
            },
1133 +
            {
1134 +
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1135 +
              "name": "variable.other.jsdoc"
1136 +
            }
1137 +
          ]
1138 +
        },
1139 +
        {
1140 +
          "captures": {
1141 +
            "1": {
1142 +
              "name": "storage.type.class.jsdoc"
1143 +
            },
1144 +
            "2": {
1145 +
              "name": "punctuation.definition.block.tag.jsdoc"
1146 +
            },
1147 +
            "3": {
1148 +
              "name": "variable.other.jsdoc"
1149 +
            }
1150 +
          },
1151 +
          "match": "((@)(?:arg|argument|const|constant|member|namespace|param|var))\\s+([$A-Z_a-z][]$.\\[\\w]*)"
1152 +
        },
1153 +
        {
1154 +
          "begin": "((@)typedef)\\s+(?=\\{)",
1155 +
          "beginCaptures": {
1156 +
            "1": {
1157 +
              "name": "storage.type.class.jsdoc"
1158 +
            },
1159 +
            "2": {
1160 +
              "name": "punctuation.definition.block.tag.jsdoc"
1161 +
            }
1162 +
          },
1163 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1164 +
          "patterns": [
1165 +
            {
1166 +
              "include": "#jsdoctype"
1167 +
            },
1168 +
            {
1169 +
              "match": "(?:[^*/@\\s]|\\*[^/])+",
1170 +
              "name": "entity.name.type.instance.jsdoc"
1171 +
            }
1172 +
          ]
1173 +
        },
1174 +
        {
1175 +
          "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?=\\{)",
1176 +
          "beginCaptures": {
1177 +
            "1": {
1178 +
              "name": "storage.type.class.jsdoc"
1179 +
            },
1180 +
            "2": {
1181 +
              "name": "punctuation.definition.block.tag.jsdoc"
1182 +
            }
1183 +
          },
1184 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1185 +
          "patterns": [
1186 +
            {
1187 +
              "include": "#jsdoctype"
1188 +
            },
1189 +
            {
1190 +
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1191 +
              "name": "variable.other.jsdoc"
1192 +
            },
1193 +
            {
1194 +
              "captures": {
1195 +
                "1": {
1196 +
                  "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
1197 +
                },
1198 +
                "2": {
1199 +
                  "name": "keyword.operator.assignment.jsdoc"
1200 +
                },
1201 +
                "3": {
1202 +
                  "name": "source.embedded.ts"
1203 +
                },
1204 +
                "4": {
1205 +
                  "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
1206 +
                },
1207 +
                "5": {
1208 +
                  "name": "invalid.illegal.syntax.jsdoc"
1209 +
                }
1210 +
              },
1211 +
              "match": "(\\[)\\s*[$\\w]+(?:(?:\\[])?\\.[$\\w]+)*(?:\\s*(=)\\s*((?>\"(?:\\*(?!/)|\\\\(?!\")|[^*\\\\])*?\"|'(?:\\*(?!/)|\\\\(?!')|[^*\\\\])*?'|\\[(?:\\*(?!/)|[^*])*?]|(?:\\*(?!/)|\\s(?!\\s*])|\\[.*?(?:]|(?=\\*/))|[^]*\\[\\s])*)*))?\\s*(?:(])((?:[^*\\s]|\\*[^/\\s])+)?|(?=\\*/))",
1212 +
              "name": "variable.other.jsdoc"
1213 +
            }
1214 +
          ]
1215 +
        },
1216 +
        {
1217 +
          "begin": "((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\s+(?=\\{)",
1218 +
          "beginCaptures": {
1219 +
            "1": {
1220 +
              "name": "storage.type.class.jsdoc"
1221 +
            },
1222 +
            "2": {
1223 +
              "name": "punctuation.definition.block.tag.jsdoc"
1224 +
            }
1225 +
          },
1226 +
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1227 +
          "patterns": [
1228 +
            {
1229 +
              "include": "#jsdoctype"
1230 +
            }
1231 +
          ]
1232 +
        },
1233 +
        {
1234 +
          "captures": {
1235 +
            "1": {
1236 +
              "name": "storage.type.class.jsdoc"
1237 +
            },
1238 +
            "2": {
1239 +
              "name": "punctuation.definition.block.tag.jsdoc"
1240 +
            },
1241 +
            "3": {
1242 +
              "name": "entity.name.type.instance.jsdoc"
1243 +
            }
1244 +
          },
1245 +
          "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]|\\*[^/])+)"
1246 +
        },
1247 +
        {
1248 +
          "begin": "((@)(?:default(?:value)?|license|version))\\s+(([\"']))",
1249 +
          "beginCaptures": {
1250 +
            "1": {
1251 +
              "name": "storage.type.class.jsdoc"
1252 +
            },
1253 +
            "2": {
1254 +
              "name": "punctuation.definition.block.tag.jsdoc"
1255 +
            },
1256 +
            "3": {
1257 +
              "name": "variable.other.jsdoc"
1258 +
            },
1259 +
            "4": {
1260 +
              "name": "punctuation.definition.string.begin.jsdoc"
1261 +
            }
1262 +
          },
1263 +
          "contentName": "variable.other.jsdoc",
1264 +
          "end": "(\\3)|(?=$|\\*/)",
1265 +
          "endCaptures": {
1266 +
            "0": {
1267 +
              "name": "variable.other.jsdoc"
1268 +
            },
1269 +
            "1": {
1270 +
              "name": "punctuation.definition.string.end.jsdoc"
1271 +
            }
1272 +
          }
1273 +
        },
1274 +
        {
1275 +
          "captures": {
1276 +
            "1": {
1277 +
              "name": "storage.type.class.jsdoc"
1278 +
            },
1279 +
            "2": {
1280 +
              "name": "punctuation.definition.block.tag.jsdoc"
1281 +
            },
1282 +
            "3": {
1283 +
              "name": "variable.other.jsdoc"
1284 +
            }
1285 +
          },
1286 +
          "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^*\\s]+)"
1287 +
        },
1288 +
        {
1289 +
          "captures": {
1290 +
            "1": {
1291 +
              "name": "punctuation.definition.block.tag.jsdoc"
1292 +
            }
1293 +
          },
1294 +
          "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",
1295 +
          "name": "storage.type.class.jsdoc"
1296 +
        },
1297 +
        {
1298 +
          "include": "#inline-tags"
1299 +
        },
1300 +
        {
1301 +
          "captures": {
1302 +
            "1": {
1303 +
              "name": "storage.type.class.jsdoc"
1304 +
            },
1305 +
            "2": {
1306 +
              "name": "punctuation.definition.block.tag.jsdoc"
1307 +
            }
1308 +
          },
1309 +
          "match": "((@)[$_[:alpha:]][$_[:alnum:]]*)(?=\\s+)"
1310 +
        }
1311 +
      ]
1312 +
    },
1313 +
    "enum-declaration": {
1314 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([$_[:alpha:]][$_[:alnum:]]*)",
1315 +
      "beginCaptures": {
1316 +
        "1": {
1317 +
          "name": "keyword.control.export.ts"
1318 +
        },
1319 +
        "2": {
1320 +
          "name": "storage.modifier.ts"
1321 +
        },
1322 +
        "3": {
1323 +
          "name": "storage.modifier.ts"
1324 +
        },
1325 +
        "4": {
1326 +
          "name": "storage.type.enum.ts"
1327 +
        },
1328 +
        "5": {
1329 +
          "name": "entity.name.type.enum.ts"
1330 +
        }
1331 +
      },
1332 +
      "end": "(?<=})",
1333 +
      "name": "meta.enum.declaration.ts",
1334 +
      "patterns": [
1335 +
        {
1336 +
          "include": "#comment"
1337 +
        },
1338 +
        {
1339 +
          "begin": "\\{",
1340 +
          "beginCaptures": {
1341 +
            "0": {
1342 +
              "name": "punctuation.definition.block.ts"
1343 +
            }
1344 +
          },
1345 +
          "end": "}",
1346 +
          "endCaptures": {
1347 +
            "0": {
1348 +
              "name": "punctuation.definition.block.ts"
1349 +
            }
1350 +
          },
1351 +
          "patterns": [
1352 +
            {
1353 +
              "include": "#comment"
1354 +
            },
1355 +
            {
1356 +
              "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
1357 +
              "beginCaptures": {
1358 +
                "0": {
1359 +
                  "name": "variable.other.enummember.ts"
1360 +
                }
1361 +
              },
1362 +
              "end": "(?=[,}]|$)",
1363 +
              "patterns": [
1364 +
                {
1365 +
                  "include": "#comment"
1366 +
                },
1367 +
                {
1368 +
                  "include": "#variable-initializer"
1369 +
                }
1370 +
              ]
1371 +
            },
1372 +
            {
1373 +
              "begin": "(?=(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+])))",
1374 +
              "end": "(?=[,}]|$)",
1375 +
              "patterns": [
1376 +
                {
1377 +
                  "include": "#string"
1378 +
                },
1379 +
                {
1380 +
                  "include": "#array-literal"
1381 +
                },
1382 +
                {
1383 +
                  "include": "#comment"
1384 +
                },
1385 +
                {
1386 +
                  "include": "#variable-initializer"
1387 +
                }
1388 +
              ]
1389 +
            },
1390 +
            {
1391 +
              "include": "#punctuation-comma"
1392 +
            }
1393 +
          ]
1394 +
        }
1395 +
      ]
1396 +
    },
1397 +
    "export-declaration": {
1398 +
      "patterns": [
1399 +
        {
1400 +
          "captures": {
1401 +
            "1": {
1402 +
              "name": "keyword.control.export.ts"
1403 +
            },
1404 +
            "2": {
1405 +
              "name": "keyword.control.as.ts"
1406 +
            },
1407 +
            "3": {
1408 +
              "name": "storage.type.namespace.ts"
1409 +
            },
1410 +
            "4": {
1411 +
              "name": "entity.name.type.module.ts"
1412 +
            }
1413 +
          },
1414 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([$_[:alpha:]][$_[:alnum:]]*)"
1415 +
        },
1416 +
        {
1417 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:\\s*(=)|\\s+(default)(?=\\s+))",
1418 +
          "beginCaptures": {
1419 +
            "1": {
1420 +
              "name": "keyword.control.export.ts"
1421 +
            },
1422 +
            "2": {
1423 +
              "name": "keyword.control.type.ts"
1424 +
            },
1425 +
            "3": {
1426 +
              "name": "keyword.operator.assignment.ts"
1427 +
            },
1428 +
            "4": {
1429 +
              "name": "keyword.control.default.ts"
1430 +
            }
1431 +
          },
1432 +
          "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)",
1433 +
          "name": "meta.export.default.ts",
1434 +
          "patterns": [
1435 +
            {
1436 +
              "include": "#interface-declaration"
1437 +
            },
1438 +
            {
1439 +
              "include": "#expression"
1440 +
            }
1441 +
          ]
1442 +
        },
1443 +
        {
1444 +
          "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)))",
1445 +
          "beginCaptures": {
1446 +
            "1": {
1447 +
              "name": "keyword.control.export.ts"
1448 +
            },
1449 +
            "2": {
1450 +
              "name": "keyword.control.type.ts"
1451 +
            }
1452 +
          },
1453 +
          "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)",
1454 +
          "name": "meta.export.ts",
1455 +
          "patterns": [
1456 +
            {
1457 +
              "include": "#import-export-declaration"
1458 +
            }
1459 +
          ]
1460 +
        }
1461 +
      ]
1462 +
    },
1463 +
    "expression": {
1464 +
      "patterns": [
1465 +
        {
1466 +
          "include": "#expressionWithoutIdentifiers"
1467 +
        },
1468 +
        {
1469 +
          "include": "#identifiers"
1470 +
        },
1471 +
        {
1472 +
          "include": "#expressionPunctuations"
1473 +
        }
1474 +
      ]
1475 +
    },
1476 +
    "expression-inside-possibly-arrow-parens": {
1477 +
      "patterns": [
1478 +
        {
1479 +
          "include": "#expressionWithoutIdentifiers"
1480 +
        },
1481 +
        {
1482 +
          "include": "#comment"
1483 +
        },
1484 +
        {
1485 +
          "include": "#string"
1486 +
        },
1487 +
        {
1488 +
          "include": "#decorator"
1489 +
        },
1490 +
        {
1491 +
          "include": "#destructuring-parameter"
1492 +
        },
1493 +
        {
1494 +
          "captures": {
1495 +
            "1": {
1496 +
              "name": "storage.modifier.ts"
1497 +
            }
1498 +
          },
1499 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
1500 +
        },
1501 +
        {
1502 +
          "captures": {
1503 +
            "1": {
1504 +
              "name": "storage.modifier.ts"
1505 +
            },
1506 +
            "2": {
1507 +
              "name": "keyword.operator.rest.ts"
1508 +
            },
1509 +
            "3": {
1510 +
              "name": "entity.name.function.ts variable.language.this.ts"
1511 +
            },
1512 +
            "4": {
1513 +
              "name": "entity.name.function.ts"
1514 +
            },
1515 +
            "5": {
1516 +
              "name": "keyword.operator.optional.ts"
1517 +
            }
1518 +
          },
1519 +
          "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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1520 +
        },
1521 +
        {
1522 +
          "captures": {
1523 +
            "1": {
1524 +
              "name": "storage.modifier.ts"
1525 +
            },
1526 +
            "2": {
1527 +
              "name": "keyword.operator.rest.ts"
1528 +
            },
1529 +
            "3": {
1530 +
              "name": "variable.parameter.ts variable.language.this.ts"
1531 +
            },
1532 +
            "4": {
1533 +
              "name": "variable.parameter.ts"
1534 +
            },
1535 +
            "5": {
1536 +
              "name": "keyword.operator.optional.ts"
1537 +
            }
1538 +
          },
1539 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[,:]|$)"
1540 +
        },
1541 +
        {
1542 +
          "include": "#type-annotation"
1543 +
        },
1544 +
        {
1545 +
          "include": "#variable-initializer"
1546 +
        },
1547 +
        {
1548 +
          "match": ",",
1549 +
          "name": "punctuation.separator.parameter.ts"
1550 +
        },
1551 +
        {
1552 +
          "include": "#identifiers"
1553 +
        },
1554 +
        {
1555 +
          "include": "#expressionPunctuations"
1556 +
        }
1557 +
      ]
1558 +
    },
1559 +
    "expression-operators": {
1560 +
      "patterns": [
1561 +
        {
1562 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1563 +
          "name": "keyword.control.flow.ts"
1564 +
        },
1565 +
        {
1566 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*\\*)",
1567 +
          "beginCaptures": {
1568 +
            "1": {
1569 +
              "name": "keyword.control.flow.ts"
1570 +
            }
1571 +
          },
1572 +
          "end": "\\*",
1573 +
          "endCaptures": {
1574 +
            "0": {
1575 +
              "name": "keyword.generator.asterisk.ts"
1576 +
            }
1577 +
          },
1578 +
          "patterns": [
1579 +
            {
1580 +
              "include": "#comment"
1581 +
            }
1582 +
          ]
1583 +
        },
1584 +
        {
1585 +
          "captures": {
1586 +
            "1": {
1587 +
              "name": "keyword.control.flow.ts"
1588 +
            },
1589 +
            "2": {
1590 +
              "name": "keyword.generator.asterisk.ts"
1591 +
            }
1592 +
          },
1593 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?"
1594 +
        },
1595 +
        {
1596 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1597 +
          "name": "keyword.operator.expression.delete.ts"
1598 +
        },
1599 +
        {
1600 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1601 +
          "name": "keyword.operator.expression.in.ts"
1602 +
        },
1603 +
        {
1604 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1605 +
          "name": "keyword.operator.expression.of.ts"
1606 +
        },
1607 +
        {
1608 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1609 +
          "name": "keyword.operator.expression.instanceof.ts"
1610 +
        },
1611 +
        {
1612 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1613 +
          "name": "keyword.operator.new.ts"
1614 +
        },
1615 +
        {
1616 +
          "include": "#typeof-operator"
1617 +
        },
1618 +
        {
1619 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1620 +
          "name": "keyword.operator.expression.void.ts"
1621 +
        },
1622 +
        {
1623 +
          "captures": {
1624 +
            "1": {
1625 +
              "name": "keyword.control.as.ts"
1626 +
            },
1627 +
            "2": {
1628 +
              "name": "storage.modifier.ts"
1629 +
            }
1630 +
          },
1631 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[]),:;}]))"
1632 +
        },
1633 +
        {
1634 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
1635 +
          "beginCaptures": {
1636 +
            "1": {
1637 +
              "name": "keyword.control.as.ts"
1638 +
            },
1639 +
            "2": {
1640 +
              "name": "keyword.control.satisfies.ts"
1641 +
            }
1642 +
          },
1643 +
          "end": "(?=^|[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+<))",
1644 +
          "patterns": [
1645 +
            {
1646 +
              "include": "#type"
1647 +
            }
1648 +
          ]
1649 +
        },
1650 +
        {
1651 +
          "match": "\\.\\.\\.",
1652 +
          "name": "keyword.operator.spread.ts"
1653 +
        },
1654 +
        {
1655 +
          "match": "(?:\\*|(?<!\\()/|[-%+])=",
1656 +
          "name": "keyword.operator.assignment.compound.ts"
1657 +
        },
1658 +
        {
1659 +
          "match": "(?:[\\&^]|<<|>>>??|\\|)=",
1660 +
          "name": "keyword.operator.assignment.compound.bitwise.ts"
1661 +
        },
1662 +
        {
1663 +
          "match": "<<|>>>?",
1664 +
          "name": "keyword.operator.bitwise.shift.ts"
1665 +
        },
1666 +
        {
1667 +
          "match": "[!=]==?",
1668 +
          "name": "keyword.operator.comparison.ts"
1669 +
        },
1670 +
        {
1671 +
          "match": "<=|>=|<>|[<>]",
1672 +
          "name": "keyword.operator.relational.ts"
1673 +
        },
1674 +
        {
1675 +
          "captures": {
1676 +
            "1": {
1677 +
              "name": "keyword.operator.logical.ts"
1678 +
            },
1679 +
            "2": {
1680 +
              "name": "keyword.operator.assignment.compound.ts"
1681 +
            },
1682 +
            "3": {
1683 +
              "name": "keyword.operator.arithmetic.ts"
1684 +
            }
1685 +
          },
1686 +
          "match": "(?<=[$_[:alnum:]])(!)\\s*(?:(/=)|(/)(?![*/]))"
1687 +
        },
1688 +
        {
1689 +
          "match": "!|&&|\\|\\||\\?\\?",
1690 +
          "name": "keyword.operator.logical.ts"
1691 +
        },
1692 +
        {
1693 +
          "match": "[\\&^|~]",
1694 +
          "name": "keyword.operator.bitwise.ts"
1695 +
        },
1696 +
        {
1697 +
          "match": "=",
1698 +
          "name": "keyword.operator.assignment.ts"
1699 +
        },
1700 +
        {
1701 +
          "match": "--",
1702 +
          "name": "keyword.operator.decrement.ts"
1703 +
        },
1704 +
        {
1705 +
          "match": "\\+\\+",
1706 +
          "name": "keyword.operator.increment.ts"
1707 +
        },
1708 +
        {
1709 +
          "match": "[-%*+/]",
1710 +
          "name": "keyword.operator.arithmetic.ts"
1711 +
        },
1712 +
        {
1713 +
          "begin": "(?<=[]$)_[:alnum:]])\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)+(?:(/=)|(/)(?![*/])))",
1714 +
          "end": "(/=)|(/)(?!\\*([^*]|(\\*[^/]))*\\*/)",
1715 +
          "endCaptures": {
1716 +
            "1": {
1717 +
              "name": "keyword.operator.assignment.compound.ts"
1718 +
            },
1719 +
            "2": {
1720 +
              "name": "keyword.operator.arithmetic.ts"
1721 +
            }
1722 +
          },
1723 +
          "patterns": [
1724 +
            {
1725 +
              "include": "#comment"
1726 +
            }
1727 +
          ]
1728 +
        },
1729 +
        {
1730 +
          "captures": {
1731 +
            "1": {
1732 +
              "name": "keyword.operator.assignment.compound.ts"
1733 +
            },
1734 +
            "2": {
1735 +
              "name": "keyword.operator.arithmetic.ts"
1736 +
            }
1737 +
          },
1738 +
          "match": "(?<=[]$)_[:alnum:]])\\s*(?:(/=)|(/)(?![*/]))"
1739 +
        }
1740 +
      ]
1741 +
    },
1742 +
    "expressionPunctuations": {
1743 +
      "patterns": [
1744 +
        {
1745 +
          "include": "#punctuation-comma"
1746 +
        },
1747 +
        {
1748 +
          "include": "#punctuation-accessor"
1749 +
        }
1750 +
      ]
1751 +
    },
1752 +
    "expressionWithoutIdentifiers": {
1753 +
      "patterns": [
1754 +
        {
1755 +
          "include": "#string"
1756 +
        },
1757 +
        {
1758 +
          "include": "#regex"
1759 +
        },
1760 +
        {
1761 +
          "include": "#comment"
1762 +
        },
1763 +
        {
1764 +
          "include": "#function-expression"
1765 +
        },
1766 +
        {
1767 +
          "include": "#class-expression"
1768 +
        },
1769 +
        {
1770 +
          "include": "#arrow-function"
1771 +
        },
1772 +
        {
1773 +
          "include": "#paren-expression-possibly-arrow"
1774 +
        },
1775 +
        {
1776 +
          "include": "#cast"
1777 +
        },
1778 +
        {
1779 +
          "include": "#ternary-expression"
1780 +
        },
1781 +
        {
1782 +
          "include": "#new-expr"
1783 +
        },
1784 +
        {
1785 +
          "include": "#instanceof-expr"
1786 +
        },
1787 +
        {
1788 +
          "include": "#object-literal"
1789 +
        },
1790 +
        {
1791 +
          "include": "#expression-operators"
1792 +
        },
1793 +
        {
1794 +
          "include": "#function-call"
1795 +
        },
1796 +
        {
1797 +
          "include": "#literal"
1798 +
        },
1799 +
        {
1800 +
          "include": "#support-objects"
1801 +
        },
1802 +
        {
1803 +
          "include": "#paren-expression"
1804 +
        }
1805 +
      ]
1806 +
    },
1807 +
    "field-declaration": {
1808 +
      "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*)?([,:;=}]|$))",
1809 +
      "beginCaptures": {
1810 +
        "1": {
1811 +
          "name": "storage.modifier.ts"
1812 +
        }
1813 +
      },
1814 +
      "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*)?([,:;=]|$))))|(?<=})",
1815 +
      "name": "meta.field.declaration.ts",
1816 +
      "patterns": [
1817 +
        {
1818 +
          "include": "#variable-initializer"
1819 +
        },
1820 +
        {
1821 +
          "include": "#type-annotation"
1822 +
        },
1823 +
        {
1824 +
          "include": "#string"
1825 +
        },
1826 +
        {
1827 +
          "include": "#array-literal"
1828 +
        },
1829 +
        {
1830 +
          "include": "#numeric-literal"
1831 +
        },
1832 +
        {
1833 +
          "include": "#comment"
1834 +
        },
1835 +
        {
1836 +
          "captures": {
1837 +
            "1": {
1838 +
              "name": "meta.definition.property.ts entity.name.function.ts"
1839 +
            },
1840 +
            "2": {
1841 +
              "name": "keyword.operator.optional.ts"
1842 +
            },
1843 +
            "3": {
1844 +
              "name": "keyword.operator.definiteassignment.ts"
1845 +
            }
1846 +
          },
1847 +
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)(?:(\\?)|(!))?(?=\\s*\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1848 +
        },
1849 +
        {
1850 +
          "match": "#?[$_[:alpha:]][$_[:alnum:]]*",
1851 +
          "name": "meta.definition.property.ts variable.object.property.ts"
1852 +
        },
1853 +
        {
1854 +
          "match": "\\?",
1855 +
          "name": "keyword.operator.optional.ts"
1856 +
        },
1857 +
        {
1858 +
          "match": "!",
1859 +
          "name": "keyword.operator.definiteassignment.ts"
1860 +
        }
1861 +
      ]
1862 +
    },
1863 +
    "for-loop": {
1864 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*))await)?\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)?(\\())",
1865 +
      "beginCaptures": {
1866 +
        "0": {
1867 +
          "name": "keyword.control.loop.ts"
1868 +
        }
1869 +
      },
1870 +
      "end": "(?<=\\))",
1871 +
      "patterns": [
1872 +
        {
1873 +
          "include": "#comment"
1874 +
        },
1875 +
        {
1876 +
          "match": "await",
1877 +
          "name": "keyword.control.loop.ts"
1878 +
        },
1879 +
        {
1880 +
          "begin": "\\(",
1881 +
          "beginCaptures": {
1882 +
            "0": {
1883 +
              "name": "meta.brace.round.ts"
1884 +
            }
1885 +
          },
1886 +
          "end": "\\)",
1887 +
          "endCaptures": {
1888 +
            "0": {
1889 +
              "name": "meta.brace.round.ts"
1890 +
            }
1891 +
          },
1892 +
          "patterns": [
1893 +
            {
1894 +
              "include": "#var-expr"
1895 +
            },
1896 +
            {
1897 +
              "include": "#expression"
1898 +
            },
1899 +
            {
1900 +
              "include": "#punctuation-semicolon"
1901 +
            }
1902 +
          ]
1903 +
        }
1904 +
      ]
1905 +
    },
1906 +
    "function-body": {
1907 +
      "patterns": [
1908 +
        {
1909 +
          "include": "#comment"
1910 +
        },
1911 +
        {
1912 +
          "include": "#type-parameters"
1913 +
        },
1914 +
        {
1915 +
          "include": "#function-parameters"
1916 +
        },
1917 +
        {
1918 +
          "include": "#return-type"
1919 +
        },
1920 +
        {
1921 +
          "include": "#type-function-return-type"
1922 +
        },
1923 +
        {
1924 +
          "include": "#decl-block"
1925 +
        },
1926 +
        {
1927 +
          "match": "\\*",
1928 +
          "name": "keyword.generator.asterisk.ts"
1929 +
        }
1930 +
      ]
1931 +
    },
1932 +
    "function-call": {
1933 +
      "patterns": [
1934 +
        {
1935 +
          "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*)?\\())",
1936 +
          "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*)?\\())",
1937 +
          "patterns": [
1938 +
            {
1939 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1940 +
              "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*)?\\())",
1941 +
              "name": "meta.function-call.ts",
1942 +
              "patterns": [
1943 +
                {
1944 +
                  "include": "#function-call-target"
1945 +
                }
1946 +
              ]
1947 +
            },
1948 +
            {
1949 +
              "include": "#comment"
1950 +
            },
1951 +
            {
1952 +
              "include": "#function-call-optionals"
1953 +
            },
1954 +
            {
1955 +
              "include": "#type-arguments"
1956 +
            },
1957 +
            {
1958 +
              "include": "#paren-expression"
1959 +
            }
1960 +
          ]
1961 +
        },
1962 +
        {
1963 +
          "begin": "(?=(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1964 +
          "end": "(?<=>)(?!(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1965 +
          "patterns": [
1966 +
            {
1967 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1968 +
              "end": "(?=(<\\s*[(\\[{]\\s*)$)",
1969 +
              "name": "meta.function-call.ts",
1970 +
              "patterns": [
1971 +
                {
1972 +
                  "include": "#function-call-target"
1973 +
                }
1974 +
              ]
1975 +
            },
1976 +
            {
1977 +
              "include": "#comment"
1978 +
            },
1979 +
            {
1980 +
              "include": "#function-call-optionals"
1981 +
            },
1982 +
            {
1983 +
              "include": "#type-arguments"
1984 +
            }
1985 +
          ]
1986 +
        }
1987 +
      ]
1988 +
    },
1989 +
    "function-call-optionals": {
1990 +
      "patterns": [
1991 +
        {
1992 +
          "match": "\\?\\.",
1993 +
          "name": "meta.function-call.ts punctuation.accessor.optional.ts"
1994 +
        },
1995 +
        {
1996 +
          "match": "!",
1997 +
          "name": "meta.function-call.ts keyword.operator.definiteassignment.ts"
1998 +
        }
1999 +
      ]
2000 +
    },
2001 +
    "function-call-target": {
2002 +
      "patterns": [
2003 +
        {
2004 +
          "include": "#support-function-call-identifiers"
2005 +
        },
2006 +
        {
2007 +
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)",
2008 +
          "name": "entity.name.function.ts"
2009 +
        }
2010 +
      ]
2011 +
    },
2012 +
    "function-declaration": {
2013 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
2014 +
      "beginCaptures": {
2015 +
        "1": {
2016 +
          "name": "keyword.control.export.ts"
2017 +
        },
2018 +
        "2": {
2019 +
          "name": "storage.modifier.ts"
2020 +
        },
2021 +
        "3": {
2022 +
          "name": "storage.modifier.async.ts"
2023 +
        },
2024 +
        "4": {
2025 +
          "name": "storage.type.function.ts"
2026 +
        },
2027 +
        "5": {
2028 +
          "name": "keyword.generator.asterisk.ts"
2029 +
        },
2030 +
        "6": {
2031 +
          "name": "meta.definition.function.ts entity.name.function.ts"
2032 +
        }
2033 +
      },
2034 +
      "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)|(?<=})",
2035 +
      "name": "meta.function.ts",
2036 +
      "patterns": [
2037 +
        {
2038 +
          "include": "#function-name"
2039 +
        },
2040 +
        {
2041 +
          "include": "#function-body"
2042 +
        }
2043 +
      ]
2044 +
    },
2045 +
    "function-expression": {
2046 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
2047 +
      "beginCaptures": {
2048 +
        "1": {
2049 +
          "name": "storage.modifier.async.ts"
2050 +
        },
2051 +
        "2": {
2052 +
          "name": "storage.type.function.ts"
2053 +
        },
2054 +
        "3": {
2055 +
          "name": "keyword.generator.asterisk.ts"
2056 +
        },
2057 +
        "4": {
2058 +
          "name": "meta.definition.function.ts entity.name.function.ts"
2059 +
        }
2060 +
      },
2061 +
      "end": "(?=;)|(?<=})",
2062 +
      "name": "meta.function.expression.ts",
2063 +
      "patterns": [
2064 +
        {
2065 +
          "include": "#function-name"
2066 +
        },
2067 +
        {
2068 +
          "include": "#single-line-comment-consuming-line-ending"
2069 +
        },
2070 +
        {
2071 +
          "include": "#function-body"
2072 +
        }
2073 +
      ]
2074 +
    },
2075 +
    "function-name": {
2076 +
      "match": "[$_[:alpha:]][$_[:alnum:]]*",
2077 +
      "name": "meta.definition.function.ts entity.name.function.ts"
2078 +
    },
2079 +
    "function-parameters": {
2080 +
      "begin": "\\(",
2081 +
      "beginCaptures": {
2082 +
        "0": {
2083 +
          "name": "punctuation.definition.parameters.begin.ts"
2084 +
        }
2085 +
      },
2086 +
      "end": "\\)",
2087 +
      "endCaptures": {
2088 +
        "0": {
2089 +
          "name": "punctuation.definition.parameters.end.ts"
2090 +
        }
2091 +
      },
2092 +
      "name": "meta.parameters.ts",
2093 +
      "patterns": [
2094 +
        {
2095 +
          "include": "#function-parameters-body"
2096 +
        }
2097 +
      ]
2098 +
    },
2099 +
    "function-parameters-body": {
2100 +
      "patterns": [
2101 +
        {
2102 +
          "include": "#comment"
2103 +
        },
2104 +
        {
2105 +
          "include": "#string"
2106 +
        },
2107 +
        {
2108 +
          "include": "#decorator"
2109 +
        },
2110 +
        {
2111 +
          "include": "#destructuring-parameter"
2112 +
        },
2113 +
        {
2114 +
          "include": "#parameter-name"
2115 +
        },
2116 +
        {
2117 +
          "include": "#parameter-type-annotation"
2118 +
        },
2119 +
        {
2120 +
          "include": "#variable-initializer"
2121 +
        },
2122 +
        {
2123 +
          "match": ",",
2124 +
          "name": "punctuation.separator.parameter.ts"
2125 +
        }
2126 +
      ]
2127 +
    },
2128 +
    "identifiers": {
2129 +
      "patterns": [
2130 +
        {
2131 +
          "include": "#object-identifiers"
2132 +
        },
2133 +
        {
2134 +
          "captures": {
2135 +
            "1": {
2136 +
              "name": "punctuation.accessor.ts"
2137 +
            },
2138 +
            "2": {
2139 +
              "name": "punctuation.accessor.optional.ts"
2140 +
            },
2141 +
            "3": {
2142 +
              "name": "entity.name.function.ts"
2143 +
            }
2144 +
          },
2145 +
          "match": "(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))"
2146 +
        },
2147 +
        {
2148 +
          "captures": {
2149 +
            "1": {
2150 +
              "name": "punctuation.accessor.ts"
2151 +
            },
2152 +
            "2": {
2153 +
              "name": "punctuation.accessor.optional.ts"
2154 +
            },
2155 +
            "3": {
2156 +
              "name": "variable.other.constant.property.ts"
2157 +
            }
2158 +
          },
2159 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])"
2160 +
        },
2161 +
        {
2162 +
          "captures": {
2163 +
            "1": {
2164 +
              "name": "punctuation.accessor.ts"
2165 +
            },
2166 +
            "2": {
2167 +
              "name": "punctuation.accessor.optional.ts"
2168 +
            },
2169 +
            "3": {
2170 +
              "name": "variable.other.property.ts"
2171 +
            }
2172 +
          },
2173 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?[$_[:alpha:]][$_[:alnum:]]*)"
2174 +
        },
2175 +
        {
2176 +
          "match": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])",
2177 +
          "name": "variable.other.constant.ts"
2178 +
        },
2179 +
        {
2180 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
2181 +
          "name": "variable.other.readwrite.ts"
2182 +
        }
2183 +
      ]
2184 +
    },
2185 +
    "if-statement": {
2186 +
      "patterns": [
2187 +
        {
2188 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))\\s*(?!\\{))",
2189 +
          "end": "(?=;|$|})",
2190 +
          "patterns": [
2191 +
            {
2192 +
              "include": "#comment"
2193 +
            },
2194 +
            {
2195 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2196 +
              "beginCaptures": {
2197 +
                "1": {
2198 +
                  "name": "keyword.control.conditional.ts"
2199 +
                },
2200 +
                "2": {
2201 +
                  "name": "meta.brace.round.ts"
2202 +
                }
2203 +
              },
2204 +
              "end": "\\)",
2205 +
              "endCaptures": {
2206 +
                "0": {
2207 +
                  "name": "meta.brace.round.ts"
2208 +
                }
2209 +
              },
2210 +
              "patterns": [
2211 +
                {
2212 +
                  "include": "#expression"
2213 +
                }
2214 +
              ]
2215 +
            },
2216 +
            {
2217 +
              "begin": "(?<=\\))\\s*/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
2218 +
              "beginCaptures": {
2219 +
                "0": {
2220 +
                  "name": "punctuation.definition.string.begin.ts"
2221 +
                }
2222 +
              },
2223 +
              "end": "(/)([dgimsuvy]*)",
2224 +
              "endCaptures": {
2225 +
                "1": {
2226 +
                  "name": "punctuation.definition.string.end.ts"
2227 +
                },
2228 +
                "2": {
2229 +
                  "name": "keyword.other.ts"
2230 +
                }
2231 +
              },
2232 +
              "name": "string.regexp.ts",
2233 +
              "patterns": [
2234 +
                {
2235 +
                  "include": "#regexp"
2236 +
                }
2237 +
              ]
2238 +
            },
2239 +
            {
2240 +
              "include": "#statements"
2241 +
            }
2242 +
          ]
2243 +
        }
2244 +
      ]
2245 +
    },
2246 +
    "import-declaration": {
2247 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[(:])(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2248 +
      "beginCaptures": {
2249 +
        "1": {
2250 +
          "name": "keyword.control.export.ts"
2251 +
        },
2252 +
        "2": {
2253 +
          "name": "storage.modifier.ts"
2254 +
        },
2255 +
        "3": {
2256 +
          "name": "keyword.control.import.ts"
2257 +
        },
2258 +
        "4": {
2259 +
          "name": "keyword.control.type.ts"
2260 +
        }
2261 +
      },
2262 +
      "end": "(?<!(?:^|[^$._[:alnum:]])import)(?=;|$|^)",
2263 +
      "name": "meta.import.ts",
2264 +
      "patterns": [
2265 +
        {
2266 +
          "include": "#single-line-comment-consuming-line-ending"
2267 +
        },
2268 +
        {
2269 +
          "include": "#comment"
2270 +
        },
2271 +
        {
2272 +
          "include": "#string"
2273 +
        },
2274 +
        {
2275 +
          "begin": "(?<=(?:^|[^$._[:alnum:]])import)(?!\\s*[\"'])",
2276 +
          "end": "\\bfrom\\b",
2277 +
          "endCaptures": {
2278 +
            "0": {
2279 +
              "name": "keyword.control.from.ts"
2280 +
            }
2281 +
          },
2282 +
          "patterns": [
2283 +
            {
2284 +
              "include": "#import-export-declaration"
2285 +
            }
2286 +
          ]
2287 +
        },
2288 +
        {
2289 +
          "include": "#import-export-declaration"
2290 +
        }
2291 +
      ]
2292 +
    },
2293 +
    "import-equals-declaration": {
2294 +
      "patterns": [
2295 +
        {
2296 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2297 +
          "beginCaptures": {
2298 +
            "1": {
2299 +
              "name": "keyword.control.export.ts"
2300 +
            },
2301 +
            "2": {
2302 +
              "name": "storage.modifier.ts"
2303 +
            },
2304 +
            "3": {
2305 +
              "name": "keyword.control.import.ts"
2306 +
            },
2307 +
            "4": {
2308 +
              "name": "keyword.control.type.ts"
2309 +
            },
2310 +
            "5": {
2311 +
              "name": "variable.other.readwrite.alias.ts"
2312 +
            },
2313 +
            "6": {
2314 +
              "name": "keyword.operator.assignment.ts"
2315 +
            },
2316 +
            "7": {
2317 +
              "name": "keyword.control.require.ts"
2318 +
            },
2319 +
            "8": {
2320 +
              "name": "meta.brace.round.ts"
2321 +
            }
2322 +
          },
2323 +
          "end": "\\)",
2324 +
          "endCaptures": {
2325 +
            "0": {
2326 +
              "name": "meta.brace.round.ts"
2327 +
            }
2328 +
          },
2329 +
          "name": "meta.import-equals.external.ts",
2330 +
          "patterns": [
2331 +
            {
2332 +
              "include": "#comment"
2333 +
            },
2334 +
            {
2335 +
              "include": "#string"
2336 +
            }
2337 +
          ]
2338 +
        },
2339 +
        {
2340 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2341 +
          "beginCaptures": {
2342 +
            "1": {
2343 +
              "name": "keyword.control.export.ts"
2344 +
            },
2345 +
            "2": {
2346 +
              "name": "storage.modifier.ts"
2347 +
            },
2348 +
            "3": {
2349 +
              "name": "keyword.control.import.ts"
2350 +
            },
2351 +
            "4": {
2352 +
              "name": "keyword.control.type.ts"
2353 +
            },
2354 +
            "5": {
2355 +
              "name": "variable.other.readwrite.alias.ts"
2356 +
            },
2357 +
            "6": {
2358 +
              "name": "keyword.operator.assignment.ts"
2359 +
            }
2360 +
          },
2361 +
          "end": "(?=;|$|^)",
2362 +
          "name": "meta.import-equals.internal.ts",
2363 +
          "patterns": [
2364 +
            {
2365 +
              "include": "#single-line-comment-consuming-line-ending"
2366 +
            },
2367 +
            {
2368 +
              "include": "#comment"
2369 +
            },
2370 +
            {
2371 +
              "captures": {
2372 +
                "1": {
2373 +
                  "name": "entity.name.type.module.ts"
2374 +
                },
2375 +
                "2": {
2376 +
                  "name": "punctuation.accessor.ts"
2377 +
                },
2378 +
                "3": {
2379 +
                  "name": "punctuation.accessor.optional.ts"
2380 +
                }
2381 +
              },
2382 +
              "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
2383 +
            },
2384 +
            {
2385 +
              "match": "([$_[:alpha:]][$_[:alnum:]]*)",
2386 +
              "name": "variable.other.readwrite.ts"
2387 +
            }
2388 +
          ]
2389 +
        }
2390 +
      ]
2391 +
    },
2392 +
    "import-export-assert-clause": {
2393 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(with)|(assert))\\s*(\\{)",
2394 +
      "beginCaptures": {
2395 +
        "1": {
2396 +
          "name": "keyword.control.with.ts"
2397 +
        },
2398 +
        "2": {
2399 +
          "name": "keyword.control.assert.ts"
2400 +
        },
2401 +
        "3": {
2402 +
          "name": "punctuation.definition.block.ts"
2403 +
        }
2404 +
      },
2405 +
      "end": "}",
2406 +
      "endCaptures": {
2407 +
        "0": {
2408 +
          "name": "punctuation.definition.block.ts"
2409 +
        }
2410 +
      },
2411 +
      "patterns": [
2412 +
        {
2413 +
          "include": "#comment"
2414 +
        },
2415 +
        {
2416 +
          "include": "#string"
2417 +
        },
2418 +
        {
2419 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
2420 +
          "name": "meta.object-literal.key.ts"
2421 +
        },
2422 +
        {
2423 +
          "match": ":",
2424 +
          "name": "punctuation.separator.key-value.ts"
2425 +
        }
2426 +
      ]
2427 +
    },
2428 +
    "import-export-block": {
2429 +
      "begin": "\\{",
2430 +
      "beginCaptures": {
2431 +
        "0": {
2432 +
          "name": "punctuation.definition.block.ts"
2433 +
        }
2434 +
      },
2435 +
      "end": "}",
2436 +
      "endCaptures": {
2437 +
        "0": {
2438 +
          "name": "punctuation.definition.block.ts"
2439 +
        }
2440 +
      },
2441 +
      "name": "meta.block.ts",
2442 +
      "patterns": [
2443 +
        {
2444 +
          "include": "#import-export-clause"
2445 +
        }
2446 +
      ]
2447 +
    },
2448 +
    "import-export-clause": {
2449 +
      "patterns": [
2450 +
        {
2451 +
          "include": "#comment"
2452 +
        },
2453 +
        {
2454 +
          "captures": {
2455 +
            "1": {
2456 +
              "name": "keyword.control.type.ts"
2457 +
            },
2458 +
            "12": {
2459 +
              "name": "keyword.control.as.ts"
2460 +
            },
2461 +
            "13": {
2462 +
              "name": "keyword.control.default.ts"
2463 +
            },
2464 +
            "14": {
2465 +
              "name": "variable.other.readwrite.alias.ts"
2466 +
            },
2467 +
            "15": {
2468 +
              "name": "string.quoted.alias.ts"
2469 +
            },
2470 +
            "2": {
2471 +
              "name": "keyword.control.default.ts"
2472 +
            },
2473 +
            "3": {
2474 +
              "name": "constant.language.import-export-all.ts"
2475 +
            },
2476 +
            "4": {
2477 +
              "name": "variable.other.readwrite.ts"
2478 +
            },
2479 +
            "5": {
2480 +
              "name": "string.quoted.alias.ts"
2481 +
            }
2482 +
          },
2483 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(type)\\s+)?(?:\\b(default)|(\\*)|\\b([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))\\s+(as)\\s+(?:(default(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2484 +
        },
2485 +
        {
2486 +
          "include": "#punctuation-comma"
2487 +
        },
2488 +
        {
2489 +
          "match": "\\*",
2490 +
          "name": "constant.language.import-export-all.ts"
2491 +
        },
2492 +
        {
2493 +
          "match": "\\b(default)\\b",
2494 +
          "name": "keyword.control.default.ts"
2495 +
        },
2496 +
        {
2497 +
          "captures": {
2498 +
            "1": {
2499 +
              "name": "keyword.control.type.ts"
2500 +
            },
2501 +
            "2": {
2502 +
              "name": "variable.other.readwrite.alias.ts"
2503 +
            },
2504 +
            "3": {
2505 +
              "name": "string.quoted.alias.ts"
2506 +
            }
2507 +
          },
2508 +
          "match": "(?:\\b(type)\\s+)?(?:([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2509 +
        }
2510 +
      ]
2511 +
    },
2512 +
    "import-export-declaration": {
2513 +
      "patterns": [
2514 +
        {
2515 +
          "include": "#comment"
2516 +
        },
2517 +
        {
2518 +
          "include": "#string"
2519 +
        },
2520 +
        {
2521 +
          "include": "#import-export-block"
2522 +
        },
2523 +
        {
2524 +
          "match": "\\bfrom\\b",
2525 +
          "name": "keyword.control.from.ts"
2526 +
        },
2527 +
        {
2528 +
          "include": "#import-export-assert-clause"
2529 +
        },
2530 +
        {
2531 +
          "include": "#import-export-clause"
2532 +
        }
2533 +
      ]
2534 +
    },
2535 +
    "indexer-declaration": {
2536 +
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=:)",
2537 +
      "beginCaptures": {
2538 +
        "1": {
2539 +
          "name": "storage.modifier.ts"
2540 +
        },
2541 +
        "2": {
2542 +
          "name": "meta.brace.square.ts"
2543 +
        },
2544 +
        "3": {
2545 +
          "name": "variable.parameter.ts"
2546 +
        }
2547 +
      },
2548 +
      "end": "(])\\s*(\\?\\s*)?|$",
2549 +
      "endCaptures": {
2550 +
        "1": {
2551 +
          "name": "meta.brace.square.ts"
2552 +
        },
2553 +
        "2": {
2554 +
          "name": "keyword.operator.optional.ts"
2555 +
        }
2556 +
      },
2557 +
      "name": "meta.indexer.declaration.ts",
2558 +
      "patterns": [
2559 +
        {
2560 +
          "include": "#type-annotation"
2561 +
        }
2562 +
      ]
2563 +
    },
2564 +
    "indexer-mapped-type-declaration": {
2565 +
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([-+])?(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s+(in)\\s+",
2566 +
      "beginCaptures": {
2567 +
        "1": {
2568 +
          "name": "keyword.operator.type.modifier.ts"
2569 +
        },
2570 +
        "2": {
2571 +
          "name": "storage.modifier.ts"
2572 +
        },
2573 +
        "3": {
2574 +
          "name": "meta.brace.square.ts"
2575 +
        },
2576 +
        "4": {
2577 +
          "name": "entity.name.type.ts"
2578 +
        },
2579 +
        "5": {
2580 +
          "name": "keyword.operator.expression.in.ts"
2581 +
        }
2582 +
      },
2583 +
      "end": "(])([-+])?\\s*(\\?\\s*)?|$",
2584 +
      "endCaptures": {
2585 +
        "1": {
2586 +
          "name": "meta.brace.square.ts"
2587 +
        },
2588 +
        "2": {
2589 +
          "name": "keyword.operator.type.modifier.ts"
2590 +
        },
2591 +
        "3": {
2592 +
          "name": "keyword.operator.optional.ts"
2593 +
        }
2594 +
      },
2595 +
      "name": "meta.indexer.mappedtype.declaration.ts",
2596 +
      "patterns": [
2597 +
        {
2598 +
          "captures": {
2599 +
            "1": {
2600 +
              "name": "keyword.control.as.ts"
2601 +
            }
2602 +
          },
2603 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+"
2604 +
        },
2605 +
        {
2606 +
          "include": "#type"
2607 +
        }
2608 +
      ]
2609 +
    },
2610 +
    "inline-tags": {
2611 +
      "patterns": [
2612 +
        {
2613 +
          "captures": {
2614 +
            "1": {
2615 +
              "name": "punctuation.definition.bracket.square.begin.jsdoc"
2616 +
            },
2617 +
            "2": {
2618 +
              "name": "punctuation.definition.bracket.square.end.jsdoc"
2619 +
            }
2620 +
          },
2621 +
          "match": "(\\[)[^]]+(])(?=\\{@(?:link|linkcode|linkplain|tutorial))",
2622 +
          "name": "constant.other.description.jsdoc"
2623 +
        },
2624 +
        {
2625 +
          "begin": "(\\{)((@)(?:link(?:code|plain)?|tutorial))\\s*",
2626 +
          "beginCaptures": {
2627 +
            "1": {
2628 +
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2629 +
            },
2630 +
            "2": {
2631 +
              "name": "storage.type.class.jsdoc"
2632 +
            },
2633 +
            "3": {
2634 +
              "name": "punctuation.definition.inline.tag.jsdoc"
2635 +
            }
2636 +
          },
2637 +
          "end": "}|(?=\\*/)",
2638 +
          "endCaptures": {
2639 +
            "0": {
2640 +
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2641 +
            }
2642 +
          },
2643 +
          "name": "entity.name.type.instance.jsdoc",
2644 +
          "patterns": [
2645 +
            {
2646 +
              "captures": {
2647 +
                "1": {
2648 +
                  "name": "variable.other.link.underline.jsdoc"
2649 +
                },
2650 +
                "2": {
2651 +
                  "name": "punctuation.separator.pipe.jsdoc"
2652 +
                }
2653 +
              },
2654 +
              "match": "\\G((?=https?://)(?:[^*|}\\s]|\\*/)+)(\\|)?"
2655 +
            },
2656 +
            {
2657 +
              "captures": {
2658 +
                "1": {
2659 +
                  "name": "variable.other.description.jsdoc"
2660 +
                },
2661 +
                "2": {
2662 +
                  "name": "punctuation.separator.pipe.jsdoc"
2663 +
                }
2664 +
              },
2665 +
              "match": "\\G((?:[^*@{|}\\s]|\\*[^/])+)(\\|)?"
2666 +
            }
2667 +
          ]
2668 +
        }
2669 +
      ]
2670 +
    },
2671 +
    "instanceof-expr": {
2672 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2673 +
      "beginCaptures": {
2674 +
        "1": {
2675 +
          "name": "keyword.operator.expression.instanceof.ts"
2676 +
        }
2677 +
      },
2678 +
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|([!=]==?)|(([\\&^|~]\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s+instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
2679 +
      "patterns": [
2680 +
        {
2681 +
          "include": "#type"
2682 +
        }
2683 +
      ]
2684 +
    },
2685 +
    "interface-declaration": {
2686 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[*/])",
2687 +
      "beginCaptures": {
2688 +
        "1": {
2689 +
          "name": "keyword.control.export.ts"
2690 +
        },
2691 +
        "2": {
2692 +
          "name": "storage.modifier.ts"
2693 +
        },
2694 +
        "3": {
2695 +
          "name": "storage.modifier.ts"
2696 +
        },
2697 +
        "4": {
2698 +
          "name": "storage.type.interface.ts"
2699 +
        }
2700 +
      },
2701 +
      "end": "(?<=})",
2702 +
      "name": "meta.interface.ts",
2703 +
      "patterns": [
2704 +
        {
2705 +
          "include": "#comment"
2706 +
        },
2707 +
        {
2708 +
          "include": "#class-or-interface-heritage"
2709 +
        },
2710 +
        {
2711 +
          "captures": {
2712 +
            "0": {
2713 +
              "name": "entity.name.type.interface.ts"
2714 +
            }
2715 +
          },
2716 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
2717 +
        },
2718 +
        {
2719 +
          "include": "#type-parameters"
2720 +
        },
2721 +
        {
2722 +
          "include": "#class-or-interface-body"
2723 +
        }
2724 +
      ]
2725 +
    },
2726 +
    "jsdoctype": {
2727 +
      "patterns": [
2728 +
        {
2729 +
          "begin": "\\G(\\{)",
2730 +
          "beginCaptures": {
2731 +
            "0": {
2732 +
              "name": "entity.name.type.instance.jsdoc"
2733 +
            },
2734 +
            "1": {
2735 +
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2736 +
            }
2737 +
          },
2738 +
          "contentName": "entity.name.type.instance.jsdoc",
2739 +
          "end": "((}))\\s*|(?=\\*/)",
2740 +
          "endCaptures": {
2741 +
            "1": {
2742 +
              "name": "entity.name.type.instance.jsdoc"
2743 +
            },
2744 +
            "2": {
2745 +
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2746 +
            }
2747 +
          },
2748 +
          "patterns": [
2749 +
            {
2750 +
              "include": "#brackets"
2751 +
            }
2752 +
          ]
2753 +
        }
2754 +
      ]
2755 +
    },
2756 +
    "label": {
2757 +
      "patterns": [
2758 +
        {
2759 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
2760 +
          "beginCaptures": {
2761 +
            "1": {
2762 +
              "name": "entity.name.label.ts"
2763 +
            },
2764 +
            "2": {
2765 +
              "name": "punctuation.separator.label.ts"
2766 +
            }
2767 +
          },
2768 +
          "end": "(?<=})",
2769 +
          "patterns": [
2770 +
            {
2771 +
              "include": "#decl-block"
2772 +
            }
2773 +
          ]
2774 +
        },
2775 +
        {
2776 +
          "captures": {
2777 +
            "1": {
2778 +
              "name": "entity.name.label.ts"
2779 +
            },
2780 +
            "2": {
2781 +
              "name": "punctuation.separator.label.ts"
2782 +
            }
2783 +
          },
2784 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)"
2785 +
        }
2786 +
      ]
2787 +
    },
2788 +
    "literal": {
2789 +
      "patterns": [
2790 +
        {
2791 +
          "include": "#numeric-literal"
2792 +
        },
2793 +
        {
2794 +
          "include": "#boolean-literal"
2795 +
        },
2796 +
        {
2797 +
          "include": "#null-literal"
2798 +
        },
2799 +
        {
2800 +
          "include": "#undefined-literal"
2801 +
        },
2802 +
        {
2803 +
          "include": "#numericConstant-literal"
2804 +
        },
2805 +
        {
2806 +
          "include": "#array-literal"
2807 +
        },
2808 +
        {
2809 +
          "include": "#this-literal"
2810 +
        },
2811 +
        {
2812 +
          "include": "#super-literal"
2813 +
        }
2814 +
      ]
2815 +
    },
2816 +
    "method-declaration": {
2817 +
      "patterns": [
2818 +
        {
2819 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2820 +
          "beginCaptures": {
2821 +
            "1": {
2822 +
              "name": "storage.modifier.ts"
2823 +
            },
2824 +
            "2": {
2825 +
              "name": "storage.modifier.ts"
2826 +
            },
2827 +
            "3": {
2828 +
              "name": "storage.modifier.ts"
2829 +
            },
2830 +
            "4": {
2831 +
              "name": "storage.modifier.async.ts"
2832 +
            },
2833 +
            "5": {
2834 +
              "name": "storage.type.ts"
2835 +
            }
2836 +
          },
2837 +
          "end": "(?=[,;}]|$)|(?<=})",
2838 +
          "name": "meta.method.declaration.ts",
2839 +
          "patterns": [
2840 +
            {
2841 +
              "include": "#method-declaration-name"
2842 +
            },
2843 +
            {
2844 +
              "include": "#function-body"
2845 +
            }
2846 +
          ]
2847 +
        },
2848 +
        {
2849 +
          "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*))?\\()",
2850 +
          "beginCaptures": {
2851 +
            "1": {
2852 +
              "name": "storage.modifier.ts"
2853 +
            },
2854 +
            "2": {
2855 +
              "name": "storage.modifier.ts"
2856 +
            },
2857 +
            "3": {
2858 +
              "name": "storage.modifier.ts"
2859 +
            },
2860 +
            "4": {
2861 +
              "name": "storage.modifier.async.ts"
2862 +
            },
2863 +
            "5": {
2864 +
              "name": "keyword.operator.new.ts"
2865 +
            },
2866 +
            "6": {
2867 +
              "name": "keyword.generator.asterisk.ts"
2868 +
            }
2869 +
          },
2870 +
          "end": "(?=[,;}]|$)|(?<=})",
2871 +
          "name": "meta.method.declaration.ts",
2872 +
          "patterns": [
2873 +
            {
2874 +
              "include": "#method-declaration-name"
2875 +
            },
2876 +
            {
2877 +
              "include": "#function-body"
2878 +
            }
2879 +
          ]
2880 +
        },
2881 +
        {
2882 +
          "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*))?\\()",
2883 +
          "beginCaptures": {
2884 +
            "1": {
2885 +
              "name": "storage.modifier.ts"
2886 +
            },
2887 +
            "2": {
2888 +
              "name": "storage.modifier.ts"
2889 +
            },
2890 +
            "3": {
2891 +
              "name": "storage.modifier.ts"
2892 +
            },
2893 +
            "4": {
2894 +
              "name": "storage.modifier.async.ts"
2895 +
            },
2896 +
            "5": {
2897 +
              "name": "storage.type.property.ts"
2898 +
            },
2899 +
            "6": {
2900 +
              "name": "keyword.generator.asterisk.ts"
2901 +
            }
2902 +
          },
2903 +
          "end": "(?=[,;}]|$)|(?<=})",
2904 +
          "name": "meta.method.declaration.ts",
2905 +
          "patterns": [
2906 +
            {
2907 +
              "include": "#method-declaration-name"
2908 +
            },
2909 +
            {
2910 +
              "include": "#function-body"
2911 +
            }
2912 +
          ]
2913 +
        }
2914 +
      ]
2915 +
    },
2916 +
    "method-declaration-name": {
2917 +
      "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*[(<])",
2918 +
      "end": "(?=[(<])",
2919 +
      "patterns": [
2920 +
        {
2921 +
          "include": "#string"
2922 +
        },
2923 +
        {
2924 +
          "include": "#array-literal"
2925 +
        },
2926 +
        {
2927 +
          "include": "#numeric-literal"
2928 +
        },
2929 +
        {
2930 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
2931 +
          "name": "meta.definition.method.ts entity.name.function.ts"
2932 +
        },
2933 +
        {
2934 +
          "match": "\\?",
2935 +
          "name": "keyword.operator.optional.ts"
2936 +
        }
2937 +
      ]
2938 +
    },
2939 +
    "namespace-declaration": {
2940 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(namespace|module)\\s+(?=[\"$'_`[:alpha:]])",
2941 +
      "beginCaptures": {
2942 +
        "1": {
2943 +
          "name": "keyword.control.export.ts"
2944 +
        },
2945 +
        "2": {
2946 +
          "name": "storage.modifier.ts"
2947 +
        },
2948 +
        "3": {
2949 +
          "name": "storage.type.namespace.ts"
2950 +
        }
2951 +
      },
2952 +
      "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)",
2953 +
      "name": "meta.namespace.declaration.ts",
2954 +
      "patterns": [
2955 +
        {
2956 +
          "include": "#comment"
2957 +
        },
2958 +
        {
2959 +
          "include": "#string"
2960 +
        },
2961 +
        {
2962 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
2963 +
          "name": "entity.name.type.module.ts"
2964 +
        },
2965 +
        {
2966 +
          "include": "#punctuation-accessor"
2967 +
        },
2968 +
        {
2969 +
          "include": "#decl-block"
2970 +
        }
2971 +
      ]
2972 +
    },
2973 +
    "new-expr": {
2974 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2975 +
      "beginCaptures": {
2976 +
        "1": {
2977 +
          "name": "keyword.operator.new.ts"
2978 +
        }
2979 +
      },
2980 +
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
2981 +
      "name": "new.expr.ts",
2982 +
      "patterns": [
2983 +
        {
2984 +
          "include": "#expression"
2985 +
        }
2986 +
      ]
2987 +
    },
2988 +
    "null-literal": {
2989 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2990 +
      "name": "constant.language.null.ts"
2991 +
    },
2992 +
    "numeric-literal": {
2993 +
      "patterns": [
2994 +
        {
2995 +
          "captures": {
2996 +
            "1": {
2997 +
              "name": "storage.type.numeric.bigint.ts"
2998 +
            }
2999 +
          },
3000 +
          "match": "\\b(?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$)",
3001 +
          "name": "constant.numeric.hex.ts"
3002 +
        },
3003 +
        {
3004 +
          "captures": {
3005 +
            "1": {
3006 +
              "name": "storage.type.numeric.bigint.ts"
3007 +
            }
3008 +
          },
3009 +
          "match": "\\b(?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$)",
3010 +
          "name": "constant.numeric.binary.ts"
3011 +
        },
3012 +
        {
3013 +
          "captures": {
3014 +
            "1": {
3015 +
              "name": "storage.type.numeric.bigint.ts"
3016 +
            }
3017 +
          },
3018 +
          "match": "\\b(?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$)",
3019 +
          "name": "constant.numeric.octal.ts"
3020 +
        },
3021 +
        {
3022 +
          "captures": {
3023 +
            "0": {
3024 +
              "name": "constant.numeric.decimal.ts"
3025 +
            },
3026 +
            "1": {
3027 +
              "name": "meta.delimiter.decimal.period.ts"
3028 +
            },
3029 +
            "10": {
3030 +
              "name": "meta.delimiter.decimal.period.ts"
3031 +
            },
3032 +
            "11": {
3033 +
              "name": "storage.type.numeric.bigint.ts"
3034 +
            },
3035 +
            "12": {
3036 +
              "name": "meta.delimiter.decimal.period.ts"
3037 +
            },
3038 +
            "13": {
3039 +
              "name": "storage.type.numeric.bigint.ts"
3040 +
            },
3041 +
            "14": {
3042 +
              "name": "storage.type.numeric.bigint.ts"
3043 +
            },
3044 +
            "2": {
3045 +
              "name": "storage.type.numeric.bigint.ts"
3046 +
            },
3047 +
            "3": {
3048 +
              "name": "meta.delimiter.decimal.period.ts"
3049 +
            },
3050 +
            "4": {
3051 +
              "name": "storage.type.numeric.bigint.ts"
3052 +
            },
3053 +
            "5": {
3054 +
              "name": "meta.delimiter.decimal.period.ts"
3055 +
            },
3056 +
            "6": {
3057 +
              "name": "storage.type.numeric.bigint.ts"
3058 +
            },
3059 +
            "7": {
3060 +
              "name": "storage.type.numeric.bigint.ts"
3061 +
            },
3062 +
            "8": {
3063 +
              "name": "meta.delimiter.decimal.period.ts"
3064 +
            },
3065 +
            "9": {
3066 +
              "name": "storage.type.numeric.bigint.ts"
3067 +
            }
3068 +
          },
3069 +
          "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(?!\\.))(?!\\$)"
3070 +
        }
3071 +
      ]
3072 +
    },
3073 +
    "numericConstant-literal": {
3074 +
      "patterns": [
3075 +
        {
3076 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3077 +
          "name": "constant.language.nan.ts"
3078 +
        },
3079 +
        {
3080 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3081 +
          "name": "constant.language.infinity.ts"
3082 +
        }
3083 +
      ]
3084 +
    },
3085 +
    "object-binding-element": {
3086 +
      "patterns": [
3087 +
        {
3088 +
          "include": "#comment"
3089 +
        },
3090 +
        {
3091 +
          "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*(:))",
3092 +
          "end": "(?=[,}])",
3093 +
          "patterns": [
3094 +
            {
3095 +
              "include": "#object-binding-element-propertyName"
3096 +
            },
3097 +
            {
3098 +
              "include": "#binding-element"
3099 +
            }
3100 +
          ]
3101 +
        },
3102 +
        {
3103 +
          "include": "#object-binding-pattern"
3104 +
        },
3105 +
        {
3106 +
          "include": "#destructuring-variable-rest"
3107 +
        },
3108 +
        {
3109 +
          "include": "#variable-initializer"
3110 +
        },
3111 +
        {
3112 +
          "include": "#punctuation-comma"
3113 +
        }
3114 +
      ]
3115 +
    },
3116 +
    "object-binding-element-const": {
3117 +
      "patterns": [
3118 +
        {
3119 +
          "include": "#comment"
3120 +
        },
3121 +
        {
3122 +
          "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*(:))",
3123 +
          "end": "(?=[,}])",
3124 +
          "patterns": [
3125 +
            {
3126 +
              "include": "#object-binding-element-propertyName"
3127 +
            },
3128 +
            {
3129 +
              "include": "#binding-element-const"
3130 +
            }
3131 +
          ]
3132 +
        },
3133 +
        {
3134 +
          "include": "#object-binding-pattern-const"
3135 +
        },
3136 +
        {
3137 +
          "include": "#destructuring-variable-rest-const"
3138 +
        },
3139 +
        {
3140 +
          "include": "#variable-initializer"
3141 +
        },
3142 +
        {
3143 +
          "include": "#punctuation-comma"
3144 +
        }
3145 +
      ]
3146 +
    },
3147 +
    "object-binding-element-propertyName": {
3148 +
      "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*(:))",
3149 +
      "end": "(:)",
3150 +
      "endCaptures": {
3151 +
        "0": {
3152 +
          "name": "punctuation.destructuring.ts"
3153 +
        }
3154 +
      },
3155 +
      "patterns": [
3156 +
        {
3157 +
          "include": "#string"
3158 +
        },
3159 +
        {
3160 +
          "include": "#array-literal"
3161 +
        },
3162 +
        {
3163 +
          "include": "#numeric-literal"
3164 +
        },
3165 +
        {
3166 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
3167 +
          "name": "variable.object.property.ts"
3168 +
        }
3169 +
      ]
3170 +
    },
3171 +
    "object-binding-pattern": {
3172 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3173 +
      "beginCaptures": {
3174 +
        "1": {
3175 +
          "name": "keyword.operator.rest.ts"
3176 +
        },
3177 +
        "2": {
3178 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3179 +
        }
3180 +
      },
3181 +
      "end": "}",
3182 +
      "endCaptures": {
3183 +
        "0": {
3184 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3185 +
        }
3186 +
      },
3187 +
      "patterns": [
3188 +
        {
3189 +
          "include": "#object-binding-element"
3190 +
        }
3191 +
      ]
3192 +
    },
3193 +
    "object-binding-pattern-const": {
3194 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3195 +
      "beginCaptures": {
3196 +
        "1": {
3197 +
          "name": "keyword.operator.rest.ts"
3198 +
        },
3199 +
        "2": {
3200 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3201 +
        }
3202 +
      },
3203 +
      "end": "}",
3204 +
      "endCaptures": {
3205 +
        "0": {
3206 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3207 +
        }
3208 +
      },
3209 +
      "patterns": [
3210 +
        {
3211 +
          "include": "#object-binding-element-const"
3212 +
        }
3213 +
      ]
3214 +
    },
3215 +
    "object-identifiers": {
3216 +
      "patterns": [
3217 +
        {
3218 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))",
3219 +
          "name": "support.class.ts"
3220 +
        },
3221 +
        {
3222 +
          "captures": {
3223 +
            "1": {
3224 +
              "name": "punctuation.accessor.ts"
3225 +
            },
3226 +
            "2": {
3227 +
              "name": "punctuation.accessor.optional.ts"
3228 +
            },
3229 +
            "3": {
3230 +
              "name": "variable.other.constant.object.property.ts"
3231 +
            },
3232 +
            "4": {
3233 +
              "name": "variable.other.object.property.ts"
3234 +
            }
3235 +
          },
3236 +
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(?:(#?\\p{upper}[$_\\d[:upper:]]*)|(#?[$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3237 +
        },
3238 +
        {
3239 +
          "captures": {
3240 +
            "1": {
3241 +
              "name": "variable.other.constant.object.ts"
3242 +
            },
3243 +
            "2": {
3244 +
              "name": "variable.other.object.ts"
3245 +
            }
3246 +
          },
3247 +
          "match": "(?:(\\p{upper}[$_\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3248 +
        }
3249 +
      ]
3250 +
    },
3251 +
    "object-literal": {
3252 +
      "begin": "\\{",
3253 +
      "beginCaptures": {
3254 +
        "0": {
3255 +
          "name": "punctuation.definition.block.ts"
3256 +
        }
3257 +
      },
3258 +
      "end": "}",
3259 +
      "endCaptures": {
3260 +
        "0": {
3261 +
          "name": "punctuation.definition.block.ts"
3262 +
        }
3263 +
      },
3264 +
      "name": "meta.objectliteral.ts",
3265 +
      "patterns": [
3266 +
        {
3267 +
          "include": "#object-member"
3268 +
        }
3269 +
      ]
3270 +
    },
3271 +
    "object-literal-method-declaration": {
3272 +
      "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*))?\\()",
3273 +
      "beginCaptures": {
3274 +
        "1": {
3275 +
          "name": "storage.modifier.async.ts"
3276 +
        },
3277 +
        "2": {
3278 +
          "name": "storage.type.property.ts"
3279 +
        },
3280 +
        "3": {
3281 +
          "name": "keyword.generator.asterisk.ts"
3282 +
        }
3283 +
      },
3284 +
      "end": "(?=[,;}])|(?<=})",
3285 +
      "name": "meta.method.declaration.ts",
3286 +
      "patterns": [
3287 +
        {
3288 +
          "include": "#method-declaration-name"
3289 +
        },
3290 +
        {
3291 +
          "include": "#function-body"
3292 +
        },
3293 +
        {
3294 +
          "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*))?\\()",
3295 +
          "beginCaptures": {
3296 +
            "1": {
3297 +
              "name": "storage.modifier.async.ts"
3298 +
            },
3299 +
            "2": {
3300 +
              "name": "storage.type.property.ts"
3301 +
            },
3302 +
            "3": {
3303 +
              "name": "keyword.generator.asterisk.ts"
3304 +
            }
3305 +
          },
3306 +
          "end": "(?=[(<])",
3307 +
          "patterns": [
3308 +
            {
3309 +
              "include": "#method-declaration-name"
3310 +
            }
3311 +
          ]
3312 +
        }
3313 +
      ]
3314 +
    },
3315 +
    "object-member": {
3316 +
      "patterns": [
3317 +
        {
3318 +
          "include": "#comment"
3319 +
        },
3320 +
        {
3321 +
          "include": "#object-literal-method-declaration"
3322 +
        },
3323 +
        {
3324 +
          "begin": "(?=\\[)",
3325 +
          "end": "(?=:)|((?<=])(?=\\s*[(<]))",
3326 +
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3327 +
          "patterns": [
3328 +
            {
3329 +
              "include": "#comment"
3330 +
            },
3331 +
            {
3332 +
              "include": "#array-literal"
3333 +
            }
3334 +
          ]
3335 +
        },
3336 +
        {
3337 +
          "begin": "(?=[\"'`])",
3338 +
          "end": "(?=:)|((?<=[\"'`])(?=((\\s*[(,<}])|(\\s+(as|satisifies)\\s+))))",
3339 +
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3340 +
          "patterns": [
3341 +
            {
3342 +
              "include": "#comment"
3343 +
            },
3344 +
            {
3345 +
              "include": "#string"
3346 +
            }
3347 +
          ]
3348 +
        },
3349 +
        {
3350 +
          "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(?!\\.))(?!\\$)))",
3351 +
          "end": "(?=:)|(?=\\s*([(,<}])|(\\s+as|satisifies\\s+))",
3352 +
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3353 +
          "patterns": [
3354 +
            {
3355 +
              "include": "#comment"
3356 +
            },
3357 +
            {
3358 +
              "include": "#numeric-literal"
3359 +
            }
3360 +
          ]
3361 +
        },
3362 +
        {
3363 +
          "begin": "(?<=[]\"'`])(?=\\s*[(<])",
3364 +
          "end": "(?=[,;}])|(?<=})",
3365 +
          "name": "meta.method.declaration.ts",
3366 +
          "patterns": [
3367 +
            {
3368 +
              "include": "#function-body"
3369 +
            }
3370 +
          ]
3371 +
        },
3372 +
        {
3373 +
          "captures": {
3374 +
            "0": {
3375 +
              "name": "meta.object-literal.key.ts"
3376 +
            },
3377 +
            "1": {
3378 +
              "name": "constant.numeric.decimal.ts"
3379 +
            }
3380 +
          },
3381 +
          "match": "(?![$_[:alpha:]])(\\d+)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3382 +
          "name": "meta.object.member.ts"
3383 +
        },
3384 +
        {
3385 +
          "captures": {
3386 +
            "0": {
3387 +
              "name": "meta.object-literal.key.ts"
3388 +
            },
3389 +
            "1": {
3390 +
              "name": "entity.name.function.ts"
3391 +
            }
3392 +
          },
3393 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:(\\s*/\\*([^*]|(\\*[^/]))*\\*/)*\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))",
3394 +
          "name": "meta.object.member.ts"
3395 +
        },
3396 +
        {
3397 +
          "captures": {
3398 +
            "0": {
3399 +
              "name": "meta.object-literal.key.ts"
3400 +
            }
3401 +
          },
3402 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3403 +
          "name": "meta.object.member.ts"
3404 +
        },
3405 +
        {
3406 +
          "begin": "\\.\\.\\.",
3407 +
          "beginCaptures": {
3408 +
            "0": {
3409 +
              "name": "keyword.operator.spread.ts"
3410 +
            }
3411 +
          },
3412 +
          "end": "(?=[,}])",
3413 +
          "name": "meta.object.member.ts",
3414 +
          "patterns": [
3415 +
            {
3416 +
              "include": "#expression"
3417 +
            }
3418 +
          ]
3419 +
        },
3420 +
        {
3421 +
          "captures": {
3422 +
            "1": {
3423 +
              "name": "variable.other.readwrite.ts"
3424 +
            }
3425 +
          },
3426 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=[,}]|$|//|/\\*)",
3427 +
          "name": "meta.object.member.ts"
3428 +
        },
3429 +
        {
3430 +
          "captures": {
3431 +
            "1": {
3432 +
              "name": "keyword.control.as.ts"
3433 +
            },
3434 +
            "2": {
3435 +
              "name": "storage.modifier.ts"
3436 +
            }
3437 +
          },
3438 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
3439 +
          "name": "meta.object.member.ts"
3440 +
        },
3441 +
        {
3442 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3443 +
          "beginCaptures": {
3444 +
            "1": {
3445 +
              "name": "keyword.control.as.ts"
3446 +
            },
3447 +
            "2": {
3448 +
              "name": "keyword.control.satisfies.ts"
3449 +
            }
3450 +
          },
3451 +
          "end": "(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|^|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
3452 +
          "name": "meta.object.member.ts",
3453 +
          "patterns": [
3454 +
            {
3455 +
              "include": "#type"
3456 +
            }
3457 +
          ]
3458 +
        },
3459 +
        {
3460 +
          "begin": "(?=[$_[:alpha:]][$_[:alnum:]]*\\s*=)",
3461 +
          "end": "(?=[,}]|$|//|/\\*)",
3462 +
          "name": "meta.object.member.ts",
3463 +
          "patterns": [
3464 +
            {
3465 +
              "include": "#expression"
3466 +
            }
3467 +
          ]
3468 +
        },
3469 +
        {
3470 +
          "begin": ":",
3471 +
          "beginCaptures": {
3472 +
            "0": {
3473 +
              "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts"
3474 +
            }
3475 +
          },
3476 +
          "end": "(?=[,}])",
3477 +
          "name": "meta.object.member.ts",
3478 +
          "patterns": [
3479 +
            {
3480 +
              "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*)))))",
3481 +
              "beginCaptures": {
3482 +
                "1": {
3483 +
                  "name": "storage.modifier.async.ts"
3484 +
                }
3485 +
              },
3486 +
              "end": "(?<=\\))",
3487 +
              "patterns": [
3488 +
                {
3489 +
                  "include": "#type-parameters"
3490 +
                },
3491 +
                {
3492 +
                  "begin": "\\(",
3493 +
                  "beginCaptures": {
3494 +
                    "0": {
3495 +
                      "name": "meta.brace.round.ts"
3496 +
                    }
3497 +
                  },
3498 +
                  "end": "\\)",
3499 +
                  "endCaptures": {
3500 +
                    "0": {
3501 +
                      "name": "meta.brace.round.ts"
3502 +
                    }
3503 +
                  },
3504 +
                  "patterns": [
3505 +
                    {
3506 +
                      "include": "#expression-inside-possibly-arrow-parens"
3507 +
                    }
3508 +
                  ]
3509 +
                }
3510 +
              ]
3511 +
            },
3512 +
            {
3513 +
              "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3514 +
              "beginCaptures": {
3515 +
                "1": {
3516 +
                  "name": "storage.modifier.async.ts"
3517 +
                },
3518 +
                "2": {
3519 +
                  "name": "meta.brace.round.ts"
3520 +
                }
3521 +
              },
3522 +
              "end": "\\)",
3523 +
              "endCaptures": {
3524 +
                "0": {
3525 +
                  "name": "meta.brace.round.ts"
3526 +
                }
3527 +
              },
3528 +
              "patterns": [
3529 +
                {
3530 +
                  "include": "#expression-inside-possibly-arrow-parens"
3531 +
                }
3532 +
              ]
3533 +
            },
3534 +
            {
3535 +
              "begin": "(?<=:)\\s*(async)?\\s*(?=<\\s*$)",
3536 +
              "beginCaptures": {
3537 +
                "1": {
3538 +
                  "name": "storage.modifier.async.ts"
3539 +
                }
3540 +
              },
3541 +
              "end": "(?<=>)",
3542 +
              "patterns": [
3543 +
                {
3544 +
                  "include": "#type-parameters"
3545 +
                }
3546 +
              ]
3547 +
            },
3548 +
            {
3549 +
              "begin": "(?<=>)\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3550 +
              "beginCaptures": {
3551 +
                "1": {
3552 +
                  "name": "meta.brace.round.ts"
3553 +
                }
3554 +
              },
3555 +
              "end": "\\)",
3556 +
              "endCaptures": {
3557 +
                "0": {
3558 +
                  "name": "meta.brace.round.ts"
3559 +
                }
3560 +
              },
3561 +
              "patterns": [
3562 +
                {
3563 +
                  "include": "#expression-inside-possibly-arrow-parens"
3564 +
                }
3565 +
              ]
3566 +
            },
3567 +
            {
3568 +
              "include": "#possibly-arrow-return-type"
3569 +
            },
3570 +
            {
3571 +
              "include": "#expression"
3572 +
            }
3573 +
          ]
3574 +
        },
3575 +
        {
3576 +
          "include": "#punctuation-comma"
3577 +
        },
3578 +
        {
3579 +
          "include": "#decl-block"
3580 +
        }
3581 +
      ]
3582 +
    },
3583 +
    "parameter-array-binding-pattern": {
3584 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
3585 +
      "beginCaptures": {
3586 +
        "1": {
3587 +
          "name": "keyword.operator.rest.ts"
3588 +
        },
3589 +
        "2": {
3590 +
          "name": "punctuation.definition.binding-pattern.array.ts"
3591 +
        }
3592 +
      },
3593 +
      "end": "]",
3594 +
      "endCaptures": {
3595 +
        "0": {
3596 +
          "name": "punctuation.definition.binding-pattern.array.ts"
3597 +
        }
3598 +
      },
3599 +
      "patterns": [
3600 +
        {
3601 +
          "include": "#parameter-binding-element"
3602 +
        },
3603 +
        {
3604 +
          "include": "#punctuation-comma"
3605 +
        }
3606 +
      ]
3607 +
    },
3608 +
    "parameter-binding-element": {
3609 +
      "patterns": [
3610 +
        {
3611 +
          "include": "#comment"
3612 +
        },
3613 +
        {
3614 +
          "include": "#string"
3615 +
        },
3616 +
        {
3617 +
          "include": "#numeric-literal"
3618 +
        },
3619 +
        {
3620 +
          "include": "#regex"
3621 +
        },
3622 +
        {
3623 +
          "include": "#parameter-object-binding-pattern"
3624 +
        },
3625 +
        {
3626 +
          "include": "#parameter-array-binding-pattern"
3627 +
        },
3628 +
        {
3629 +
          "include": "#destructuring-parameter-rest"
3630 +
        },
3631 +
        {
3632 +
          "include": "#variable-initializer"
3633 +
        }
3634 +
      ]
3635 +
    },
3636 +
    "parameter-name": {
3637 +
      "patterns": [
3638 +
        {
3639 +
          "captures": {
3640 +
            "1": {
3641 +
              "name": "storage.modifier.ts"
3642 +
            }
3643 +
          },
3644 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
3645 +
        },
3646 +
        {
3647 +
          "captures": {
3648 +
            "1": {
3649 +
              "name": "storage.modifier.ts"
3650 +
            },
3651 +
            "2": {
3652 +
              "name": "keyword.operator.rest.ts"
3653 +
            },
3654 +
            "3": {
3655 +
              "name": "entity.name.function.ts variable.language.this.ts"
3656 +
            },
3657 +
            "4": {
3658 +
              "name": "entity.name.function.ts"
3659 +
            },
3660 +
            "5": {
3661 +
              "name": "keyword.operator.optional.ts"
3662 +
            }
3663 +
          },
3664 +
          "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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
3665 +
        },
3666 +
        {
3667 +
          "captures": {
3668 +
            "1": {
3669 +
              "name": "storage.modifier.ts"
3670 +
            },
3671 +
            "2": {
3672 +
              "name": "keyword.operator.rest.ts"
3673 +
            },
3674 +
            "3": {
3675 +
              "name": "variable.parameter.ts variable.language.this.ts"
3676 +
            },
3677 +
            "4": {
3678 +
              "name": "variable.parameter.ts"
3679 +
            },
3680 +
            "5": {
3681 +
              "name": "keyword.operator.optional.ts"
3682 +
            }
3683 +
          },
3684 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)"
3685 +
        }
3686 +
      ]
3687 +
    },
3688 +
    "parameter-object-binding-element": {
3689 +
      "patterns": [
3690 +
        {
3691 +
          "include": "#comment"
3692 +
        },
3693 +
        {
3694 +
          "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*(:))",
3695 +
          "end": "(?=[,}])",
3696 +
          "patterns": [
3697 +
            {
3698 +
              "include": "#object-binding-element-propertyName"
3699 +
            },
3700 +
            {
3701 +
              "include": "#parameter-binding-element"
3702 +
            },
3703 +
            {
3704 +
              "include": "#paren-expression"
3705 +
            }
3706 +
          ]
3707 +
        },
3708 +
        {
3709 +
          "include": "#parameter-object-binding-pattern"
3710 +
        },
3711 +
        {
3712 +
          "include": "#destructuring-parameter-rest"
3713 +
        },
3714 +
        {
3715 +
          "include": "#variable-initializer"
3716 +
        },
3717 +
        {
3718 +
          "include": "#punctuation-comma"
3719 +
        }
3720 +
      ]
3721 +
    },
3722 +
    "parameter-object-binding-pattern": {
3723 +
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3724 +
      "beginCaptures": {
3725 +
        "1": {
3726 +
          "name": "keyword.operator.rest.ts"
3727 +
        },
3728 +
        "2": {
3729 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3730 +
        }
3731 +
      },
3732 +
      "end": "}",
3733 +
      "endCaptures": {
3734 +
        "0": {
3735 +
          "name": "punctuation.definition.binding-pattern.object.ts"
3736 +
        }
3737 +
      },
3738 +
      "patterns": [
3739 +
        {
3740 +
          "include": "#parameter-object-binding-element"
3741 +
        }
3742 +
      ]
3743 +
    },
3744 +
    "parameter-type-annotation": {
3745 +
      "patterns": [
3746 +
        {
3747 +
          "begin": "(:)",
3748 +
          "beginCaptures": {
3749 +
            "1": {
3750 +
              "name": "keyword.operator.type.annotation.ts"
3751 +
            }
3752 +
          },
3753 +
          "end": "(?=[),])|(?==[^>])",
3754 +
          "name": "meta.type.annotation.ts",
3755 +
          "patterns": [
3756 +
            {
3757 +
              "include": "#type"
3758 +
            }
3759 +
          ]
3760 +
        }
3761 +
      ]
3762 +
    },
3763 +
    "paren-expression": {
3764 +
      "begin": "\\(",
3765 +
      "beginCaptures": {
3766 +
        "0": {
3767 +
          "name": "meta.brace.round.ts"
3768 +
        }
3769 +
      },
3770 +
      "end": "\\)",
3771 +
      "endCaptures": {
3772 +
        "0": {
3773 +
          "name": "meta.brace.round.ts"
3774 +
        }
3775 +
      },
3776 +
      "patterns": [
3777 +
        {
3778 +
          "include": "#expression"
3779 +
        }
3780 +
      ]
3781 +
    },
3782 +
    "paren-expression-possibly-arrow": {
3783 +
      "patterns": [
3784 +
        {
3785 +
          "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*)))))",
3786 +
          "beginCaptures": {
3787 +
            "1": {
3788 +
              "name": "storage.modifier.async.ts"
3789 +
            }
3790 +
          },
3791 +
          "end": "(?<=\\))",
3792 +
          "patterns": [
3793 +
            {
3794 +
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
3795 +
            }
3796 +
          ]
3797 +
        },
3798 +
        {
3799 +
          "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*$)",
3800 +
          "beginCaptures": {
3801 +
            "1": {
3802 +
              "name": "storage.modifier.async.ts"
3803 +
            }
3804 +
          },
3805 +
          "end": "(?<=\\))",
3806 +
          "patterns": [
3807 +
            {
3808 +
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
3809 +
            }
3810 +
          ]
3811 +
        },
3812 +
        {
3813 +
          "include": "#possibly-arrow-return-type"
3814 +
        }
3815 +
      ]
3816 +
    },
3817 +
    "paren-expression-possibly-arrow-with-typeparameters": {
3818 +
      "patterns": [
3819 +
        {
3820 +
          "include": "#type-parameters"
3821 +
        },
3822 +
        {
3823 +
          "begin": "\\(",
3824 +
          "beginCaptures": {
3825 +
            "0": {
3826 +
              "name": "meta.brace.round.ts"
3827 +
            }
3828 +
          },
3829 +
          "end": "\\)",
3830 +
          "endCaptures": {
3831 +
            "0": {
3832 +
              "name": "meta.brace.round.ts"
3833 +
            }
3834 +
          },
3835 +
          "patterns": [
3836 +
            {
3837 +
              "include": "#expression-inside-possibly-arrow-parens"
3838 +
            }
3839 +
          ]
3840 +
        }
3841 +
      ]
3842 +
    },
3843 +
    "possibly-arrow-return-type": {
3844 +
      "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*=>)",
3845 +
      "beginCaptures": {
3846 +
        "1": {
3847 +
          "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
3848 +
        }
3849 +
      },
3850 +
      "contentName": "meta.arrow.ts meta.return.type.arrow.ts",
3851 +
      "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+))",
3852 +
      "patterns": [
3853 +
        {
3854 +
          "include": "#arrow-return-type-body"
3855 +
        }
3856 +
      ]
3857 +
    },
3858 +
    "property-accessor": {
3859 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3860 +
      "name": "storage.type.property.ts"
3861 +
    },
3862 +
    "punctuation-accessor": {
3863 +
      "captures": {
3864 +
        "1": {
3865 +
          "name": "punctuation.accessor.ts"
3866 +
        },
3867 +
        "2": {
3868 +
          "name": "punctuation.accessor.optional.ts"
3869 +
        }
3870 +
      },
3871 +
      "match": "(\\.)|(\\?\\.(?!\\s*\\d))"
3872 +
    },
3873 +
    "punctuation-comma": {
3874 +
      "match": ",",
3875 +
      "name": "punctuation.separator.comma.ts"
3876 +
    },
3877 +
    "punctuation-semicolon": {
3878 +
      "match": ";",
3879 +
      "name": "punctuation.terminator.statement.ts"
3880 +
    },
3881 +
    "qstring-double": {
3882 +
      "begin": "\"",
3883 +
      "beginCaptures": {
3884 +
        "0": {
3885 +
          "name": "punctuation.definition.string.begin.ts"
3886 +
        }
3887 +
      },
3888 +
      "end": "(\")|([^\\n\\\\])$",
3889 +
      "endCaptures": {
3890 +
        "1": {
3891 +
          "name": "punctuation.definition.string.end.ts"
3892 +
        },
3893 +
        "2": {
3894 +
          "name": "invalid.illegal.newline.ts"
3895 +
        }
3896 +
      },
3897 +
      "name": "string.quoted.double.ts",
3898 +
      "patterns": [
3899 +
        {
3900 +
          "include": "#string-character-escape"
3901 +
        }
3902 +
      ]
3903 +
    },
3904 +
    "qstring-single": {
3905 +
      "begin": "'",
3906 +
      "beginCaptures": {
3907 +
        "0": {
3908 +
          "name": "punctuation.definition.string.begin.ts"
3909 +
        }
3910 +
      },
3911 +
      "end": "(')|([^\\n\\\\])$",
3912 +
      "endCaptures": {
3913 +
        "1": {
3914 +
          "name": "punctuation.definition.string.end.ts"
3915 +
        },
3916 +
        "2": {
3917 +
          "name": "invalid.illegal.newline.ts"
3918 +
        }
3919 +
      },
3920 +
      "name": "string.quoted.single.ts",
3921 +
      "patterns": [
3922 +
        {
3923 +
          "include": "#string-character-escape"
3924 +
        }
3925 +
      ]
3926 +
    },
3927 +
    "regex": {
3928 +
      "patterns": [
3929 +
        {
3930 +
          "begin": "(?<!\\+\\+|--|})(?<=[!(+,:=?\\[]|^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case|=>|&&|\\|\\||\\*/)\\s*(/)(?![*/])(?=(?:[^()/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)+]|\\(([^)\\\\]|\\\\.)+\\))+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
3931 +
          "beginCaptures": {
3932 +
            "1": {
3933 +
              "name": "punctuation.definition.string.begin.ts"
3934 +
            }
3935 +
          },
3936 +
          "end": "(/)([dgimsuvy]*)",
3937 +
          "endCaptures": {
3938 +
            "1": {
3939 +
              "name": "punctuation.definition.string.end.ts"
3940 +
            },
3941 +
            "2": {
3942 +
              "name": "keyword.other.ts"
3943 +
            }
3944 +
          },
3945 +
          "name": "string.regexp.ts",
3946 +
          "patterns": [
3947 +
            {
3948 +
              "include": "#regexp"
3949 +
            }
3950 +
          ]
3951 +
        },
3952 +
        {
3953 +
          "begin": "((?<![]$)_[:alnum:]]|\\+\\+|--|}|\\*/)|((?<=^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case))\\s*)/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
3954 +
          "beginCaptures": {
3955 +
            "0": {
3956 +
              "name": "punctuation.definition.string.begin.ts"
3957 +
            }
3958 +
          },
3959 +
          "end": "(/)([dgimsuvy]*)",
3960 +
          "endCaptures": {
3961 +
            "1": {
3962 +
              "name": "punctuation.definition.string.end.ts"
3963 +
            },
3964 +
            "2": {
3965 +
              "name": "keyword.other.ts"
3966 +
            }
3967 +
          },
3968 +
          "name": "string.regexp.ts",
3969 +
          "patterns": [
3970 +
            {
3971 +
              "include": "#regexp"
3972 +
            }
3973 +
          ]
3974 +
        }
3975 +
      ]
3976 +
    },
3977 +
    "regex-character-class": {
3978 +
      "patterns": [
3979 +
        {
3980 +
          "match": "\\\\[DSWdfnrstvw]|\\.",
3981 +
          "name": "constant.other.character-class.regexp"
3982 +
        },
3983 +
        {
3984 +
          "match": "\\\\([0-7]{3}|x\\h{2}|u\\h{4})",
3985 +
          "name": "constant.character.numeric.regexp"
3986 +
        },
3987 +
        {
3988 +
          "match": "\\\\c[A-Z]",
3989 +
          "name": "constant.character.control.regexp"
3990 +
        },
3991 +
        {
3992 +
          "match": "\\\\.",
3993 +
          "name": "constant.character.escape.backslash.regexp"
3994 +
        }
3995 +
      ]
3996 +
    },
3997 +
    "regexp": {
3998 +
      "patterns": [
3999 +
        {
4000 +
          "match": "\\\\[Bb]|[$^]",
4001 +
          "name": "keyword.control.anchor.regexp"
4002 +
        },
4003 +
        {
4004 +
          "captures": {
4005 +
            "0": {
4006 +
              "name": "keyword.other.back-reference.regexp"
4007 +
            },
4008 +
            "1": {
4009 +
              "name": "variable.other.regexp"
4010 +
            }
4011 +
          },
4012 +
          "match": "\\\\(?:[1-9]\\d*|k<([$A-Z_a-z][$\\w]*)>)"
4013 +
        },
4014 +
        {
4015 +
          "match": "[*+?]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)}\\??",
4016 +
          "name": "keyword.operator.quantifier.regexp"
4017 +
        },
4018 +
        {
4019 +
          "match": "\\|",
4020 +
          "name": "keyword.operator.or.regexp"
4021 +
        },
4022 +
        {
4023 +
          "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4024 +
          "beginCaptures": {
4025 +
            "1": {
4026 +
              "name": "punctuation.definition.group.regexp"
4027 +
            },
4028 +
            "2": {
4029 +
              "name": "punctuation.definition.group.assertion.regexp"
4030 +
            },
4031 +
            "3": {
4032 +
              "name": "meta.assertion.look-ahead.regexp"
4033 +
            },
4034 +
            "4": {
4035 +
              "name": "meta.assertion.negative-look-ahead.regexp"
4036 +
            },
4037 +
            "5": {
4038 +
              "name": "meta.assertion.look-behind.regexp"
4039 +
            },
4040 +
            "6": {
4041 +
              "name": "meta.assertion.negative-look-behind.regexp"
4042 +
            }
4043 +
          },
4044 +
          "end": "(\\))",
4045 +
          "endCaptures": {
4046 +
            "1": {
4047 +
              "name": "punctuation.definition.group.regexp"
4048 +
            }
4049 +
          },
4050 +
          "name": "meta.group.assertion.regexp",
4051 +
          "patterns": [
4052 +
            {
4053 +
              "include": "#regexp"
4054 +
            }
4055 +
          ]
4056 +
        },
4057 +
        {
4058 +
          "begin": "\\((?:(\\?:)|\\?<([$A-Z_a-z][$\\w]*)>)?",
4059 +
          "beginCaptures": {
4060 +
            "0": {
4061 +
              "name": "punctuation.definition.group.regexp"
4062 +
            },
4063 +
            "1": {
4064 +
              "name": "punctuation.definition.group.no-capture.regexp"
4065 +
            },
4066 +
            "2": {
4067 +
              "name": "variable.other.regexp"
4068 +
            }
4069 +
          },
4070 +
          "end": "\\)",
4071 +
          "endCaptures": {
4072 +
            "0": {
4073 +
              "name": "punctuation.definition.group.regexp"
4074 +
            }
4075 +
          },
4076 +
          "name": "meta.group.regexp",
4077 +
          "patterns": [
4078 +
            {
4079 +
              "include": "#regexp"
4080 +
            }
4081 +
          ]
4082 +
        },
4083 +
        {
4084 +
          "begin": "(\\[)(\\^)?",
4085 +
          "beginCaptures": {
4086 +
            "1": {
4087 +
              "name": "punctuation.definition.character-class.regexp"
4088 +
            },
4089 +
            "2": {
4090 +
              "name": "keyword.operator.negation.regexp"
4091 +
            }
4092 +
          },
4093 +
          "end": "(])",
4094 +
          "endCaptures": {
4095 +
            "1": {
4096 +
              "name": "punctuation.definition.character-class.regexp"
4097 +
            }
4098 +
          },
4099 +
          "name": "constant.other.character-class.set.regexp",
4100 +
          "patterns": [
4101 +
            {
4102 +
              "captures": {
4103 +
                "1": {
4104 +
                  "name": "constant.character.numeric.regexp"
4105 +
                },
4106 +
                "2": {
4107 +
                  "name": "constant.character.control.regexp"
4108 +
                },
4109 +
                "3": {
4110 +
                  "name": "constant.character.escape.backslash.regexp"
4111 +
                },
4112 +
                "4": {
4113 +
                  "name": "constant.character.numeric.regexp"
4114 +
                },
4115 +
                "5": {
4116 +
                  "name": "constant.character.control.regexp"
4117 +
                },
4118 +
                "6": {
4119 +
                  "name": "constant.character.escape.backslash.regexp"
4120 +
                }
4121 +
              },
4122 +
              "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])|(\\\\.))",
4123 +
              "name": "constant.other.character-class.range.regexp"
4124 +
            },
4125 +
            {
4126 +
              "include": "#regex-character-class"
4127 +
            }
4128 +
          ]
4129 +
        },
4130 +
        {
4131 +
          "include": "#regex-character-class"
4132 +
        }
4133 +
      ]
4134 +
    },
4135 +
    "return-type": {
4136 +
      "patterns": [
4137 +
        {
4138 +
          "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
4139 +
          "beginCaptures": {
4140 +
            "1": {
4141 +
              "name": "keyword.operator.type.annotation.ts"
4142 +
            }
4143 +
          },
4144 +
          "end": "(?<![\\&:|])(?=$|^|[,;{}]|//)",
4145 +
          "name": "meta.return.type.ts",
4146 +
          "patterns": [
4147 +
            {
4148 +
              "include": "#return-type-core"
4149 +
            }
4150 +
          ]
4151 +
        },
4152 +
        {
4153 +
          "begin": "(?<=\\))\\s*(:)",
4154 +
          "beginCaptures": {
4155 +
            "1": {
4156 +
              "name": "keyword.operator.type.annotation.ts"
4157 +
            }
4158 +
          },
4159 +
          "end": "(?<![\\&:|])((?=[,;{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4160 +
          "name": "meta.return.type.ts",
4161 +
          "patterns": [
4162 +
            {
4163 +
              "include": "#return-type-core"
4164 +
            }
4165 +
          ]
4166 +
        }
4167 +
      ]
4168 +
    },
4169 +
    "return-type-core": {
4170 +
      "patterns": [
4171 +
        {
4172 +
          "include": "#comment"
4173 +
        },
4174 +
        {
4175 +
          "begin": "(?<=[\\&:|])(?=\\s*\\{)",
4176 +
          "end": "(?<=})",
4177 +
          "patterns": [
4178 +
            {
4179 +
              "include": "#type-object"
4180 +
            }
4181 +
          ]
4182 +
        },
4183 +
        {
4184 +
          "include": "#type-predicate-operator"
4185 +
        },
4186 +
        {
4187 +
          "include": "#type"
4188 +
        }
4189 +
      ]
4190 +
    },
4191 +
    "shebang": {
4192 +
      "captures": {
4193 +
        "1": {
4194 +
          "name": "punctuation.definition.comment.ts"
4195 +
        }
4196 +
      },
4197 +
      "match": "\\A(#!).*(?=$)",
4198 +
      "name": "comment.line.shebang.ts"
4199 +
    },
4200 +
    "single-line-comment-consuming-line-ending": {
4201 +
      "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
4202 +
      "beginCaptures": {
4203 +
        "1": {
4204 +
          "name": "punctuation.whitespace.comment.leading.ts"
4205 +
        },
4206 +
        "2": {
4207 +
          "name": "comment.line.double-slash.ts"
4208 +
        },
4209 +
        "3": {
4210 +
          "name": "punctuation.definition.comment.ts"
4211 +
        },
4212 +
        "4": {
4213 +
          "name": "storage.type.internaldeclaration.ts"
4214 +
        },
4215 +
        "5": {
4216 +
          "name": "punctuation.decorator.internaldeclaration.ts"
4217 +
        }
4218 +
      },
4219 +
      "contentName": "comment.line.double-slash.ts",
4220 +
      "end": "(?=^)"
4221 +
    },
4222 +
    "statements": {
4223 +
      "patterns": [
4224 +
        {
4225 +
          "include": "#declaration"
4226 +
        },
4227 +
        {
4228 +
          "include": "#control-statement"
4229 +
        },
4230 +
        {
4231 +
          "include": "#after-operator-block-as-object-literal"
4232 +
        },
4233 +
        {
4234 +
          "include": "#decl-block"
4235 +
        },
4236 +
        {
4237 +
          "include": "#label"
4238 +
        },
4239 +
        {
4240 +
          "include": "#expression"
4241 +
        },
4242 +
        {
4243 +
          "include": "#punctuation-semicolon"
4244 +
        },
4245 +
        {
4246 +
          "include": "#string"
4247 +
        },
4248 +
        {
4249 +
          "include": "#comment"
4250 +
        }
4251 +
      ]
4252 +
    },
4253 +
    "string": {
4254 +
      "patterns": [
4255 +
        {
4256 +
          "include": "#qstring-single"
4257 +
        },
4258 +
        {
4259 +
          "include": "#qstring-double"
4260 +
        },
4261 +
        {
4262 +
          "include": "#template"
4263 +
        }
4264 +
      ]
4265 +
    },
4266 +
    "string-character-escape": {
4267 +
      "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]?|.|$)",
4268 +
      "name": "constant.character.escape.ts"
4269 +
    },
4270 +
    "super-literal": {
4271 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)",
4272 +
      "name": "variable.language.super.ts"
4273 +
    },
4274 +
    "support-function-call-identifiers": {
4275 +
      "patterns": [
4276 +
        {
4277 +
          "include": "#literal"
4278 +
        },
4279 +
        {
4280 +
          "include": "#support-objects"
4281 +
        },
4282 +
        {
4283 +
          "include": "#object-identifiers"
4284 +
        },
4285 +
        {
4286 +
          "include": "#punctuation-accessor"
4287 +
        },
4288 +
        {
4289 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\(\\s*[\"'`])",
4290 +
          "name": "keyword.operator.expression.import.ts"
4291 +
        }
4292 +
      ]
4293 +
    },
4294 +
    "support-objects": {
4295 +
      "patterns": [
4296 +
        {
4297 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)",
4298 +
          "name": "variable.language.arguments.ts"
4299 +
        },
4300 +
        {
4301 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)",
4302 +
          "name": "support.class.promise.ts"
4303 +
        },
4304 +
        {
4305 +
          "captures": {
4306 +
            "1": {
4307 +
              "name": "keyword.control.import.ts"
4308 +
            },
4309 +
            "2": {
4310 +
              "name": "punctuation.accessor.ts"
4311 +
            },
4312 +
            "3": {
4313 +
              "name": "punctuation.accessor.optional.ts"
4314 +
            },
4315 +
            "4": {
4316 +
              "name": "support.variable.property.importmeta.ts"
4317 +
            }
4318 +
          },
4319 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(meta)\\b(?!\\$)"
4320 +
        },
4321 +
        {
4322 +
          "captures": {
4323 +
            "1": {
4324 +
              "name": "keyword.operator.new.ts"
4325 +
            },
4326 +
            "2": {
4327 +
              "name": "punctuation.accessor.ts"
4328 +
            },
4329 +
            "3": {
4330 +
              "name": "punctuation.accessor.optional.ts"
4331 +
            },
4332 +
            "4": {
4333 +
              "name": "support.variable.property.target.ts"
4334 +
            }
4335 +
          },
4336 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(target)\\b(?!\\$)"
4337 +
        },
4338 +
        {
4339 +
          "captures": {
4340 +
            "1": {
4341 +
              "name": "punctuation.accessor.ts"
4342 +
            },
4343 +
            "2": {
4344 +
              "name": "punctuation.accessor.optional.ts"
4345 +
            },
4346 +
            "3": {
4347 +
              "name": "support.variable.property.ts"
4348 +
            },
4349 +
            "4": {
4350 +
              "name": "support.constant.ts"
4351 +
            }
4352 +
          },
4353 +
          "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(?!\\$))"
4354 +
        },
4355 +
        {
4356 +
          "captures": {
4357 +
            "1": {
4358 +
              "name": "support.type.object.module.ts"
4359 +
            },
4360 +
            "2": {
4361 +
              "name": "support.type.object.module.ts"
4362 +
            },
4363 +
            "3": {
4364 +
              "name": "punctuation.accessor.ts"
4365 +
            },
4366 +
            "4": {
4367 +
              "name": "punctuation.accessor.optional.ts"
4368 +
            },
4369 +
            "5": {
4370 +
              "name": "support.type.object.module.ts"
4371 +
            }
4372 +
          },
4373 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)"
4374 +
        }
4375 +
      ]
4376 +
    },
4377 +
    "switch-statement": {
4378 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
4379 +
      "end": "}",
4380 +
      "endCaptures": {
4381 +
        "0": {
4382 +
          "name": "punctuation.definition.block.ts"
4383 +
        }
4384 +
      },
4385 +
      "name": "switch-statement.expr.ts",
4386 +
      "patterns": [
4387 +
        {
4388 +
          "include": "#comment"
4389 +
        },
4390 +
        {
4391 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
4392 +
          "beginCaptures": {
4393 +
            "1": {
4394 +
              "name": "keyword.control.switch.ts"
4395 +
            },
4396 +
            "2": {
4397 +
              "name": "meta.brace.round.ts"
4398 +
            }
4399 +
          },
4400 +
          "end": "\\)",
4401 +
          "endCaptures": {
4402 +
            "0": {
4403 +
              "name": "meta.brace.round.ts"
4404 +
            }
4405 +
          },
4406 +
          "name": "switch-expression.expr.ts",
4407 +
          "patterns": [
4408 +
            {
4409 +
              "include": "#expression"
4410 +
            }
4411 +
          ]
4412 +
        },
4413 +
        {
4414 +
          "begin": "\\{",
4415 +
          "beginCaptures": {
4416 +
            "0": {
4417 +
              "name": "punctuation.definition.block.ts"
4418 +
            }
4419 +
          },
4420 +
          "end": "(?=})",
4421 +
          "name": "switch-block.expr.ts",
4422 +
          "patterns": [
4423 +
            {
4424 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4425 +
              "beginCaptures": {
4426 +
                "1": {
4427 +
                  "name": "keyword.control.switch.ts"
4428 +
                }
4429 +
              },
4430 +
              "end": "(?=:)",
4431 +
              "name": "case-clause.expr.ts",
4432 +
              "patterns": [
4433 +
                {
4434 +
                  "include": "#expression"
4435 +
                }
4436 +
              ]
4437 +
            },
4438 +
            {
4439 +
              "begin": "(:)\\s*(\\{)",
4440 +
              "beginCaptures": {
4441 +
                "1": {
4442 +
                  "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
4443 +
                },
4444 +
                "2": {
4445 +
                  "name": "meta.block.ts punctuation.definition.block.ts"
4446 +
                }
4447 +
              },
4448 +
              "contentName": "meta.block.ts",
4449 +
              "end": "}",
4450 +
              "endCaptures": {
4451 +
                "0": {
4452 +
                  "name": "meta.block.ts punctuation.definition.block.ts"
4453 +
                }
4454 +
              },
4455 +
              "patterns": [
4456 +
                {
4457 +
                  "include": "#statements"
4458 +
                }
4459 +
              ]
4460 +
            },
4461 +
            {
4462 +
              "captures": {
4463 +
                "0": {
4464 +
                  "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
4465 +
                }
4466 +
              },
4467 +
              "match": "(:)"
4468 +
            },
4469 +
            {
4470 +
              "include": "#statements"
4471 +
            }
4472 +
          ]
4473 +
        }
4474 +
      ]
4475 +
    },
4476 +
    "template": {
4477 +
      "patterns": [
4478 +
        {
4479 +
          "include": "#template-call"
4480 +
        },
4481 +
        {
4482 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4483 +
          "beginCaptures": {
4484 +
            "1": {
4485 +
              "name": "entity.name.function.tagged-template.ts"
4486 +
            },
4487 +
            "2": {
4488 +
              "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4489 +
            }
4490 +
          },
4491 +
          "contentName": "string.template.ts",
4492 +
          "end": "`",
4493 +
          "endCaptures": {
4494 +
            "0": {
4495 +
              "name": "string.template.ts punctuation.definition.string.template.end.ts"
4496 +
            }
4497 +
          },
4498 +
          "patterns": [
4499 +
            {
4500 +
              "include": "#template-substitution-element"
4501 +
            },
4502 +
            {
4503 +
              "include": "#string-character-escape"
4504 +
            }
4505 +
          ]
4506 +
        }
4507 +
      ]
4508 +
    },
4509 +
    "template-call": {
4510 +
      "patterns": [
4511 +
        {
4512 +
          "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*)?`)",
4513 +
          "end": "(?=`)",
4514 +
          "patterns": [
4515 +
            {
4516 +
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))",
4517 +
              "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*)?`)",
4518 +
              "patterns": [
4519 +
                {
4520 +
                  "include": "#support-function-call-identifiers"
4521 +
                },
4522 +
                {
4523 +
                  "match": "([$_[:alpha:]][$_[:alnum:]]*)",
4524 +
                  "name": "entity.name.function.tagged-template.ts"
4525 +
                }
4526 +
              ]
4527 +
            },
4528 +
            {
4529 +
              "include": "#type-arguments"
4530 +
            }
4531 +
          ]
4532 +
        },
4533 +
        {
4534 +
          "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*)`)",
4535 +
          "beginCaptures": {
4536 +
            "1": {
4537 +
              "name": "entity.name.function.tagged-template.ts"
4538 +
            }
4539 +
          },
4540 +
          "end": "(?=`)",
4541 +
          "patterns": [
4542 +
            {
4543 +
              "include": "#type-arguments"
4544 +
            }
4545 +
          ]
4546 +
        }
4547 +
      ]
4548 +
    },
4549 +
    "template-substitution-element": {
4550 +
      "begin": "\\$\\{",
4551 +
      "beginCaptures": {
4552 +
        "0": {
4553 +
          "name": "punctuation.definition.template-expression.begin.ts"
4554 +
        }
4555 +
      },
4556 +
      "contentName": "meta.embedded.line.ts",
4557 +
      "end": "}",
4558 +
      "endCaptures": {
4559 +
        "0": {
4560 +
          "name": "punctuation.definition.template-expression.end.ts"
4561 +
        }
4562 +
      },
4563 +
      "name": "meta.template.expression.ts",
4564 +
      "patterns": [
4565 +
        {
4566 +
          "include": "#expression"
4567 +
        }
4568 +
      ]
4569 +
    },
4570 +
    "template-type": {
4571 +
      "patterns": [
4572 +
        {
4573 +
          "include": "#template-call"
4574 +
        },
4575 +
        {
4576 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4577 +
          "beginCaptures": {
4578 +
            "1": {
4579 +
              "name": "entity.name.function.tagged-template.ts"
4580 +
            },
4581 +
            "2": {
4582 +
              "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4583 +
            }
4584 +
          },
4585 +
          "contentName": "string.template.ts",
4586 +
          "end": "`",
4587 +
          "endCaptures": {
4588 +
            "0": {
4589 +
              "name": "string.template.ts punctuation.definition.string.template.end.ts"
4590 +
            }
4591 +
          },
4592 +
          "patterns": [
4593 +
            {
4594 +
              "include": "#template-type-substitution-element"
4595 +
            },
4596 +
            {
4597 +
              "include": "#string-character-escape"
4598 +
            }
4599 +
          ]
4600 +
        }
4601 +
      ]
4602 +
    },
4603 +
    "template-type-substitution-element": {
4604 +
      "begin": "\\$\\{",
4605 +
      "beginCaptures": {
4606 +
        "0": {
4607 +
          "name": "punctuation.definition.template-expression.begin.ts"
4608 +
        }
4609 +
      },
4610 +
      "contentName": "meta.embedded.line.ts",
4611 +
      "end": "}",
4612 +
      "endCaptures": {
4613 +
        "0": {
4614 +
          "name": "punctuation.definition.template-expression.end.ts"
4615 +
        }
4616 +
      },
4617 +
      "name": "meta.template.expression.ts",
4618 +
      "patterns": [
4619 +
        {
4620 +
          "include": "#type"
4621 +
        }
4622 +
      ]
4623 +
    },
4624 +
    "ternary-expression": {
4625 +
      "begin": "(?!\\?\\.\\s*\\D)(\\?)(?!\\?)",
4626 +
      "beginCaptures": {
4627 +
        "1": {
4628 +
          "name": "keyword.operator.ternary.ts"
4629 +
        }
4630 +
      },
4631 +
      "end": "\\s*(:)",
4632 +
      "endCaptures": {
4633 +
        "1": {
4634 +
          "name": "keyword.operator.ternary.ts"
4635 +
        }
4636 +
      },
4637 +
      "patterns": [
4638 +
        {
4639 +
          "include": "#expression"
4640 +
        }
4641 +
      ]
4642 +
    },
4643 +
    "this-literal": {
4644 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)",
4645 +
      "name": "variable.language.this.ts"
4646 +
    },
4647 +
    "type": {
4648 +
      "patterns": [
4649 +
        {
4650 +
          "include": "#comment"
4651 +
        },
4652 +
        {
4653 +
          "include": "#type-string"
4654 +
        },
4655 +
        {
4656 +
          "include": "#numeric-literal"
4657 +
        },
4658 +
        {
4659 +
          "include": "#type-primitive"
4660 +
        },
4661 +
        {
4662 +
          "include": "#type-builtin-literals"
4663 +
        },
4664 +
        {
4665 +
          "include": "#type-parameters"
4666 +
        },
4667 +
        {
4668 +
          "include": "#type-tuple"
4669 +
        },
4670 +
        {
4671 +
          "include": "#type-object"
4672 +
        },
4673 +
        {
4674 +
          "include": "#type-operators"
4675 +
        },
4676 +
        {
4677 +
          "include": "#type-conditional"
4678 +
        },
4679 +
        {
4680 +
          "include": "#type-fn-type-parameters"
4681 +
        },
4682 +
        {
4683 +
          "include": "#type-paren-or-function-parameters"
4684 +
        },
4685 +
        {
4686 +
          "include": "#type-function-return-type"
4687 +
        },
4688 +
        {
4689 +
          "captures": {
4690 +
            "1": {
4691 +
              "name": "storage.modifier.ts"
4692 +
            }
4693 +
          },
4694 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*"
4695 +
        },
4696 +
        {
4697 +
          "include": "#type-name"
4698 +
        }
4699 +
      ]
4700 +
    },
4701 +
    "type-alias-declaration": {
4702 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(type)\\b\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*",
4703 +
      "beginCaptures": {
4704 +
        "1": {
4705 +
          "name": "keyword.control.export.ts"
4706 +
        },
4707 +
        "2": {
4708 +
          "name": "storage.modifier.ts"
4709 +
        },
4710 +
        "3": {
4711 +
          "name": "storage.type.type.ts"
4712 +
        },
4713 +
        "4": {
4714 +
          "name": "entity.name.type.alias.ts"
4715 +
        }
4716 +
      },
4717 +
      "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)",
4718 +
      "name": "meta.type.declaration.ts",
4719 +
      "patterns": [
4720 +
        {
4721 +
          "include": "#comment"
4722 +
        },
4723 +
        {
4724 +
          "include": "#type-parameters"
4725 +
        },
4726 +
        {
4727 +
          "begin": "(=)\\s*(intrinsic)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4728 +
          "beginCaptures": {
4729 +
            "1": {
4730 +
              "name": "keyword.operator.assignment.ts"
4731 +
            },
4732 +
            "2": {
4733 +
              "name": "keyword.control.intrinsic.ts"
4734 +
            }
4735 +
          },
4736 +
          "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)",
4737 +
          "patterns": [
4738 +
            {
4739 +
              "include": "#type"
4740 +
            }
4741 +
          ]
4742 +
        },
4743 +
        {
4744 +
          "begin": "(=)\\s*",
4745 +
          "beginCaptures": {
4746 +
            "1": {
4747 +
              "name": "keyword.operator.assignment.ts"
4748 +
            }
4749 +
          },
4750 +
          "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)",
4751 +
          "patterns": [
4752 +
            {
4753 +
              "include": "#type"
4754 +
            }
4755 +
          ]
4756 +
        }
4757 +
      ]
4758 +
    },
4759 +
    "type-annotation": {
4760 +
      "patterns": [
4761 +
        {
4762 +
          "begin": "(:)(?=\\s*\\S)",
4763 +
          "beginCaptures": {
4764 +
            "1": {
4765 +
              "name": "keyword.operator.type.annotation.ts"
4766 +
            }
4767 +
          },
4768 +
          "end": "(?<![\\&:|])(?!\\s*[\\&|]\\s+)((?=^|[]),;}]|//)|(?==[^>])|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
4769 +
          "name": "meta.type.annotation.ts",
4770 +
          "patterns": [
4771 +
            {
4772 +
              "include": "#type"
4773 +
            }
4774 +
          ]
4775 +
        },
4776 +
        {
4777 +
          "begin": "(:)",
4778 +
          "beginCaptures": {
4779 +
            "1": {
4780 +
              "name": "keyword.operator.type.annotation.ts"
4781 +
            }
4782 +
          },
4783 +
          "end": "(?<![\\&:|])((?=[]),;}]|//)|(?==[^>])|(?=^\\s*$)|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
4784 +
          "name": "meta.type.annotation.ts",
4785 +
          "patterns": [
4786 +
            {
4787 +
              "include": "#type"
4788 +
            }
4789 +
          ]
4790 +
        }
4791 +
      ]
4792 +
    },
4793 +
    "type-arguments": {
4794 +
      "begin": "<",
4795 +
      "beginCaptures": {
4796 +
        "0": {
4797 +
          "name": "punctuation.definition.typeparameters.begin.ts"
4798 +
        }
4799 +
      },
4800 +
      "end": ">",
4801 +
      "endCaptures": {
4802 +
        "0": {
4803 +
          "name": "punctuation.definition.typeparameters.end.ts"
4804 +
        }
4805 +
      },
4806 +
      "name": "meta.type.parameters.ts",
4807 +
      "patterns": [
4808 +
        {
4809 +
          "include": "#type-arguments-body"
4810 +
        }
4811 +
      ]
4812 +
    },
4813 +
    "type-arguments-body": {
4814 +
      "patterns": [
4815 +
        {
4816 +
          "captures": {
4817 +
            "0": {
4818 +
              "name": "keyword.operator.type.ts"
4819 +
            }
4820 +
          },
4821 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4822 +
        },
4823 +
        {
4824 +
          "include": "#type"
4825 +
        },
4826 +
        {
4827 +
          "include": "#punctuation-comma"
4828 +
        }
4829 +
      ]
4830 +
    },
4831 +
    "type-builtin-literals": {
4832 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4833 +
      "name": "support.type.builtin.ts"
4834 +
    },
4835 +
    "type-conditional": {
4836 +
      "patterns": [
4837 +
        {
4838 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4839 +
          "beginCaptures": {
4840 +
            "1": {
4841 +
              "name": "storage.modifier.ts"
4842 +
            }
4843 +
          },
4844 +
          "end": "(?<=:)",
4845 +
          "patterns": [
4846 +
            {
4847 +
              "begin": "\\?",
4848 +
              "beginCaptures": {
4849 +
                "0": {
4850 +
                  "name": "keyword.operator.ternary.ts"
4851 +
                }
4852 +
              },
4853 +
              "end": ":",
4854 +
              "endCaptures": {
4855 +
                "0": {
4856 +
                  "name": "keyword.operator.ternary.ts"
4857 +
                }
4858 +
              },
4859 +
              "patterns": [
4860 +
                {
4861 +
                  "include": "#type"
4862 +
                }
4863 +
              ]
4864 +
            },
4865 +
            {
4866 +
              "include": "#type"
4867 +
            }
4868 +
          ]
4869 +
        }
4870 +
      ]
4871 +
    },
4872 +
    "type-fn-type-parameters": {
4873 +
      "patterns": [
4874 +
        {
4875 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*<)",
4876 +
          "beginCaptures": {
4877 +
            "1": {
4878 +
              "name": "meta.type.constructor.ts storage.modifier.ts"
4879 +
            },
4880 +
            "2": {
4881 +
              "name": "meta.type.constructor.ts keyword.control.new.ts"
4882 +
            }
4883 +
          },
4884 +
          "end": "(?<=>)",
4885 +
          "patterns": [
4886 +
            {
4887 +
              "include": "#comment"
4888 +
            },
4889 +
            {
4890 +
              "include": "#type-parameters"
4891 +
            }
4892 +
          ]
4893 +
        },
4894 +
        {
4895 +
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4896 +
          "beginCaptures": {
4897 +
            "1": {
4898 +
              "name": "storage.modifier.ts"
4899 +
            },
4900 +
            "2": {
4901 +
              "name": "keyword.control.new.ts"
4902 +
            }
4903 +
          },
4904 +
          "end": "(?<=\\))",
4905 +
          "name": "meta.type.constructor.ts",
4906 +
          "patterns": [
4907 +
            {
4908 +
              "include": "#function-parameters"
4909 +
            }
4910 +
          ]
4911 +
        },
4912 +
        {
4913 +
          "begin": "((?=\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>))))))",
4914 +
          "end": "(?<=\\))",
4915 +
          "name": "meta.type.function.ts",
4916 +
          "patterns": [
4917 +
            {
4918 +
              "include": "#function-parameters"
4919 +
            }
4920 +
          ]
4921 +
        }
4922 +
      ]
4923 +
    },
4924 +
    "type-function-return-type": {
4925 +
      "patterns": [
4926 +
        {
4927 +
          "begin": "(=>)(?=\\s*\\S)",
4928 +
          "beginCaptures": {
4929 +
            "1": {
4930 +
              "name": "storage.type.function.arrow.ts"
4931 +
            }
4932 +
          },
4933 +
          "end": "(?<!=>)(?<![\\&|])(?=[]),:;=>?{}]|//|$)",
4934 +
          "name": "meta.type.function.return.ts",
4935 +
          "patterns": [
4936 +
            {
4937 +
              "include": "#type-function-return-type-core"
4938 +
            }
4939 +
          ]
4940 +
        },
4941 +
        {
4942 +
          "begin": "=>",
4943 +
          "beginCaptures": {
4944 +
            "0": {
4945 +
              "name": "storage.type.function.arrow.ts"
4946 +
            }
4947 +
          },
4948 +
          "end": "(?<!=>)(?<![\\&|])((?=[]),:;=>?{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4949 +
          "name": "meta.type.function.return.ts",
4950 +
          "patterns": [
4951 +
            {
4952 +
              "include": "#type-function-return-type-core"
4953 +
            }
4954 +
          ]
4955 +
        }
4956 +
      ]
4957 +
    },
4958 +
    "type-function-return-type-core": {
4959 +
      "patterns": [
4960 +
        {
4961 +
          "include": "#comment"
4962 +
        },
4963 +
        {
4964 +
          "begin": "(?<==>)(?=\\s*\\{)",
4965 +
          "end": "(?<=})",
4966 +
          "patterns": [
4967 +
            {
4968 +
              "include": "#type-object"
4969 +
            }
4970 +
          ]
4971 +
        },
4972 +
        {
4973 +
          "include": "#type-predicate-operator"
4974 +
        },
4975 +
        {
4976 +
          "include": "#type"
4977 +
        }
4978 +
      ]
4979 +
    },
4980 +
    "type-infer": {
4981 +
      "patterns": [
4982 +
        {
4983 +
          "captures": {
4984 +
            "1": {
4985 +
              "name": "keyword.operator.expression.infer.ts"
4986 +
            },
4987 +
            "2": {
4988 +
              "name": "entity.name.type.ts"
4989 +
            },
4990 +
            "3": {
4991 +
              "name": "keyword.operator.expression.extends.ts"
4992 +
            }
4993 +
          },
4994 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4995 +
          "name": "meta.type.infer.ts"
4996 +
        }
4997 +
      ]
4998 +
    },
4999 +
    "type-name": {
5000 +
      "patterns": [
5001 +
        {
5002 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(<)",
5003 +
          "captures": {
5004 +
            "1": {
5005 +
              "name": "entity.name.type.module.ts"
5006 +
            },
5007 +
            "2": {
5008 +
              "name": "punctuation.accessor.ts"
5009 +
            },
5010 +
            "3": {
5011 +
              "name": "punctuation.accessor.optional.ts"
5012 +
            },
5013 +
            "4": {
5014 +
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
5015 +
            }
5016 +
          },
5017 +
          "contentName": "meta.type.parameters.ts",
5018 +
          "end": "(>)",
5019 +
          "endCaptures": {
5020 +
            "1": {
5021 +
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
5022 +
            }
5023 +
          },
5024 +
          "patterns": [
5025 +
            {
5026 +
              "include": "#type-arguments-body"
5027 +
            }
5028 +
          ]
5029 +
        },
5030 +
        {
5031 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(<)",
5032 +
          "beginCaptures": {
5033 +
            "1": {
5034 +
              "name": "entity.name.type.ts"
5035 +
            },
5036 +
            "2": {
5037 +
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
5038 +
            }
5039 +
          },
5040 +
          "contentName": "meta.type.parameters.ts",
5041 +
          "end": "(>)",
5042 +
          "endCaptures": {
5043 +
            "1": {
5044 +
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
5045 +
            }
5046 +
          },
5047 +
          "patterns": [
5048 +
            {
5049 +
              "include": "#type-arguments-body"
5050 +
            }
5051 +
          ]
5052 +
        },
5053 +
        {
5054 +
          "captures": {
5055 +
            "1": {
5056 +
              "name": "entity.name.type.module.ts"
5057 +
            },
5058 +
            "2": {
5059 +
              "name": "punctuation.accessor.ts"
5060 +
            },
5061 +
            "3": {
5062 +
              "name": "punctuation.accessor.optional.ts"
5063 +
            }
5064 +
          },
5065 +
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
5066 +
        },
5067 +
        {
5068 +
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
5069 +
          "name": "entity.name.type.ts"
5070 +
        }
5071 +
      ]
5072 +
    },
5073 +
    "type-object": {
5074 +
      "begin": "\\{",
5075 +
      "beginCaptures": {
5076 +
        "0": {
5077 +
          "name": "punctuation.definition.block.ts"
5078 +
        }
5079 +
      },
5080 +
      "end": "}",
5081 +
      "endCaptures": {
5082 +
        "0": {
5083 +
          "name": "punctuation.definition.block.ts"
5084 +
        }
5085 +
      },
5086 +
      "name": "meta.object.type.ts",
5087 +
      "patterns": [
5088 +
        {
5089 +
          "include": "#comment"
5090 +
        },
5091 +
        {
5092 +
          "include": "#method-declaration"
5093 +
        },
5094 +
        {
5095 +
          "include": "#indexer-declaration"
5096 +
        },
5097 +
        {
5098 +
          "include": "#indexer-mapped-type-declaration"
5099 +
        },
5100 +
        {
5101 +
          "include": "#field-declaration"
5102 +
        },
5103 +
        {
5104 +
          "include": "#type-annotation"
5105 +
        },
5106 +
        {
5107 +
          "begin": "\\.\\.\\.",
5108 +
          "beginCaptures": {
5109 +
            "0": {
5110 +
              "name": "keyword.operator.spread.ts"
5111 +
            }
5112 +
          },
5113 +
          "end": "(?=[,;}]|$)|(?<=})",
5114 +
          "patterns": [
5115 +
            {
5116 +
              "include": "#type"
5117 +
            }
5118 +
          ]
5119 +
        },
5120 +
        {
5121 +
          "include": "#punctuation-comma"
5122 +
        },
5123 +
        {
5124 +
          "include": "#punctuation-semicolon"
5125 +
        },
5126 +
        {
5127 +
          "include": "#type"
5128 +
        }
5129 +
      ]
5130 +
    },
5131 +
    "type-operators": {
5132 +
      "patterns": [
5133 +
        {
5134 +
          "include": "#typeof-operator"
5135 +
        },
5136 +
        {
5137 +
          "include": "#type-infer"
5138 +
        },
5139 +
        {
5140 +
          "begin": "([\\&|])(?=\\s*\\{)",
5141 +
          "beginCaptures": {
5142 +
            "0": {
5143 +
              "name": "keyword.operator.type.ts"
5144 +
            }
5145 +
          },
5146 +
          "end": "(?<=})",
5147 +
          "patterns": [
5148 +
            {
5149 +
              "include": "#type-object"
5150 +
            }
5151 +
          ]
5152 +
        },
5153 +
        {
5154 +
          "begin": "[\\&|]",
5155 +
          "beginCaptures": {
5156 +
            "0": {
5157 +
              "name": "keyword.operator.type.ts"
5158 +
            }
5159 +
          },
5160 +
          "end": "(?=\\S)"
5161 +
        },
5162 +
        {
5163 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5164 +
          "name": "keyword.operator.expression.keyof.ts"
5165 +
        },
5166 +
        {
5167 +
          "match": "([:?])",
5168 +
          "name": "keyword.operator.ternary.ts"
5169 +
        },
5170 +
        {
5171 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()",
5172 +
          "name": "keyword.operator.expression.import.ts"
5173 +
        }
5174 +
      ]
5175 +
    },
5176 +
    "type-parameters": {
5177 +
      "begin": "(<)",
5178 +
      "beginCaptures": {
5179 +
        "1": {
5180 +
          "name": "punctuation.definition.typeparameters.begin.ts"
5181 +
        }
5182 +
      },
5183 +
      "end": "(>)",
5184 +
      "endCaptures": {
5185 +
        "1": {
5186 +
          "name": "punctuation.definition.typeparameters.end.ts"
5187 +
        }
5188 +
      },
5189 +
      "name": "meta.type.parameters.ts",
5190 +
      "patterns": [
5191 +
        {
5192 +
          "include": "#comment"
5193 +
        },
5194 +
        {
5195 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5196 +
          "name": "storage.modifier.ts"
5197 +
        },
5198 +
        {
5199 +
          "include": "#type"
5200 +
        },
5201 +
        {
5202 +
          "include": "#punctuation-comma"
5203 +
        },
5204 +
        {
5205 +
          "match": "(=)(?!>)",
5206 +
          "name": "keyword.operator.assignment.ts"
5207 +
        }
5208 +
      ]
5209 +
    },
5210 +
    "type-paren-or-function-parameters": {
5211 +
      "begin": "\\(",
5212 +
      "beginCaptures": {
5213 +
        "0": {
5214 +
          "name": "meta.brace.round.ts"
5215 +
        }
5216 +
      },
5217 +
      "end": "\\)",
5218 +
      "endCaptures": {
5219 +
        "0": {
5220 +
          "name": "meta.brace.round.ts"
5221 +
        }
5222 +
      },
5223 +
      "name": "meta.type.paren.cover.ts",
5224 +
      "patterns": [
5225 +
        {
5226 +
          "captures": {
5227 +
            "1": {
5228 +
              "name": "storage.modifier.ts"
5229 +
            },
5230 +
            "2": {
5231 +
              "name": "keyword.operator.rest.ts"
5232 +
            },
5233 +
            "3": {
5234 +
              "name": "entity.name.function.ts variable.language.this.ts"
5235 +
            },
5236 +
            "4": {
5237 +
              "name": "entity.name.function.ts"
5238 +
            },
5239 +
            "5": {
5240 +
              "name": "keyword.operator.optional.ts"
5241 +
            }
5242 +
          },
5243 +
          "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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*))))))))"
5244 +
        },
5245 +
        {
5246 +
          "captures": {
5247 +
            "1": {
5248 +
              "name": "storage.modifier.ts"
5249 +
            },
5250 +
            "2": {
5251 +
              "name": "keyword.operator.rest.ts"
5252 +
            },
5253 +
            "3": {
5254 +
              "name": "variable.parameter.ts variable.language.this.ts"
5255 +
            },
5256 +
            "4": {
5257 +
              "name": "variable.parameter.ts"
5258 +
            },
5259 +
            "5": {
5260 +
              "name": "keyword.operator.optional.ts"
5261 +
            }
5262 +
          },
5263 +
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s*(\\??)(?=:)"
5264 +
        },
5265 +
        {
5266 +
          "include": "#type-annotation"
5267 +
        },
5268 +
        {
5269 +
          "match": ",",
5270 +
          "name": "punctuation.separator.parameter.ts"
5271 +
        },
5272 +
        {
5273 +
          "include": "#type"
5274 +
        }
5275 +
      ]
5276 +
    },
5277 +
    "type-predicate-operator": {
5278 +
      "patterns": [
5279 +
        {
5280 +
          "captures": {
5281 +
            "1": {
5282 +
              "name": "keyword.operator.type.asserts.ts"
5283 +
            },
5284 +
            "2": {
5285 +
              "name": "variable.parameter.ts variable.language.this.ts"
5286 +
            },
5287 +
            "3": {
5288 +
              "name": "variable.parameter.ts"
5289 +
            },
5290 +
            "4": {
5291 +
              "name": "keyword.operator.expression.is.ts"
5292 +
            }
5293 +
          },
5294 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s(is)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5295 +
        },
5296 +
        {
5297 +
          "captures": {
5298 +
            "1": {
5299 +
              "name": "keyword.operator.type.asserts.ts"
5300 +
            },
5301 +
            "2": {
5302 +
              "name": "variable.parameter.ts variable.language.this.ts"
5303 +
            },
5304 +
            "3": {
5305 +
              "name": "variable.parameter.ts"
5306 +
            }
5307 +
          },
5308 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5309 +
        },
5310 +
        {
5311 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5312 +
          "name": "keyword.operator.type.asserts.ts"
5313 +
        },
5314 +
        {
5315 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5316 +
          "name": "keyword.operator.expression.is.ts"
5317 +
        }
5318 +
      ]
5319 +
    },
5320 +
    "type-primitive": {
5321 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5322 +
      "name": "support.type.primitive.ts"
5323 +
    },
5324 +
    "type-string": {
5325 +
      "patterns": [
5326 +
        {
5327 +
          "include": "#qstring-single"
5328 +
        },
5329 +
        {
5330 +
          "include": "#qstring-double"
5331 +
        },
5332 +
        {
5333 +
          "include": "#template-type"
5334 +
        }
5335 +
      ]
5336 +
    },
5337 +
    "type-tuple": {
5338 +
      "begin": "\\[",
5339 +
      "beginCaptures": {
5340 +
        "0": {
5341 +
          "name": "meta.brace.square.ts"
5342 +
        }
5343 +
      },
5344 +
      "end": "]",
5345 +
      "endCaptures": {
5346 +
        "0": {
5347 +
          "name": "meta.brace.square.ts"
5348 +
        }
5349 +
      },
5350 +
      "name": "meta.type.tuple.ts",
5351 +
      "patterns": [
5352 +
        {
5353 +
          "match": "\\.\\.\\.",
5354 +
          "name": "keyword.operator.rest.ts"
5355 +
        },
5356 +
        {
5357 +
          "captures": {
5358 +
            "1": {
5359 +
              "name": "entity.name.label.ts"
5360 +
            },
5361 +
            "2": {
5362 +
              "name": "keyword.operator.optional.ts"
5363 +
            },
5364 +
            "3": {
5365 +
              "name": "punctuation.separator.label.ts"
5366 +
            }
5367 +
          },
5368 +
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([$_[:alpha:]][$_[:alnum:]]*)\\s*(\\?)?\\s*(:)"
5369 +
        },
5370 +
        {
5371 +
          "include": "#type"
5372 +
        },
5373 +
        {
5374 +
          "include": "#punctuation-comma"
5375 +
        }
5376 +
      ]
5377 +
    },
5378 +
    "typeof-operator": {
5379 +
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5380 +
      "beginCaptures": {
5381 +
        "0": {
5382 +
          "name": "keyword.operator.expression.typeof.ts"
5383 +
        }
5384 +
      },
5385 +
      "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)",
5386 +
      "patterns": [
5387 +
        {
5388 +
          "include": "#type-arguments"
5389 +
        },
5390 +
        {
5391 +
          "include": "#expression"
5392 +
        }
5393 +
      ]
5394 +
    },
5395 +
    "undefined-literal": {
5396 +
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5397 +
      "name": "constant.language.undefined.ts"
5398 +
    },
5399 +
    "var-expr": {
5400 +
      "patterns": [
5401 +
        {
5402 +
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5403 +
          "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*$)))",
5404 +
          "name": "meta.var.expr.ts",
5405 +
          "patterns": [
5406 +
            {
5407 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5408 +
              "beginCaptures": {
5409 +
                "1": {
5410 +
                  "name": "keyword.control.export.ts"
5411 +
                },
5412 +
                "2": {
5413 +
                  "name": "storage.modifier.ts"
5414 +
                },
5415 +
                "3": {
5416 +
                  "name": "storage.type.ts"
5417 +
                }
5418 +
              },
5419 +
              "end": "(?=\\S)"
5420 +
            },
5421 +
            {
5422 +
              "include": "#destructuring-variable"
5423 +
            },
5424 +
            {
5425 +
              "include": "#var-single-variable"
5426 +
            },
5427 +
            {
5428 +
              "include": "#variable-initializer"
5429 +
            },
5430 +
            {
5431 +
              "include": "#comment"
5432 +
            },
5433 +
            {
5434 +
              "begin": "(,)\\s*(?=$|//)",
5435 +
              "beginCaptures": {
5436 +
                "1": {
5437 +
                  "name": "punctuation.separator.comma.ts"
5438 +
                }
5439 +
              },
5440 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5441 +
              "patterns": [
5442 +
                {
5443 +
                  "include": "#single-line-comment-consuming-line-ending"
5444 +
                },
5445 +
                {
5446 +
                  "include": "#comment"
5447 +
                },
5448 +
                {
5449 +
                  "include": "#destructuring-variable"
5450 +
                },
5451 +
                {
5452 +
                  "include": "#var-single-variable"
5453 +
                },
5454 +
                {
5455 +
                  "include": "#punctuation-comma"
5456 +
                }
5457 +
              ]
5458 +
            },
5459 +
            {
5460 +
              "include": "#punctuation-comma"
5461 +
            }
5462 +
          ]
5463 +
        },
5464 +
        {
5465 +
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5466 +
          "beginCaptures": {
5467 +
            "1": {
5468 +
              "name": "keyword.control.export.ts"
5469 +
            },
5470 +
            "2": {
5471 +
              "name": "storage.modifier.ts"
5472 +
            },
5473 +
            "3": {
5474 +
              "name": "storage.type.ts"
5475 +
            }
5476 +
          },
5477 +
          "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*$)))",
5478 +
          "name": "meta.var.expr.ts",
5479 +
          "patterns": [
5480 +
            {
5481 +
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5482 +
              "beginCaptures": {
5483 +
                "1": {
5484 +
                  "name": "keyword.control.export.ts"
5485 +
                },
5486 +
                "2": {
5487 +
                  "name": "storage.modifier.ts"
5488 +
                },
5489 +
                "3": {
5490 +
                  "name": "storage.type.ts"
5491 +
                }
5492 +
              },
5493 +
              "end": "(?=\\S)"
5494 +
            },
5495 +
            {
5496 +
              "include": "#destructuring-const"
5497 +
            },
5498 +
            {
5499 +
              "include": "#var-single-const"
5500 +
            },
5501 +
            {
5502 +
              "include": "#variable-initializer"
5503 +
            },
5504 +
            {
5505 +
              "include": "#comment"
5506 +
            },
5507 +
            {
5508 +
              "begin": "(,)\\s*(?=$|//)",
5509 +
              "beginCaptures": {
5510 +
                "1": {
5511 +
                  "name": "punctuation.separator.comma.ts"
5512 +
                }
5513 +
              },
5514 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5515 +
              "patterns": [
5516 +
                {
5517 +
                  "include": "#single-line-comment-consuming-line-ending"
5518 +
                },
5519 +
                {
5520 +
                  "include": "#comment"
5521 +
                },
5522 +
                {
5523 +
                  "include": "#destructuring-const"
5524 +
                },
5525 +
                {
5526 +
                  "include": "#var-single-const"
5527 +
                },
5528 +
                {
5529 +
                  "include": "#punctuation-comma"
5530 +
                }
5531 +
              ]
5532 +
            },
5533 +
            {
5534 +
              "include": "#punctuation-comma"
5535 +
            }
5536 +
          ]
5537 +
        },
5538 +
        {
5539 +
          "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:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5540 +
          "beginCaptures": {
5541 +
            "1": {
5542 +
              "name": "keyword.control.export.ts"
5543 +
            },
5544 +
            "2": {
5545 +
              "name": "storage.modifier.ts"
5546 +
            },
5547 +
            "3": {
5548 +
              "name": "storage.type.ts"
5549 +
            }
5550 +
          },
5551 +
          "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*$)))",
5552 +
          "name": "meta.var.expr.ts",
5553 +
          "patterns": [
5554 +
            {
5555 +
              "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*",
5556 +
              "beginCaptures": {
5557 +
                "1": {
5558 +
                  "name": "keyword.control.export.ts"
5559 +
                },
5560 +
                "2": {
5561 +
                  "name": "storage.modifier.ts"
5562 +
                },
5563 +
                "3": {
5564 +
                  "name": "storage.type.ts"
5565 +
                }
5566 +
              },
5567 +
              "end": "(?=\\S)"
5568 +
            },
5569 +
            {
5570 +
              "include": "#var-single-const"
5571 +
            },
5572 +
            {
5573 +
              "include": "#variable-initializer"
5574 +
            },
5575 +
            {
5576 +
              "include": "#comment"
5577 +
            },
5578 +
            {
5579 +
              "begin": "(,)\\s*((?!\\S)|(?=//))",
5580 +
              "beginCaptures": {
5581 +
                "1": {
5582 +
                  "name": "punctuation.separator.comma.ts"
5583 +
                }
5584 +
              },
5585 +
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5586 +
              "patterns": [
5587 +
                {
5588 +
                  "include": "#single-line-comment-consuming-line-ending"
5589 +
                },
5590 +
                {
5591 +
                  "include": "#comment"
5592 +
                },
5593 +
                {
5594 +
                  "include": "#var-single-const"
5595 +
                },
5596 +
                {
5597 +
                  "include": "#punctuation-comma"
5598 +
                }
5599 +
              ]
5600 +
            },
5601 +
            {
5602 +
              "include": "#punctuation-comma"
5603 +
            }
5604 +
          ]
5605 +
        }
5606 +
      ]
5607 +
    },
5608 +
    "var-single-const": {
5609 +
      "patterns": [
5610 +
        {
5611 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5612 +
          "beginCaptures": {
5613 +
            "1": {
5614 +
              "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts"
5615 +
            }
5616 +
          },
5617 +
          "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))",
5618 +
          "name": "meta.var-single-variable.expr.ts",
5619 +
          "patterns": [
5620 +
            {
5621 +
              "include": "#var-single-variable-type-annotation"
5622 +
            }
5623 +
          ]
5624 +
        },
5625 +
        {
5626 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
5627 +
          "beginCaptures": {
5628 +
            "1": {
5629 +
              "name": "meta.definition.variable.ts variable.other.constant.ts"
5630 +
            }
5631 +
          },
5632 +
          "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))",
5633 +
          "name": "meta.var-single-variable.expr.ts",
5634 +
          "patterns": [
5635 +
            {
5636 +
              "include": "#var-single-variable-type-annotation"
5637 +
            }
5638 +
          ]
5639 +
        }
5640 +
      ]
5641 +
    },
5642 +
    "var-single-variable": {
5643 +
      "patterns": [
5644 +
        {
5645 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\s*)?(((<\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\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*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5646 +
          "beginCaptures": {
5647 +
            "1": {
5648 +
              "name": "meta.definition.variable.ts entity.name.function.ts"
5649 +
            },
5650 +
            "2": {
5651 +
              "name": "keyword.operator.definiteassignment.ts"
5652 +
            }
5653 +
          },
5654 +
          "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))",
5655 +
          "name": "meta.var-single-variable.expr.ts",
5656 +
          "patterns": [
5657 +
            {
5658 +
              "include": "#var-single-variable-type-annotation"
5659 +
            }
5660 +
          ]
5661 +
        },
5662 +
        {
5663 +
          "begin": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])(!)?",
5664 +
          "beginCaptures": {
5665 +
            "1": {
5666 +
              "name": "meta.definition.variable.ts variable.other.constant.ts"
5667 +
            },
5668 +
            "2": {
5669 +
              "name": "keyword.operator.definiteassignment.ts"
5670 +
            }
5671 +
          },
5672 +
          "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))",
5673 +
          "name": "meta.var-single-variable.expr.ts",
5674 +
          "patterns": [
5675 +
            {
5676 +
              "include": "#var-single-variable-type-annotation"
5677 +
            }
5678 +
          ]
5679 +
        },
5680 +
        {
5681 +
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?",
5682 +
          "beginCaptures": {
5683 +
            "1": {
5684 +
              "name": "meta.definition.variable.ts variable.other.readwrite.ts"
5685 +
            },
5686 +
            "2": {
5687 +
              "name": "keyword.operator.definiteassignment.ts"
5688 +
            }
5689 +
          },
5690 +
          "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))",
5691 +
          "name": "meta.var-single-variable.expr.ts",
5692 +
          "patterns": [
5693 +
            {
5694 +
              "include": "#var-single-variable-type-annotation"
5695 +
            }
5696 +
          ]
5697 +
        }
5698 +
      ]
5699 +
    },
5700 +
    "var-single-variable-type-annotation": {
5701 +
      "patterns": [
5702 +
        {
5703 +
          "include": "#type-annotation"
5704 +
        },
5705 +
        {
5706 +
          "include": "#string"
5707 +
        },
5708 +
        {
5709 +
          "include": "#comment"
5710 +
        }
5711 +
      ]
5712 +
    },
5713 +
    "variable-initializer": {
5714 +
      "patterns": [
5715 +
        {
5716 +
          "begin": "(?<![!=])(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
5717 +
          "beginCaptures": {
5718 +
            "1": {
5719 +
              "name": "keyword.operator.assignment.ts"
5720 +
            }
5721 +
          },
5722 +
          "end": "(?=$|^|[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
5723 +
          "patterns": [
5724 +
            {
5725 +
              "include": "#expression"
5726 +
            }
5727 +
          ]
5728 +
        },
5729 +
        {
5730 +
          "begin": "(?<![!=])(=)(?!=)",
5731 +
          "beginCaptures": {
5732 +
            "1": {
5733 +
              "name": "keyword.operator.assignment.ts"
5734 +
            }
5735 +
          },
5736 +
          "end": "(?=[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![-\\&*+/|])(?<=\\S)(?<!=)(?=\\s*$)",
5737 +
          "patterns": [
5738 +
            {
5739 +
              "include": "#expression"
5740 +
            }
5741 +
          ]
5742 +
        }
5743 +
      ]
5744 +
    }
5745 +
  },
5746 +
  "scopeName": "source.ts"
5747 +
}
crates/diff/src/themes/rustik-catppuccin-mocha.json +37 -7
592 592
    },
593 593
    "generic.attribute:rust": {
594 594
      "foreground": "#cdd6f4"
595 595
    },
596 596
    "heading": {
597 -
      "foreground": "#f38ba8"
597 +
      "fontStyle": "bold",
598 +
      "foreground": "#cdd6f4"
598 599
    },
599 600
    "number": {
600 601
      "foreground": "#fab387"
601 602
    },
602 603
    "pol": {
708 709
      }
709 710
    },
710 711
    {
711 712
      "scope": [
712 713
        "constant.numeric",
714 +
        "constant.other.color",
713 715
        "variable.other.constant",
714 716
        "entity.name.constant",
715 717
        "constant.language.boolean",
716 718
        "constant.language.false",
717 719
        "constant.language.true",
720 +
        "support.constant.color",
721 +
        "keyword.other.unit",
718 722
        "keyword.other.unit.user-defined",
719 723
        "keyword.other.unit.suffix.floating-point"
720 724
      ],
721 725
      "settings": {
722 726
        "foreground": "#fab387"
849 853
        "foreground": "#f38ba8"
850 854
      }
851 855
    },
852 856
    {
853 857
      "scope": [
858 +
        "keyword.control.at-rule",
854 859
        "keyword.control.directive",
855 860
        "punctuation.definition.directive"
856 861
      ],
857 862
      "settings": {
858 863
        "foreground": "#f9e2af"
881 886
      "settings": {
882 887
        "fontStyle": "",
883 888
        "foreground": "#89b4fa"
884 889
      }
885 890
    },
891 +
    {
892 +
      "scope": [
893 +
        "entity.other.keyframe-offset.css",
894 +
        "variable.parameter.keyframe-list.css"
895 +
      ],
896 +
      "settings": {
897 +
        "foreground": "#f5c2e7"
898 +
      }
899 +
    },
886 900
    {
887 901
      "scope": [
888 902
        "variable.language.this",
889 903
        "variable.language.this punctuation.definition.variable"
890 904
      ],
1449 1463
        "markup.heading.atx.1.mdx punctuation.definition.heading.mdx",
1450 1464
        "markup.heading.setext.1.markdown",
1451 1465
        "markup.heading.heading-0.asciidoc"
1452 1466
      ],
1453 1467
      "settings": {
1454 -
        "foreground": "#f38ba8"
1468 +
        "fontStyle": "bold",
1469 +
        "foreground": "#cdd6f4"
1455 1470
      }
1456 1471
    },
1457 1472
    {
1458 1473
      "scope": [
1459 1474
        "heading.2.markdown punctuation.definition.heading.markdown",
1464 1479
        "markup.heading.atx.2.mdx punctuation.definition.heading.mdx",
1465 1480
        "markup.heading.setext.2.markdown",
1466 1481
        "markup.heading.heading-1.asciidoc"
1467 1482
      ],
1468 1483
      "settings": {
1469 -
        "foreground": "#fab387"
1484 +
        "fontStyle": "bold",
1485 +
        "foreground": "#cdd6f4"
1470 1486
      }
1471 1487
    },
1472 1488
    {
1473 1489
      "scope": [
1474 1490
        "heading.3.markdown punctuation.definition.heading.markdown",
1478 1494
        "markup.heading.atx.3.mdx",
1479 1495
        "markup.heading.atx.3.mdx punctuation.definition.heading.mdx",
1480 1496
        "markup.heading.heading-2.asciidoc"
1481 1497
      ],
1482 1498
      "settings": {
1483 -
        "foreground": "#f9e2af"
1499 +
        "fontStyle": "bold",
1500 +
        "foreground": "#cdd6f4"
1484 1501
      }
1485 1502
    },
1486 1503
    {
1487 1504
      "scope": [
1488 1505
        "heading.4.markdown punctuation.definition.heading.markdown",
1492 1509
        "markup.heading.atx.4.mdx",
1493 1510
        "markup.heading.atx.4.mdx punctuation.definition.heading.mdx",
1494 1511
        "markup.heading.heading-3.asciidoc"
1495 1512
      ],
1496 1513
      "settings": {
1497 -
        "foreground": "#a6e3a1"
1514 +
        "fontStyle": "bold",
1515 +
        "foreground": "#cdd6f4"
1498 1516
      }
1499 1517
    },
1500 1518
    {
1501 1519
      "scope": [
1502 1520
        "heading.5.markdown punctuation.definition.heading.markdown",
1506 1524
        "markup.heading.atx.5.mdx",
1507 1525
        "markup.heading.atx.5.mdx punctuation.definition.heading.mdx",
1508 1526
        "markup.heading.heading-4.asciidoc"
1509 1527
      ],
1510 1528
      "settings": {
1511 -
        "foreground": "#74c7ec"
1529 +
        "fontStyle": "bold",
1530 +
        "foreground": "#cdd6f4"
1512 1531
      }
1513 1532
    },
1514 1533
    {
1515 1534
      "scope": [
1516 1535
        "heading.6.markdown punctuation.definition.heading.markdown",
1520 1539
        "markup.heading.atx.6.mdx",
1521 1540
        "markup.heading.atx.6.mdx punctuation.definition.heading.mdx",
1522 1541
        "markup.heading.heading-5.asciidoc"
1523 1542
      ],
1524 1543
      "settings": {
1525 -
        "foreground": "#b4befe"
1544 +
        "fontStyle": "bold",
1545 +
        "foreground": "#cdd6f4"
1546 +
      }
1547 +
    },
1548 +
    {
1549 +
      "scope": [
1550 +
        "markup.heading.markdown",
1551 +
        "entity.name.section.markdown"
1552 +
      ],
1553 +
      "settings": {
1554 +
        "fontStyle": "bold",
1555 +
        "foreground": "#cdd6f4"
1526 1556
      }
1527 1557
    },
1528 1558
    {
1529 1559
      "scope": "markup.bold",
1530 1560
      "settings": {
crates/diff/src/viewer.rs +180 -4
15 15
    Buffer, Cell, Color, Constraint, Control, Event, HStack, Key, Label, Line, Mouse, MouseButton,
16 16
    Placement, Rect, Scroll, ScrollView, ScrollbarStyle, Size, Style, Table, TableOptions, Text,
17 17
    VStack, View, Viewport, Widget, colors,
18 18
};
19 19
20 -
use crate::context::{ContextChange, ContextState};
20 +
use crate::context::{ContextChange, ContextState, FULL_CONTEXT_LINES};
21 21
use crate::highlight::{DiffHighlighter, HighlightKeyInput, HighlightResult};
22 22
use crate::word;
23 23
use crate::{
24 24
    Commit, Decode, DecodeError, DiffDocument, DiffLine, DiffLineKind, DiffSide, FileDiff, FileId,
25 25
    FileKind, HighlightKey, HighlightRequest, HighlightSource, Hunk, HunkId, RowId,
212 212
    state: DiffState,
213 213
    /// Highlighted row cache.
214 214
    highlights: BTreeMap<HighlightKey, Line>,
215 215
    /// Requests already handed to a worker.
216 216
    pending_highlights: BTreeSet<HighlightKey>,
217 +
    /// File-side full-context sources used only for syntax highlighting.
218 +
    full_highlight_sources: BTreeMap<(FileId, DiffSide), HighlightSource>,
219 +
    /// Per-hunk source context reused across highlight-request batches.
220 +
    hunk_highlight_sources: BTreeMap<(FileId, HunkId, DiffSide), HighlightSource>,
217 221
    /// Cached intra-line word diffs, keyed by hunk.
218 222
    word_diffs: BTreeMap<HunkId, word::WordChanges>,
219 223
    /// Rendered commit-preamble rows for the most recent body width.
220 224
    preamble: Vec<Line>,
221 225
    /// File-tree pane state and model.
320 324
    file: FileId,
321 325
    /// Hunk containing the row.
322 326
    hunk: HunkId,
323 327
    /// Row identifier.
324 328
    row: RowId,
329 +
    /// Line role inside the hunk.
330 +
    kind: DiffLineKind,
325 331
    /// Source side used for highlighting.
326 332
    side: DiffSide,
327 333
    /// One-based source line number.
328 334
    source_line: u32,
329 335
    /// Source text.
426 432
            document,
427 433
            options,
428 434
            state,
429 435
            highlights: BTreeMap::new(),
430 436
            pending_highlights: BTreeSet::new(),
437 +
            full_highlight_sources: BTreeMap::new(),
438 +
            hunk_highlight_sources: BTreeMap::new(),
431 439
            word_diffs: BTreeMap::new(),
432 440
            preamble,
433 441
            file_tree,
434 442
            file_tree_visibility: FileTreeVisibility::default(),
435 443
            index: RowIndex::default(),
475 483
            if let Some(existing) = existing {
476 484
                *existing = replacement;
477 485
            }
478 486
        }
479 487
        self.pending_highlights.clear();
488 +
        self.full_highlight_sources.clear();
489 +
        self.hunk_highlight_sources.clear();
480 490
        self.word_diffs.clear();
481 491
        self.rebuild_index();
482 492
    }
483 493
484 494
    /// Expands or contracts hunk context, refetching diffs through `repo`.
642 652
643 653
    /// Applies an action to the viewer state.
644 654
    pub fn apply(&mut self, action: DiffAction, area: Rect) -> ViewChange {
645 655
        let before = self.state.clone();
646 656
        let before_visibility = self.file_tree_visibility;
647 -
        let before_file_tree = self.file_tree.clone();
657 +
        let before_file_tree = self.file_tree.state().clone();
648 658
        let layout = self.layout(area);
649 659
        let diff = layout.diff;
650 660
651 661
        match action {
652 662
            DiffAction::Scroll(scroll) => {
729 739
            self.rebuild_index();
730 740
            self.state.scroll = View::new(self.state.scroll, self.index.rows, diff.rows).offset;
731 741
        }
732 742
        if self.state == before
733 743
            && self.file_tree_visibility == before_visibility
734 -
            && self.file_tree == before_file_tree
744 +
            && *self.file_tree.state() == before_file_tree
735 745
        {
736 746
            ViewChange::Unchanged
737 747
        } else {
738 748
            ViewChange::Changed
739 749
        }
910 920
            let key = self.key_for(&meta);
911 921
            if self.highlights.contains_key(&key) || self.pending_highlights.contains(&key) {
912 922
                continue;
913 923
            }
914 924
            self.pending_highlights.insert(key.clone());
925 +
            let source = self.highlight_source_for(&meta);
915 926
            requests.push(HighlightRequest {
916 927
                key,
917 928
                hunk: meta.hunk,
918 929
                row: meta.row,
919 930
                path: meta.path,
920 -
                source: HighlightSource::new(meta.text, meta.source_line),
931 +
                source,
921 932
            });
922 933
        }
923 934
        requests
924 935
    }
925 936
937 +
    /// Returns highlight requests enriched with repo-backed full file context.
938 +
    pub fn highlight_requests_with_repo(
939 +
        &mut self,
940 +
        area: Rect,
941 +
        repo: &dyn Repo,
942 +
    ) -> Vec<HighlightRequest> {
943 +
        let mut requests = self.highlight_requests(area);
944 +
        self.load_full_highlight_sources(&requests, repo);
945 +
946 +
        for request in &mut requests {
947 +
            let key = (request.key.file, request.key.side);
948 +
            if let Some(source) = self.full_highlight_sources.get(&key)
949 +
                && source.line(request.key.source_line)
950 +
                    == request.source.line(request.key.source_line)
951 +
            {
952 +
                request.source = source.clone();
953 +
            }
954 +
        }
955 +
        requests
956 +
    }
957 +
926 958
    /// Marks unprocessed highlight requests as requestable again.
927 959
    pub fn cancel_highlights(&mut self, requests: impl IntoIterator<Item = HighlightRequest>) {
928 960
        for request in requests {
929 961
            self.pending_highlights.remove(&request.key);
930 962
        }
931 963
    }
932 964
965 +
    /// Loads full-context source text for highlighted files.
966 +
    fn load_full_highlight_sources(&mut self, requests: &[HighlightRequest], repo: &dyn Repo) {
967 +
        let mut targets = BTreeMap::new();
968 +
        for request in requests {
969 +
            let key = (request.key.file, request.key.side);
970 +
            if self.full_highlight_sources.contains_key(&key) {
971 +
                continue;
972 +
            }
973 +
            if let Some(path) = request.path.as_deref() {
974 +
                targets.insert((path.to_path_buf(), request.key.side), request.key.file);
975 +
            }
976 +
        }
977 +
        if targets.is_empty() {
978 +
            return;
979 +
        }
980 +
981 +
        let paths = targets
982 +
            .keys()
983 +
            .map(|(path, _)| path.as_path())
984 +
            .collect::<BTreeSet<_>>()
985 +
            .into_iter()
986 +
            .collect::<Vec<_>>();
987 +
        let Ok(patch) = repo.diff(FULL_CONTEXT_LINES, &paths) else {
988 +
            return;
989 +
        };
990 +
        let Ok(document) = DiffDocument::decode_bytes(&patch) else {
991 +
            return;
992 +
        };
993 +
994 +
        for file in &document.files {
995 +
            for side in [DiffSide::Old, DiffSide::New] {
996 +
                let Some(path) = file.source_path(side) else {
997 +
                    continue;
998 +
                };
999 +
                let Some(file_id) = targets.get(&(path, side)).copied() else {
1000 +
                    continue;
1001 +
                };
1002 +
                let Some(source) = Self::file_highlight_source(file, side) else {
1003 +
                    continue;
1004 +
                };
1005 +
                self.full_highlight_sources.insert((file_id, side), source);
1006 +
            }
1007 +
        }
1008 +
    }
1009 +
933 1010
    /// Returns the highlight-cache key for one diff row.
934 1011
    fn key_for(&self, meta: &DiffLineMeta) -> HighlightKey {
935 1012
        HighlightKey::new(HighlightKeyInput {
936 1013
            file: meta.file,
937 1014
            side: meta.side,
940 1017
            syntax: self.options.syntax.as_deref(),
941 1018
            theme: &self.options.theme,
942 1019
        })
943 1020
    }
944 1021
1022 +
    /// Returns hunk-side source context for a highlighted row.
1023 +
    ///
1024 +
    /// Hunk sources are cached on the viewer so scrolling through a hunk does
1025 +
    /// not rebuild its source text on every highlight-request batch.
1026 +
    fn highlight_source_for(&mut self, meta: &DiffLineMeta) -> HighlightSource {
1027 +
        if meta.kind == DiffLineKind::NoNewline {
1028 +
            return meta.single_row_source();
1029 +
        }
1030 +
        let key = (meta.file, meta.hunk, meta.side);
1031 +
        if let Some(source) = self.hunk_highlight_sources.get(&key) {
1032 +
            return source.clone();
1033 +
        }
1034 +
        let source = self.build_highlight_source(meta);
1035 +
        self.hunk_highlight_sources.insert(key, source.clone());
1036 +
        source
1037 +
    }
1038 +
1039 +
    /// Builds source text for one hunk side.
1040 +
    fn build_highlight_source(&self, meta: &DiffLineMeta) -> HighlightSource {
1041 +
        let Some(file) = self.document.files.get(*meta.file) else {
1042 +
            return meta.single_row_source();
1043 +
        };
1044 +
        let Some(hunk) = file.hunks.iter().find(|hunk| hunk.id == meta.hunk) else {
1045 +
            return meta.single_row_source();
1046 +
        };
1047 +
        Self::hunk_highlight_source(hunk, meta.side)
1048 +
    }
1049 +
1050 +
    /// Builds contiguous source text for one file side.
1051 +
    fn file_highlight_source(file: &FileDiff, side: DiffSide) -> Option<HighlightSource> {
1052 +
        let mut text = String::new();
1053 +
        let mut head = None;
1054 +
        let mut next_line = None;
1055 +
1056 +
        for hunk in &file.hunks {
1057 +
            let hunk_head = Self::hunk_head(hunk, side);
1058 +
            if next_line.is_some_and(|line| line != hunk_head) {
1059 +
                return None;
1060 +
            }
1061 +
            if head.is_none() {
1062 +
                head = Some(hunk_head);
1063 +
            }
1064 +
            Self::push_hunk_source_lines(hunk, side, &mut text);
1065 +
            let len = hunk
1066 +
                .lines
1067 +
                .iter()
1068 +
                .map(|line| Self::source_len(line, side))
1069 +
                .sum::<u32>();
1070 +
            next_line = Some(hunk_head + len);
1071 +
        }
1072 +
1073 +
        head.map(|head| HighlightSource::new(text, head))
1074 +
    }
1075 +
1076 +
    /// Builds source text for one hunk side.
1077 +
    fn hunk_highlight_source(hunk: &Hunk, side: DiffSide) -> HighlightSource {
1078 +
        let head = Self::hunk_head(hunk, side);
1079 +
        let mut text = String::new();
1080 +
1081 +
        Self::push_hunk_source_lines(hunk, side, &mut text);
1082 +
        HighlightSource::new(text, head)
1083 +
    }
1084 +
1085 +
    /// Appends source-side hunk lines to `text`.
1086 +
    fn push_hunk_source_lines(hunk: &Hunk, side: DiffSide, text: &mut String) {
1087 +
        for line in &hunk.lines {
1088 +
            if Self::source_len(line, side) == 0 {
1089 +
                continue;
1090 +
            }
1091 +
            if !text.is_empty() {
1092 +
                text.push('\n');
1093 +
            }
1094 +
            text.push_str(&line.text);
1095 +
        }
1096 +
    }
1097 +
1098 +
    /// Returns the first source line for one hunk side.
1099 +
    fn hunk_head(hunk: &Hunk, side: DiffSide) -> u32 {
1100 +
        match side {
1101 +
            DiffSide::Old => hunk.header.old_line_no,
1102 +
            DiffSide::New => hunk.header.new_line_no,
1103 +
        }
1104 +
    }
1105 +
1106 +
    /// Returns how many source lines a diff line contributes on `side`.
1107 +
    fn source_len(line: &DiffLine, side: DiffSide) -> u32 {
1108 +
        match side {
1109 +
            DiffSide::Old => line.kind.old_len(),
1110 +
            DiffSide::New => line.kind.new_len(),
1111 +
        }
1112 +
    }
1113 +
945 1114
    /// Merges highlighted rows and returns whether a redraw is needed.
946 1115
    ///
947 1116
    /// The word-diff overlay is applied here, once, so the cached `Line` is
948 1117
    /// ready to render with no per-frame merge work. All paths that write to the
949 1118
    /// cached highlighted rows keep this invariant: cached lines are render-ready
1767 1936
        };
1768 1937
        Self {
1769 1938
            file: file.id,
1770 1939
            hunk,
1771 1940
            row: line.id,
1941 +
            kind: line.kind,
1772 1942
            side,
1773 1943
            source_line,
1774 1944
            text: line.text.clone(),
1775 1945
            path: file.source_path(side),
1776 1946
        }
1777 1947
    }
1948 +
1949 +
    /// Builds a single-row highlight source from this line's own text.
1950 +
    fn single_row_source(&self) -> HighlightSource {
1951 +
        HighlightSource::new(self.text.clone(), self.source_line)
1952 +
    }
1778 1953
}
1779 1954
1780 1955
#[cfg(test)]
1781 1956
#[allow(clippy::unwrap_used)]
1782 1957
mod tests {
1783 1958
    use std::collections::BTreeSet;
1784 1959
    use std::path::PathBuf;
1960 +
    use std::str::FromStr;
1785 1961
1786 1962
    use super::*;
1787 1963
1788 1964
    use crate::Decode;
1789 1965
    use crate::DiffDocument;
a.rs +0 -0
a.rs +0 -0
b.rs +0 -0
a.rs +0 -0
a.rs +0 -0
a.rs +0 -0
b.rs +0 -0
src/a.rs +0 -0
src/b.rs +0 -0
README.md +0 -0
a.css +0 -0
a.css +0 -0
assets/css/style.css +0 -0
assets/css/style.css +0 -0
a.rs +0 -0
a.rs +0 -0
a.rs +0 -0
a.rs +0 -0
b.rs +0 -0
crates/diff/src/viewer/tree.rs +8 -0
126 126
        let state = model.initial_state();
127 127
128 128
        Self { model, state }
129 129
    }
130 130
131 +
    /// Returns the file-tree pane's expansion, cursor, and anchor state.
132 +
    ///
133 +
    /// The `model` is immutable after construction, so this is the only part
134 +
    /// that changes between actions.
135 +
    pub(super) fn state(&self) -> &TreeState<usize> {
136 +
        &self.state
137 +
    }
138 +
131 139
    /// Returns the file-tree target under the cursor.
132 140
    #[cfg(test)]
133 141
    pub(super) fn target(&self) -> Option<FileTreeTarget> {
134 142
        self.state
135 143
            .selected()
a.rs +0 -0
b.rs +0 -0
crates/highlight/src/grammar.rs +22 -17
20 20
mod pattern;
21 21
mod tokenize;
22 22
23 23
pub use tokenize::LineTokenizer;
24 24
25 -
use pattern::{OpenRule, PatternSet, ScopeInterner};
25 +
use pattern::{OpenRule, PatternCompiler, PatternSet, PatternSetId, RuleLocation};
26 26
27 27
/// Display name for the built-in plain-text fallback grammar.
28 28
pub(crate) const PLAIN_TEXT_NAME: &str = "Plain Text";
29 29
30 30
/// Interned scope identifier.
90 90
    /// Lowercase file extensions, file names, and aliases matched by this grammar.
91 91
    file_types: HashSet<String>,
92 92
    /// Regexes used to match a source file's head line.
93 93
    head_match: Vec<Regex>,
94 94
    /// Root pattern set for TextMate tokenization.
95 -
    patterns: PatternSet,
96 -
    /// Path of pattern indices into `patterns`, indexed by rule id.
97 -
    rule_paths: Vec<Box<[usize]>>,
95 +
    patterns: PatternSetId,
96 +
    /// Arena of compiled pattern sets.
97 +
    pattern_sets: Vec<PatternSet>,
98 +
    /// Direct pattern locations indexed by rule id.
99 +
    rule_locations: Vec<Option<RuleLocation>>,
98 100
}
99 101
100 102
/// Tokenization strategy used by a grammar.
101 103
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
102 104
pub enum GrammarKind {
107 109
}
108 110
109 111
impl Grammar {
110 112
    /// Compiles a raw grammar.
111 113
    pub fn compile(raw: &RawGrammar) -> Result<Self, Error> {
112 -
        let mut next_rule = 0;
113 -
        let mut interner = ScopeInterner::default();
114 -
        let patterns = PatternSet::compile(raw, &raw.patterns, &mut next_rule, 0, &mut interner)?;
114 +
        let compiled = PatternCompiler::new(raw).compile()?;
115 115
        let head_match = head_patterns(raw.first_line_match.as_ref())
116 116
            .iter()
117 117
            .map(|pattern| Regex::new(pattern).map_err(|_| Error::InvalidRegex(pattern.clone())))
118 118
            .collect::<Result<Vec<_>, _>>()?;
119 -
        let rule_paths = patterns.collect_rule_paths(next_rule);
120 119
121 120
        Ok(Self {
122 121
            name: raw.display_name.clone().unwrap_or_else(|| raw.name.clone()),
123 122
            scope_name: raw.scope_name.clone(),
124 123
            file_types: raw
126 125
                .iter()
127 126
                .chain(std::iter::once(&raw.name))
128 127
                .map(|item| key(item))
129 128
                .collect(),
130 129
            head_match,
131 -
            patterns,
132 -
            rule_paths,
133 -
            scopes: interner.scopes,
130 +
            patterns: compiled.root,
131 +
            pattern_sets: compiled.sets,
132 +
            rule_locations: compiled.rule_locations,
133 +
            scopes: compiled.scopes,
134 134
            kind: GrammarKind::TextMate,
135 135
        })
136 136
    }
137 137
138 138
    /// Builds a grammar with no patterns for plain text fallback.
140 140
        Self {
141 141
            name: PLAIN_TEXT_NAME.to_owned(),
142 142
            scope_name: "text.plain".to_owned(),
143 143
            file_types: ["txt".to_owned(), "text".to_owned()].into_iter().collect(),
144 144
            head_match: Vec::new(),
145 -
            patterns: PatternSet::empty(),
146 -
            rule_paths: Vec::new(),
145 +
            patterns: PatternSetId::new(0),
146 +
            pattern_sets: vec![PatternSet::empty()],
147 +
            rule_locations: Vec::new(),
147 148
            scopes: Vec::new(),
148 149
            kind: GrammarKind::TextMate,
149 150
        }
150 151
    }
151 152
158 159
        Self {
159 160
            name: "JSON".to_owned(),
160 161
            scope_name: "source.json".to_owned(),
161 162
            file_types: ["json".to_owned()].into_iter().collect(),
162 163
            head_match: Vec::new(),
163 -
            patterns: PatternSet::empty(),
164 -
            rule_paths: Vec::new(),
164 +
            patterns: PatternSetId::new(0),
165 +
            pattern_sets: vec![PatternSet::empty()],
166 +
            rule_locations: Vec::new(),
165 167
            scopes: json::SCOPES
166 168
                .iter()
167 169
                .map(|scope| (*scope).to_owned())
168 170
                .collect(),
169 171
            kind: GrammarKind::Json,
206 208
        LineTokenizer::new(self).tokenize_line_into(state, line, spans);
207 209
    }
208 210
209 211
    /// Returns the compiled pattern for a stored rule id.
210 212
    fn pattern_by_rule(&self, rule_id: usize) -> Option<&pattern::Pattern> {
211 -
        let path = self.rule_paths.get(rule_id)?;
212 -
        self.patterns.pattern_at(path)
213 +
        let location = self.rule_locations.get(rule_id)?.as_ref()?;
214 +
        self.pattern_sets
215 +
            .get(location.set.index())?
216 +
            .patterns
217 +
            .get(location.index)
213 218
    }
214 219
}
215 220
216 221
impl FromStr for Grammar {
217 222
    type Err = Error;
crates/highlight/src/grammar/pattern.rs +383 -144
49 49
        /// Begin regex source (also the entry inside the parent set's RegSet).
50 50
        begin_source: String,
51 51
        /// End regex (compiled now or deferred until begin captures are known).
52 52
        end: EndPattern,
53 53
    },
54 +
    /// Stateful begin/while rule.
55 +
    BeginWhile {
56 +
        /// Begin regex source (also the entry inside the parent set's RegSet).
57 +
        begin_source: String,
58 +
        /// While regex tested at the start of each continued line.
59 +
        while_regex: Regex,
60 +
    },
54 61
}
55 62
63 +
/// Stable arena id for a compiled pattern set.
64 +
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
65 +
pub(super) struct PatternSetId(
66 +
    /// Index into [`CompiledPatterns::sets`].
67 +
    usize,
68 +
);
69 +
56 70
/// Compiled patterns at one nesting level plus their combined search regex.
57 71
#[derive(Debug)]
58 72
pub(super) struct PatternSet {
59 73
    /// Patterns in declaration order.
60 -
    patterns: Vec<Pattern>,
74 +
    pub(super) patterns: Vec<Pattern>,
75 +
    /// Included pattern sets searched after this set's local patterns.
76 +
    includes: Vec<PatternSetId>,
61 77
    /// Combined RegSet covering each pattern's match or begin source.
62 78
    regexes: Option<RegSet>,
63 79
}
64 80
65 -
/// Result of compiling one raw pattern.
66 -
enum Compiled {
67 -
    /// Pattern compiled to a single rule and should be added to the parent set.
68 -
    Rule(Pattern),
69 -
    /// Pattern was a grouping (no match/begin-end of its own); its nested patterns
70 -
    /// should be inlined directly into the parent set.
71 -
    Inline(Vec<Pattern>),
72 -
    /// Pattern was malformed and should be ignored.
73 -
    Skip,
74 -
}
75 -
76 81
/// One compiled TextMate pattern with its scope, captures, and nested rules.
77 82
///
78 83
/// A [`Pattern`] is what the grammar tokenizer matches against the source text.
79 84
/// One match produces a [`Match`] (the higher-level result with emitted spans),
80 85
/// which wraps the underlying [`RegexMatch`] (raw capture positions).
86 91
    pub(super) scope: Scope,
87 92
    /// Per-slot capture-scope mappings.
88 93
    pub(super) captures: PatternCaptures,
89 94
    /// Match form (single match or begin/end pair).
90 95
    body: PatternBody,
91 -
    /// Patterns that may match inside this one.
92 -
    pub(super) nested: PatternSet,
96 +
    /// Pattern set that may match inside this one.
97 +
    pub(super) nested: PatternSetId,
93 98
}
94 99
95 100
/// Begin/end rule pushed onto the parser stack and held across line boundaries.
96 101
///
97 102
/// The matching [`Pattern`] is recovered through `Grammar::pattern_by_rule`, so
126 131
    end: usize,
127 132
    /// Byte ranges for capture groups by capture index, when captures were retained.
128 133
    captures: Vec<Option<(usize, usize)>>,
129 134
}
130 135
136 +
/// Compiled grammar pattern arena and indexes.
137 +
pub(super) struct CompiledPatterns {
138 +
    /// Root pattern set id.
139 +
    pub(super) root: PatternSetId,
140 +
    /// Compiled pattern-set arena.
141 +
    pub(super) sets: Vec<PatternSet>,
142 +
    /// Interned scope names in id order.
143 +
    pub(super) scopes: Vec<String>,
144 +
    /// Direct lookup from rule id to its pattern's arena location.
145 +
    pub(super) rule_locations: Vec<Option<RuleLocation>>,
146 +
}
147 +
148 +
/// Direct arena location for a compiled rule.
149 +
#[derive(Clone, Copy, Debug)]
150 +
pub(super) struct RuleLocation {
151 +
    /// Pattern set containing the rule.
152 +
    pub(super) set: PatternSetId,
153 +
    /// Index of the rule inside the containing pattern set.
154 +
    pub(super) index: usize,
155 +
}
156 +
131 157
/// Builder-time table that assigns stable ids to scope names.
132 158
#[derive(Default)]
133 159
pub(super) struct ScopeInterner {
134 160
    /// Interned scope names in id order.
135 161
    pub(super) scopes: Vec<String>,
136 162
    /// Lookup table from scope name to interned id.
137 163
    ids: BTreeMap<String, ScopeId>,
138 164
}
139 165
166 +
/// Compiler for one raw TextMate grammar.
167 +
pub(super) struct PatternCompiler<'raw> {
168 +
    /// Source grammar being compiled.
169 +
    raw: &'raw RawGrammar,
170 +
    /// Root pattern set, available while compiling `$self` includes.
171 +
    root: PatternSetId,
172 +
    /// Compiled pattern-set arena.
173 +
    sets: Vec<PatternSet>,
174 +
    /// Repository entries compiled so far.
175 +
    repository: BTreeMap<String, PatternSetId>,
176 +
    /// Repository include nesting depth, used as a recursion guard.
177 +
    repository_depth: usize,
178 +
    /// Next stable rule id.
179 +
    next_rule: usize,
180 +
    /// Scope-name interner.
181 +
    interner: ScopeInterner,
182 +
}
183 +
140 184
/// End match found before any nested match on the current line.
141 185
struct EndOnLine {
142 186
    /// The regex match that closed the rule.
143 187
    matched: RegexMatch,
144 188
    /// Spans emitted by nested patterns scanned while looking for the end.
198 242
            })
199 243
            .collect()
200 244
    }
201 245
}
202 246
247 +
impl PatternSetId {
248 +
    /// Creates a pattern-set id from an arena index.
249 +
    pub(super) fn new(index: usize) -> Self {
250 +
        Self(index)
251 +
    }
252 +
253 +
    /// Returns this id's pattern-set arena index.
254 +
    pub(super) fn index(self) -> usize {
255 +
        self.0
256 +
    }
257 +
258 +
    /// Finds the next pattern match in this set or its included sets.
259 +
    pub(super) fn find_next(
260 +
        self,
261 +
        sets: &[PatternSet],
262 +
        line: &str,
263 +
        pos: usize,
264 +
        cache: &mut EndRegexCache,
265 +
    ) -> Option<Match> {
266 +
        let mut active = Vec::new();
267 +
        self.find_next_inner(sets, line, pos, cache, &mut active)
268 +
    }
269 +
270 +
    /// Finds the next pattern match while carrying the active include stack.
271 +
    fn find_next_inner(
272 +
        self,
273 +
        sets: &[PatternSet],
274 +
        line: &str,
275 +
        pos: usize,
276 +
        cache: &mut EndRegexCache,
277 +
        active: &mut Vec<PatternSetId>,
278 +
    ) -> Option<Match> {
279 +
        if active.contains(&self) || active.len() > MAX_INCLUDE_DEPTH {
280 +
            return None;
281 +
        }
282 +
        active.push(self);
283 +
        let found = sets
284 +
            .get(self.index())
285 +
            .and_then(|set| set.find_next_inner(sets, line, pos, cache, active));
286 +
        active.pop();
287 +
        found
288 +
    }
289 +
}
290 +
203 291
impl PatternSet {
204 292
    /// Creates an empty pattern set.
205 293
    pub(super) fn empty() -> Self {
206 294
        Self {
207 295
            patterns: Vec::new(),
296 +
            includes: Vec::new(),
208 297
            regexes: None,
209 298
        }
210 299
    }
211 300
212 -
    /// Compiles raw TextMate patterns into a regex-searchable pattern set.
213 -
    pub(super) fn compile(
214 -
        raw: &RawGrammar,
215 -
        patterns: &[RawPattern],
216 -
        next_rule: &mut usize,
217 -
        depth: usize,
218 -
        interner: &mut ScopeInterner,
219 -
    ) -> Result<Self, Error> {
220 -
        if depth > MAX_INCLUDE_DEPTH {
221 -
            return Ok(Self::empty());
222 -
        }
223 -
        let mut compiled = Vec::new();
224 -
        for pattern in patterns {
225 -
            if let Some(include) = &pattern.include {
226 -
                let expanded = expand_include(raw, include, next_rule, depth, interner)?;
227 -
                compiled.extend(expanded);
228 -
                continue;
229 -
            }
230 -
            match Pattern::compile(raw, pattern, next_rule, depth, interner)? {
231 -
                Compiled::Rule(pattern) => compiled.push(pattern),
232 -
                Compiled::Inline(patterns) => compiled.extend(patterns),
233 -
                Compiled::Skip => {}
234 -
            }
235 -
        }
236 -
        Ok(Self::new(compiled))
237 -
    }
238 -
239 301
    /// Builds a pattern set and its combined regex search set.
240 -
    fn new(patterns: Vec<Pattern>) -> Self {
302 +
    fn new(patterns: Vec<Pattern>, includes: Vec<PatternSetId>) -> Self {
241 303
        let sources: Vec<&str> = patterns.iter().map(Pattern::search_source).collect();
242 304
        let regexes = (!sources.is_empty())
243 305
            .then(|| RegSet::new(&sources).ok())
244 306
            .flatten();
245 307
246 -
        Self { patterns, regexes }
247 -
    }
248 -
249 -
    /// Walks the rule tree to collect index paths from rule ids back to patterns.
250 -
    pub(super) fn collect_rule_paths(&self, total_rules: usize) -> Vec<Box<[usize]>> {
251 -
        let mut paths = vec![Box::default(); total_rules];
252 -
        let mut current = Vec::new();
253 -
        self.fill_rule_paths(&mut current, &mut paths);
254 -
        paths
255 -
    }
256 -
257 -
    /// Recursively fills `paths[rule_id]` with the index path to that pattern.
258 -
    fn fill_rule_paths(&self, current: &mut Vec<usize>, paths: &mut [Box<[usize]>]) {
259 -
        for (index, pattern) in self.patterns.iter().enumerate() {
260 -
            current.push(index);
261 -
            if let Some(slot) = paths.get_mut(pattern.id) {
262 -
                *slot = current.as_slice().into();
263 -
            }
264 -
            pattern.nested.fill_rule_paths(current, paths);
265 -
            current.pop();
266 -
        }
267 -
    }
268 -
269 -
    /// Returns a nested compiled pattern by index path.
270 -
    pub(super) fn pattern_at(&self, path: &[usize]) -> Option<&Pattern> {
271 -
        let (last, rest) = path.split_last()?;
272 -
        let mut current = self;
273 -
        for &index in rest {
274 -
            current = &current.patterns.get(index)?.nested;
308 +
        Self {
309 +
            patterns,
310 +
            includes,
311 +
            regexes,
275 312
        }
276 -
        current.patterns.get(*last)
277 313
    }
278 314
279 315
    /// Finds the next pattern match at or after `pos`.
280 -
    pub(super) fn find_next(
316 +
    fn find_next_inner(
281 317
        &self,
318 +
        sets: &[PatternSet],
282 319
        line: &str,
283 320
        pos: usize,
284 321
        cache: &mut EndRegexCache,
322 +
        active: &mut Vec<PatternSetId>,
285 323
    ) -> Option<Match> {
286 324
        if pos > line.len() || !line.is_char_boundary(pos) {
287 325
            return None;
288 326
        }
327 +
        let mut found = self.find_next_local(sets, line, pos, cache);
328 +
        for include in &self.includes {
329 +
            let Some(candidate) = include.find_next_inner(sets, line, pos, cache, active) else {
330 +
                continue;
331 +
            };
332 +
            found = match found {
333 +
                Some(current) if current.start <= candidate.start => Some(current),
334 +
                _ => Some(candidate),
335 +
            };
336 +
        }
337 +
        found
338 +
    }
339 +
340 +
    /// Finds the next local pattern match at or after `pos`.
341 +
    fn find_next_local(
342 +
        &self,
343 +
        sets: &[PatternSet],
344 +
        line: &str,
345 +
        pos: usize,
346 +
        cache: &mut EndRegexCache,
347 +
    ) -> Option<Match> {
289 348
        let regexes = self.regexes.as_ref()?;
290 349
        let (entry, captures) = regexes.captures_with_options(
291 350
            line,
292 351
            pos,
293 352
            line.len(),
295 354
            SearchOptions::SEARCH_OPTION_NONE,
296 355
        )?;
297 356
        let pattern = self.patterns.get(entry)?;
298 357
        let regex_match = RegexMatch::from_captures(captures, pattern.needs_match_captures())?;
299 358
300 -
        pattern.match_result(regex_match, line, cache)
359 +
        pattern.match_result(regex_match, sets, line, cache)
301 360
    }
302 361
}
303 362
304 -
/// Expands a single include directive into compiled patterns.
305 -
fn expand_include(
306 -
    raw: &RawGrammar,
307 -
    include: &str,
308 -
    next_rule: &mut usize,
309 -
    depth: usize,
310 -
    interner: &mut ScopeInterner,
311 -
) -> Result<Vec<Pattern>, Error> {
312 -
    // `$base` should reference the outermost grammar across cross-grammar
313 -
    // includes, but the registry does not yet support that, so it is
314 -
    // collapsed to `$self` (the current grammar's root patterns).
315 -
    if include == "$self" || include == "$base" {
316 -
        let set = PatternSet::compile(raw, &raw.patterns, next_rule, depth + 1, interner)?;
317 -
        return Ok(set.patterns);
318 -
    }
319 -
    let Some(name) = include.strip_prefix('#') else {
320 -
        return Ok(Vec::new());
321 -
    };
322 -
    let Some(pattern) = raw.repository.get(name) else {
323 -
        return Ok(Vec::new());
324 -
    };
325 -
    let set = PatternSet::compile(
326 -
        raw,
327 -
        std::slice::from_ref(pattern),
328 -
        next_rule,
329 -
        depth + 1,
330 -
        interner,
331 -
    )?;
332 -
    Ok(set.patterns)
333 -
}
363 +
impl PatternCompiler<'_> {
364 +
    /// Creates a compiler for a raw grammar.
365 +
    pub(super) fn new(raw: &RawGrammar) -> PatternCompiler<'_> {
366 +
        PatternCompiler {
367 +
            raw,
368 +
            root: PatternSetId::new(0),
369 +
            sets: Vec::new(),
370 +
            repository: BTreeMap::new(),
371 +
            repository_depth: 0,
372 +
            next_rule: 0,
373 +
            interner: ScopeInterner::default(),
374 +
        }
375 +
    }
334 376
335 -
impl Pattern {
336 -
    /// Compiles one raw pattern.
337 -
    ///
338 -
    /// Returns [`Compiled::Inline`] for grouping patterns (no match/begin-end of
339 -
    /// their own) so the parent set absorbs their nested patterns rather than
340 -
    /// keeping a placeholder node.
341 -
    fn compile(
342 -
        raw: &RawGrammar,
377 +
    /// Compiles the grammar's root pattern set and any referenced repository sets.
378 +
    pub(super) fn compile(mut self) -> Result<CompiledPatterns, Error> {
379 +
        let root = self.reserve_set();
380 +
        self.root = root;
381 +
        let root_set = self.compile_patterns(&self.raw.patterns)?;
382 +
        self.assign_set(root, root_set);
383 +
        let rule_locations = self.rule_locations();
384 +
385 +
        Ok(CompiledPatterns {
386 +
            root,
387 +
            sets: self.sets,
388 +
            scopes: self.interner.scopes,
389 +
            rule_locations,
390 +
        })
391 +
    }
392 +
393 +
    /// Reserves an empty pattern-set slot and returns its id.
394 +
    fn reserve_set(&mut self) -> PatternSetId {
395 +
        let id = PatternSetId::new(self.sets.len());
396 +
        self.sets.push(PatternSet::empty());
397 +
        id
398 +
    }
399 +
400 +
    /// Assigns a compiled pattern set to a reserved slot.
401 +
    fn assign_set(&mut self, id: PatternSetId, set: PatternSet) {
402 +
        self.sets[id.index()] = set;
403 +
    }
404 +
405 +
    /// Compiles raw TextMate patterns into one pattern set.
406 +
    fn compile_patterns(&mut self, patterns: &[RawPattern]) -> Result<PatternSet, Error> {
407 +
        let mut compiled = Vec::new();
408 +
        let mut includes = Vec::new();
409 +
        for pattern in patterns {
410 +
            if let Some(include) = &pattern.include {
411 +
                if let Some(include) = self.compile_include(include)? {
412 +
                    includes.push(include);
413 +
                }
414 +
                continue;
415 +
            }
416 +
            self.compile_pattern(pattern, &mut compiled, &mut includes)?;
417 +
        }
418 +
        Ok(PatternSet::new(compiled, includes))
419 +
    }
420 +
421 +
    /// Compiles one raw pattern into the current pattern-set builder.
422 +
    fn compile_pattern(
423 +
        &mut self,
343 424
        pattern: &RawPattern,
344 -
        next_rule: &mut usize,
345 -
        depth: usize,
346 -
        interner: &mut ScopeInterner,
347 -
    ) -> Result<Compiled, Error> {
348 -
        let scope = Scope::from_raw(pattern.name.as_deref(), interner);
349 -
        let nested = PatternSet::compile(raw, &pattern.patterns, next_rule, depth + 1, interner)?;
350 -
351 -
        let body = match (&pattern.match_rule, &pattern.begin, &pattern.end) {
352 -
            (Some(source), _, _) => {
425 +
        compiled: &mut Vec<Pattern>,
426 +
        includes: &mut Vec<PatternSetId>,
427 +
    ) -> Result<(), Error> {
428 +
        let scope = Scope::from_raw(pattern.name.as_deref(), &mut self.interner);
429 +
        let body = match (
430 +
            &pattern.match_rule,
431 +
            &pattern.begin,
432 +
            &pattern.end,
433 +
            &pattern.while_rule,
434 +
        ) {
435 +
            (Some(source), _, _, _) => {
353 436
                if Regex::new(source).is_err() {
354 -
                    return Ok(Compiled::Skip);
437 +
                    return Ok(());
355 438
                }
356 439
                PatternBody::Match {
357 440
                    source: source.clone(),
358 441
                }
359 442
            }
360 -
            (None, Some(begin), Some(end)) => {
443 +
            (None, Some(begin), Some(end), _) => {
361 444
                if Regex::new(begin).is_err() {
362 -
                    return Ok(Compiled::Skip);
445 +
                    return Ok(());
363 446
                }
364 447
                let Some(end) = EndPattern::compile(end) else {
365 -
                    return Ok(Compiled::Skip);
448 +
                    return Ok(());
366 449
                };
367 450
                PatternBody::BeginEnd {
368 451
                    begin_source: begin.clone(),
369 452
                    end,
370 453
                }
371 454
            }
372 -
            _ => return Ok(Compiled::Inline(nested.patterns)),
455 +
            (None, Some(begin), None, Some(while_rule)) => {
456 +
                if scope.id().is_none() {
457 +
                    self.inline_patterns(pattern, compiled, includes)?;
458 +
                    return Ok(());
459 +
                }
460 +
                if Regex::new(begin).is_err() {
461 +
                    return Ok(());
462 +
                }
463 +
                let Ok(while_regex) = Regex::new(while_rule) else {
464 +
                    return Ok(());
465 +
                };
466 +
                PatternBody::BeginWhile {
467 +
                    begin_source: begin.clone(),
468 +
                    while_regex,
469 +
                }
470 +
            }
471 +
            _ => {
472 +
                self.inline_patterns(pattern, compiled, includes)?;
473 +
                return Ok(());
474 +
            }
373 475
        };
374 -
        let id = *next_rule;
375 -
        *next_rule += 1;
476 +
        let nested = self.compile_nested_set(&pattern.patterns)?;
477 +
        let id = self.next_rule;
478 +
        self.next_rule += 1;
376 479
377 -
        Ok(Compiled::Rule(Self {
480 +
        compiled.push(Pattern {
378 481
            id,
379 482
            scope,
380 483
            captures: PatternCaptures {
381 -
                matched: interner.captures(&pattern.captures),
382 -
                begin: interner.captures(&pattern.begin_captures),
383 -
                end: interner.captures(&pattern.end_captures),
484 +
                matched: self.interner.captures(&pattern.captures),
485 +
                begin: self.interner.captures(&pattern.begin_captures),
486 +
                end: self.interner.captures(&pattern.end_captures),
384 487
            },
385 488
            body,
386 489
            nested,
387 -
        }))
490 +
        });
491 +
        Ok(())
492 +
    }
493 +
494 +
    /// Compiles grouping pattern children directly into the parent builder.
495 +
    fn inline_patterns(
496 +
        &mut self,
497 +
        pattern: &RawPattern,
498 +
        compiled: &mut Vec<Pattern>,
499 +
        includes: &mut Vec<PatternSetId>,
500 +
    ) -> Result<(), Error> {
501 +
        let inline = self.compile_patterns(&pattern.patterns)?;
502 +
        compiled.extend(inline.patterns);
503 +
        includes.extend(inline.includes);
504 +
505 +
        Ok(())
506 +
    }
507 +
508 +
    /// Compiles a nested pattern set into the arena and returns its id.
509 +
    fn compile_nested_set(&mut self, patterns: &[RawPattern]) -> Result<PatternSetId, Error> {
510 +
        let id = self.reserve_set();
511 +
        let set = self.compile_patterns(patterns)?;
512 +
        self.assign_set(id, set);
513 +
514 +
        Ok(id)
515 +
    }
516 +
517 +
    /// Compiles an include target into a pattern-set reference.
518 +
    fn compile_include(&mut self, include: &str) -> Result<Option<PatternSetId>, Error> {
519 +
        // `$base` should reference the outermost grammar across cross-grammar
520 +
        // includes, but the registry does not yet support that, so it is
521 +
        // collapsed to `$self` (the current grammar's root patterns).
522 +
        if include == "$self" || include == "$base" {
523 +
            return Ok(Some(self.root));
524 +
        }
525 +
        let Some(name) = include.strip_prefix('#') else {
526 +
            return Ok(None);
527 +
        };
528 +
        self.compile_repository_entry(name)
529 +
    }
530 +
531 +
    /// Compiles one repository entry once and returns its pattern-set id.
532 +
    fn compile_repository_entry(&mut self, name: &str) -> Result<Option<PatternSetId>, Error> {
533 +
        if let Some(id) = self.repository.get(name) {
534 +
            return Ok(Some(*id));
535 +
        }
536 +
        if self.repository_depth > MAX_INCLUDE_DEPTH {
537 +
            return Ok(None);
538 +
        }
539 +
        let Some(pattern) = self.raw.repository.get(name) else {
540 +
            return Ok(None);
541 +
        };
542 +
        let id = self.reserve_set();
543 +
544 +
        self.repository.insert(name.to_owned(), id);
545 +
        self.repository_depth += 1;
546 +
547 +
        let set = self.compile_patterns(std::slice::from_ref(pattern))?;
548 +
549 +
        self.repository_depth -= 1;
550 +
        self.assign_set(id, set);
551 +
552 +
        Ok(Some(id))
553 +
    }
554 +
555 +
    /// Builds direct rule-id lookups after compilation.
556 +
    fn rule_locations(&self) -> Vec<Option<RuleLocation>> {
557 +
        let mut locations = vec![None; self.next_rule];
558 +
        for (set_index, set) in self.sets.iter().enumerate() {
559 +
            let set_id = PatternSetId::new(set_index);
560 +
            for (index, pattern) in set.patterns.iter().enumerate() {
561 +
                if let Some(slot) = locations.get_mut(pattern.id) {
562 +
                    *slot = Some(RuleLocation { set: set_id, index });
563 +
                }
564 +
            }
565 +
        }
566 +
        locations
388 567
    }
568 +
}
389 569
570 +
impl Pattern {
390 571
    /// Returns the active end regex when reopening this pattern from line state.
391 572
    pub(super) fn resume_end<'pat>(
392 573
        &'pat self,
393 574
        dynamic_end: Option<&str>,
394 575
        cache: &mut EndRegexCache,
397 578
            return None;
398 579
        };
399 580
        end.resume(dynamic_end, cache)
400 581
    }
401 582
583 +
    /// Returns true when this begin/while rule continues on `line`.
584 +
    pub(super) fn continues_while(&self, line: &str) -> bool {
585 +
        match &self.body {
586 +
            PatternBody::BeginWhile { while_regex, .. } => {
587 +
                RegexMatch::find(while_regex, line, 0, false)
588 +
                    .is_some_and(|matched| matched.start == 0)
589 +
            }
590 +
            PatternBody::Match { .. } | PatternBody::BeginEnd { .. } => true,
591 +
        }
592 +
    }
593 +
402 594
    /// Adds capture-group spans plus the pattern's own scope span for one regex match.
403 595
    pub(super) fn append_match_spans(
404 596
        &self,
405 597
        matched: &RegexMatch,
406 598
        captures: &Captures,
432 624
        match &self.body {
433 625
            PatternBody::Match { .. } => !self.captures.matched.is_empty(),
434 626
            PatternBody::BeginEnd { end, .. } => {
435 627
                !self.captures.begin.is_empty() || end.is_dynamic()
436 628
            }
629 +
            PatternBody::BeginWhile { .. } => !self.captures.begin.is_empty(),
437 630
        }
438 631
    }
439 632
440 633
    /// The regex source used in the parent set's combined `RegSet`.
441 634
    fn search_source(&self) -> &str {
442 635
        match &self.body {
443 636
            PatternBody::Match { source } => source,
444 637
            PatternBody::BeginEnd { begin_source, .. } => begin_source,
638 +
            PatternBody::BeginWhile { begin_source, .. } => begin_source,
445 639
        }
446 640
    }
447 641
448 642
    /// Builds a [`Match`] for one regex hit, dispatching by body kind.
449 643
    fn match_result(
450 644
        &self,
451 645
        regex_match: RegexMatch,
646 +
        sets: &[PatternSet],
452 647
        line: &str,
453 648
        cache: &mut EndRegexCache,
454 649
    ) -> Option<Match> {
455 650
        match &self.body {
456 651
            PatternBody::Match { .. } => Some(self.simple_match(regex_match)),
457 -
            PatternBody::BeginEnd { end, .. } => self.begin_match(end, regex_match, line, cache),
652 +
            PatternBody::BeginEnd { end, .. } => {
653 +
                self.begin_match(end, regex_match, sets, line, cache)
654 +
            }
655 +
            PatternBody::BeginWhile { .. } => Some(self.begin_while_match(regex_match, line)),
458 656
        }
459 657
    }
460 658
461 659
    /// Builds a match for a single-line match rule.
462 660
    fn simple_match(&self, regex_match: RegexMatch) -> Match {
473 671
    /// Builds a match for a begin/end rule, eagerly closing on the same line if possible.
474 672
    fn begin_match(
475 673
        &self,
476 674
        end_pattern: &EndPattern,
477 675
        begin: RegexMatch,
676 +
        sets: &[PatternSet],
478 677
        line: &str,
479 678
        cache: &mut EndRegexCache,
480 679
    ) -> Option<Match> {
481 680
        let end_regex = end_pattern.resolve_for_begin(&begin, line, cache)?;
482 681
        let dynamic_end = end_regex.dynamic_source();
483 -
        let same_line_end = self.find_same_line_end(&end_regex, line, begin.end, cache);
682 +
        let same_line_end = self.find_same_line_end(&end_regex, sets, line, begin.end, cache);
484 683
485 684
        let mut spans = Vec::new();
486 685
        self.append_match_spans(&begin, &self.captures.begin, &mut spans);
487 686
488 687
        let (end_byte, open_rule) = if let Some(close) = &same_line_end {
510 709
            spans,
511 710
            open_rule,
512 711
        })
513 712
    }
514 713
714 +
    /// Builds a match for a begin/while rule.
715 +
    fn begin_while_match(&self, begin: RegexMatch, line: &str) -> Match {
716 +
        let mut spans = Vec::new();
717 +
        let end = begin.next_pos(line);
718 +
719 +
        self.append_match_spans(&begin, &self.captures.begin, &mut spans);
720 +
        self.scope.push_visible(&mut spans, begin.start, end);
721 +
722 +
        Match {
723 +
            start: begin.start,
724 +
            end,
725 +
            spans,
726 +
            open_rule: Some(OpenRule {
727 +
                rule_id: self.id,
728 +
                dynamic_end: None,
729 +
            }),
730 +
        }
731 +
    }
732 +
515 733
    /// Finds the first end match on the line, scanning past nested matches that occur before it.
516 734
    fn find_same_line_end(
517 735
        &self,
518 736
        end: &EndRegex<'_>,
737 +
        sets: &[PatternSet],
519 738
        line: &str,
520 739
        mut pos: usize,
521 740
        cache: &mut EndRegexCache,
522 741
    ) -> Option<EndOnLine> {
523 742
        let end_regex = end.regex();
524 743
        let end_source = end.source();
525 744
        let capture_end = !self.captures.end.is_empty();
526 745
        let mut spans = Vec::new();
527 746
        loop {
528 -
            let matched = RegexMatch::find(end_regex, line, pos, capture_end)?;
529 -
            // Skip escaped quote-character ends โ€” only `"` and `'` are handled.
747 +
            let matched = RegexMatch::find_end(end_regex, line, pos, capture_end)?;
748 +
            // Skip escaped quote-character ends -- only `"` and `'` are handled.
530 749
            // Other end-pattern shapes are matched literally without escape awareness.
531 -
            if is_simple_quote(end_source) && is_escaped_at(line, matched.start) {
750 +
            if matches!(end_source, "\"" | "'") && is_escaped_at(line, matched.start) {
532 751
                pos = matched.next_pos(line);
533 752
                continue;
534 753
            }
535 -
            let nested_match = self.nested.find_next(line, pos, cache);
754 +
            let nested_match = self.nested.find_next(sets, line, pos, cache);
536 755
            let Some(nested_match) = nested_match else {
537 756
                return Some(EndOnLine { matched, spans });
538 757
            };
539 758
            if nested_match.start >= matched.start {
540 759
                return Some(EndOnLine { matched, spans });
543 762
            spans.extend(nested_match.spans);
544 763
        }
545 764
    }
546 765
}
547 766
548 -
/// Whether `source` is a single literal quote pattern.
549 -
fn is_simple_quote(source: &str) -> bool {
550 -
    matches!(source, "\"" | "'")
551 -
}
552 -
553 767
/// Whether the byte at `pos` is preceded by an odd number of backslashes.
554 768
fn is_escaped_at(line: &str, pos: usize) -> bool {
555 769
    if pos > line.len() || !line.is_char_boundary(pos) {
556 770
        return false;
557 771
    }
568 782
    /// Returns the next byte position after this match, ensuring forward progress.
569 783
    pub(super) fn next_pos(&self, line: &str) -> usize {
570 784
        next_pos_after(line, self.start, self.end)
571 785
    }
572 786
787 +
    /// Returns the next byte position after opening this rule.
788 +
    pub(super) fn next_pos_after_open(&self, line: &str) -> usize {
789 +
        if self.open_rule.is_some() && self.start == self.end {
790 +
            self.start
791 +
        } else {
792 +
            self.next_pos(line)
793 +
        }
794 +
    }
795 +
573 796
    /// Returns the open rule pushed onto the parser stack by this match, if any.
574 797
    pub(super) fn open_rule(&self) -> Option<OpenRule> {
575 798
        self.open_rule.clone()
576 799
    }
577 800
}
610 833
            end,
611 834
            captures,
612 835
        })
613 836
    }
614 837
838 +
    /// Finds one end-regex match at or after `pos`.
839 +
    pub(super) fn find_end(
840 +
        regex: &Regex,
841 +
        line: &str,
842 +
        pos: usize,
843 +
        keep_captures: bool,
844 +
    ) -> Option<Self> {
845 +
        if let Some(matched) = Self::find(regex, line, pos, keep_captures) {
846 +
            return Some(matched);
847 +
        }
848 +
        let search = pos.checked_sub(1)?;
849 +
        let matched = Self::find(regex, line, search, keep_captures)?;
850 +
851 +
        (matched.start >= pos).then_some(matched)
852 +
    }
853 +
615 854
    /// Builds a match record from Oniguruma captures.
616 855
    fn from_captures(captures: onig::Captures<'_>, keep_captures: bool) -> Option<Self> {
617 856
        let (start, end) = captures.pos(0)?;
618 857
        let captures = if keep_captures {
619 858
            (0..captures.len())
crates/highlight/src/grammar/tokenize.rs +70 -19
16 16
#[derive(Debug)]
17 17
pub struct LineTokenizer<'grammar> {
18 18
    /// Grammar this tokenizer emits scopes for.
19 19
    pub(crate) grammar: &'grammar Grammar,
20 20
    /// Cache of compiled regexes for resolved dynamic end patterns.
21 -
    end_regex_cache: EndRegexCache,
21 +
    cache: EndRegexCache,
22 22
}
23 23
24 24
impl<'grammar> LineTokenizer<'grammar> {
25 25
    /// Creates a tokenizer for a compiled grammar.
26 26
    pub fn new(grammar: &'grammar Grammar) -> Self {
27 27
        Self {
28 28
            grammar,
29 -
            end_regex_cache: EndRegexCache::new(),
29 +
            cache: EndRegexCache::new(),
30 30
        }
31 31
    }
32 32
33 33
    /// Clears cached dynamic end regexes while retaining allocations.
34 -
    pub fn clear_caches(&mut self) {
35 -
        self.end_regex_cache.clear();
34 +
    pub fn clear(&mut self) {
35 +
        self.cache.clear();
36 36
    }
37 37
38 38
    /// Tokenizes one line, mutating the caller-owned line state.
39 39
    pub fn tokenize_line(&mut self, state: &mut LineState, line: &str) -> Vec<ScopeSpan> {
40 40
        let mut spans = Vec::new();
59 59
        let mut pos = 0;
60 60
61 61
        while pos < line.len() {
62 62
            pos = self.advance(state, line, pos, spans);
63 63
        }
64 +
        self.close_empty_rules_at_end(state, line, spans);
64 65
    }
65 66
66 67
    /// Performs one tokenization step and returns the next byte position.
67 68
    fn advance(
68 69
        &mut self,
84 85
        state: &mut LineState,
85 86
        line: &str,
86 87
        pos: usize,
87 88
        spans: &mut Vec<ScopeSpan>,
88 89
    ) -> usize {
89 -
        let Some(found) = self
90 -
            .grammar
91 -
            .patterns
92 -
            .find_next(line, pos, &mut self.end_regex_cache)
90 +
        let Some(found) =
91 +
            self.grammar
92 +
                .patterns
93 +
                .find_next(&self.grammar.pattern_sets, line, pos, &mut self.cache)
93 94
        else {
94 95
            return line.len();
95 96
        };
96 -
        let next_pos = found.next_pos(line);
97 +
        let next_pos = found.next_pos_after_open(line);
97 98
        let opened = found.open_rule();
98 99
        spans.extend(found.spans);
100 +
99 101
        if let Some(opened) = opened {
100 102
            state.stack.push(opened);
101 103
        }
102 104
        next_pos
103 105
    }
113 115
    ) -> usize {
114 116
        let Some(pattern) = self.grammar.pattern_by_rule(open.rule_id) else {
115 117
            state.stack.pop();
116 118
            return pos;
117 119
        };
118 -
        let Some(end) = pattern.resume_end(open.dynamic_end.as_deref(), &mut self.end_regex_cache)
119 -
        else {
120 +
        if pos == 0 && !pattern.continues_while(line) {
120 121
            state.stack.pop();
121 122
            return pos;
123 +
        }
124 +
        let Some(end) = pattern.resume_end(open.dynamic_end.as_deref(), &mut self.cache) else {
125 +
            return self.advance_inside_while_rule(state, line, pos, spans, pattern);
122 126
        };
123 -
        let event = self.next_event_inside(pattern, &end, line, pos);
124 -
        event.apply(state, line, pos, spans, pattern)
127 +
        self.next_event_inside(pattern, &end, line, pos)
128 +
            .apply(state, line, pos, spans, pattern)
129 +
    }
130 +
131 +
    /// Advances past one nested event inside an open begin/while rule.
132 +
    fn advance_inside_while_rule(
133 +
        &mut self,
134 +
        state: &mut LineState,
135 +
        line: &str,
136 +
        pos: usize,
137 +
        spans: &mut Vec<ScopeSpan>,
138 +
        pattern: &Pattern,
139 +
    ) -> usize {
140 +
        let nested =
141 +
            pattern
142 +
                .nested
143 +
                .find_next(&self.grammar.pattern_sets, line, pos, &mut self.cache);
144 +
        let Some(nested) = nested else {
145 +
            pattern.scope.push_visible(spans, pos, line.len());
146 +
            return line.len();
147 +
        };
148 +
        pattern.scope.push_visible(spans, pos, nested.start);
149 +
150 +
        let next_pos = nested.next_pos_after_open(line);
151 +
        let opened = nested.open_rule();
152 +
153 +
        spans.extend(nested.spans);
154 +
155 +
        if let Some(opened) = opened {
156 +
            state.stack.push(opened);
157 +
        }
158 +
        next_pos
159 +
    }
160 +
161 +
    /// Closes zero-width end rules that match at the end of a line.
162 +
    fn close_empty_rules_at_end(
163 +
        &mut self,
164 +
        state: &mut LineState,
165 +
        line: &str,
166 +
        spans: &mut Vec<ScopeSpan>,
167 +
    ) {
168 +
        while !state.is_empty() {
169 +
            let depth = state.depth();
170 +
            let pos = self.advance(state, line, line.len(), spans);
171 +
            if pos != line.len() || state.depth() >= depth {
172 +
                break;
173 +
            }
174 +
        }
125 175
    }
126 176
127 177
    /// Finds the next event (nested match, end match, or end of line) inside an open rule.
128 178
    fn next_event_inside(
129 179
        &mut self,
130 180
        pattern: &Pattern,
131 181
        end: &EndRegex<'_>,
132 182
        line: &str,
133 183
        pos: usize,
134 184
    ) -> InsideEvent {
135 -
        let nested = pattern
136 -
            .nested
137 -
            .find_next(line, pos, &mut self.end_regex_cache);
138 -
        let close = RegexMatch::find(end.regex(), line, pos, !pattern.captures.end.is_empty());
185 +
        let nested =
186 +
            pattern
187 +
                .nested
188 +
                .find_next(&self.grammar.pattern_sets, line, pos, &mut self.cache);
189 +
        let close = RegexMatch::find_end(end.regex(), line, pos, !pattern.captures.end.is_empty());
139 190
140 191
        match (nested, close) {
141 192
            (Some(nested), Some(close)) if nested.start < close.start => {
142 193
                InsideEvent::Nested(nested)
143 194
            }
148 199
    }
149 200
150 201
    /// Returns the number of cached dynamic end regexes (test helper).
151 202
    #[cfg(test)]
152 203
    pub(super) fn end_regex_cache_len(&self) -> usize {
153 -
        self.end_regex_cache.len()
204 +
        self.cache.len()
154 205
    }
155 206
}
156 207
157 208
/// One event found inside an open begin/end rule.
158 209
enum InsideEvent {
182 233
                close.next_pos(line)
183 234
            }
184 235
            Self::Nested(nested) => {
185 236
                pattern.scope.push_visible(spans, pos, nested.start);
186 237
187 -
                let next_pos = nested.next_pos(line);
238 +
                let next_pos = nested.next_pos_after_open(line);
188 239
                let opened = nested.open_rule();
189 240
190 241
                spans.extend(nested.spans);
191 242
192 243
                if let Some(opened) = opened {
crates/highlight/src/lib.rs +1 -1
31 31
pub use grammar::{Grammar, GrammarKind, LineState, LineTokenizer, ScopeId, ScopeSpan};
32 32
pub use raw::{RawCapture, RawGrammar, RawPattern, RawStyle, RawTheme, RawThemeRule};
33 33
pub use registry::{GrammarQuery, Registry};
34 34
pub use theme::{FontStyle, Rgb, Style, StyleSpan, Theme};
35 35
36 -
/// Maximum include depth when expanding `$self`, `$base`, and repository rules.
36 +
/// Maximum active include depth followed while matching recursive pattern sets.
37 37
pub const MAX_INCLUDE_DEPTH: usize = 8;
38 38
39 39
#[cfg(test)]
40 40
#[allow(clippy::unwrap_used)]
41 41
mod tests;
crates/highlight/src/raw.rs +3 -0
47 47
    pub match_rule: Option<String>,
48 48
    /// Begin expression for a stateful rule.
49 49
    pub begin: Option<String>,
50 50
    /// End expression for a stateful rule.
51 51
    pub end: Option<String>,
52 +
    /// While expression for a stateful rule.
53 +
    #[serde(rename = "while")]
54 +
    pub while_rule: Option<String>,
52 55
    /// Nested patterns.
53 56
    #[serde(default)]
54 57
    pub patterns: Vec<RawPattern>,
55 58
    /// Include target such as `$self`, `$base`, or `#name`.
56 59
    pub include: Option<String>,
crates/repo/src/lib.rs +67 -5
46 46
        Self {
47 47
            cwd: cwd.into(),
48 48
            args: args.into(),
49 49
        }
50 50
    }
51 +
52 +
    /// Returns original diff selector args without pathspecs being refetched.
53 +
    fn forwarded_args<'a>(&'a self, paths: &[&Path]) -> Vec<&'a OsStr> {
54 +
        let args = self
55 +
            .args
56 +
            .iter()
57 +
            .position(|arg| arg.as_os_str() == OsStr::new(PATHSPEC_SEPARATOR))
58 +
            .map_or(self.args.as_slice(), |separator| &self.args[..separator]);
59 +
60 +
        args.iter()
61 +
            .map(OsString::as_os_str)
62 +
            .filter(|arg| !is_refetched_path(arg, paths))
63 +
            .collect()
64 +
    }
51 65
}
52 66
53 67
impl Repo for GitRepo {
54 68
    fn diff(&self, context_lines: usize, paths: &[&Path]) -> Result<Vec<u8>, RepoError> {
55 69
        // Forwarded args up to any `--` pathspec separator select the diff; the
56 70
        // refetch supplies its own narrowed path list after a fresh separator.
57 -
        let forwarded = self
58 -
            .args
59 -
            .iter()
60 -
            .position(|arg| arg.as_os_str() == OsStr::new(PATHSPEC_SEPARATOR))
61 -
            .map_or(self.args.as_slice(), |separator| &self.args[..separator]);
71 +
        let forwarded = self.forwarded_args(paths);
62 72
        let context = OsString::from(format!("-U{context_lines}"));
63 73
        let output = Command::new("git")
64 74
            .arg("diff")
65 75
            .args(forwarded)
66 76
            .arg(context)
74 84
        }
75 85
        Ok(output.stdout)
76 86
    }
77 87
}
78 88
89 +
/// Returns whether an original argument is one of the pathspecs being refetched.
90 +
fn is_refetched_path(arg: &OsStr, paths: &[&Path]) -> bool {
91 +
    let arg = Path::new(arg);
92 +
    let normalized = arg.strip_prefix(".").unwrap_or(arg);
93 +
94 +
    paths.iter().any(|path| {
95 +
        let normalized_path = path.strip_prefix(".").unwrap_or(path);
96 +
        normalized == normalized_path
97 +
    })
98 +
}
99 +
79 100
// Error Handling //
80 101
81 102
/// A failure while refetching diff data from a [`Repo`].
82 103
#[derive(Debug)]
83 104
pub enum RepoError {
101 122
        }
102 123
    }
103 124
}
104 125
105 126
impl std::error::Error for RepoError {}
127 +
128 +
#[cfg(test)]
129 +
#[allow(clippy::unwrap_used)]
130 +
mod tests {
131 +
    use super::*;
132 +
133 +
    #[test]
134 +
    fn forwarded_args_strip_refetched_pathspecs_without_separator() {
135 +
        let repo = GitRepo::new(
136 +
            ".",
137 +
            vec![
138 +
                OsString::from("HEAD~14"),
139 +
                OsString::from("HEAD"),
140 +
                OsString::from("assets/css/style.css"),
141 +
            ],
142 +
        );
143 +
        let path = Path::new("assets/css/style.css");
144 +
145 +
        let args = repo.forwarded_args(&[path]);
146 +
147 +
        assert_eq!(args, vec![OsStr::new("HEAD~14"), OsStr::new("HEAD")]);
148 +
    }
149 +
150 +
    #[test]
151 +
    fn forwarded_args_ignore_pathspecs_after_separator() {
152 +
        let repo = GitRepo::new(
153 +
            ".",
154 +
            vec![
155 +
                OsString::from("HEAD~14"),
156 +
                OsString::from("HEAD"),
157 +
                OsString::from("--"),
158 +
                OsString::from("assets/css/style.css"),
159 +
            ],
160 +
        );
161 +
        let path = Path::new("assets/css/style.css");
162 +
163 +
        let args = repo.forwarded_args(&[path]);
164 +
165 +
        assert_eq!(args, vec![OsStr::new("HEAD~14"), OsStr::new("HEAD")]);
166 +
    }
167 +
}