@willbooster/tree-sitter-typescript 1.1.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/common/defineGrammar.js +91 -30
- package/package.json +2 -2
- package/tree-sitter-tsx.wasm +0 -0
- package/tree-sitter-typescript.wasm +0 -0
- package/tree-sitter.json +15 -15
- package/tsx/src/node-types.json +61 -22
- package/typescript/src/node-types.json +61 -22
package/README.md
CHANGED
|
@@ -17,7 +17,10 @@ and, for TSX, [JSX](https://facebook.github.io/jsx/).
|
|
|
17
17
|
|
|
18
18
|
TypeScript and TSX are two different dialects (`<T>x` is a type assertion in TypeScript but a JSX element in TSX),
|
|
19
19
|
so this package defines two grammars: `typescript` in `typescript/` and `tsx` in `tsx/`, both generated from
|
|
20
|
-
`common/defineGrammar.js
|
|
20
|
+
`common/defineGrammar.js`, which extends the JavaScript grammar of
|
|
21
|
+
[@willbooster/tree-sitter-javascript](https://www.npmjs.com/package/@willbooster/tree-sitter-javascript) and ports its
|
|
22
|
+
external scanner in `common/scanner.h`. The `tsx` grammar also parses JavaScript with [Flow](https://flow.org/) type
|
|
23
|
+
annotations.
|
|
21
24
|
|
|
22
25
|
## Usage
|
|
23
26
|
|
package/common/defineGrammar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// oxlint-disable unicorn/prefer-module -- This package is CommonJS, so tree-sitter loads the grammar as CommonJS.
|
|
2
|
-
const JavaScript = require('tree-sitter-javascript/grammar');
|
|
2
|
+
const JavaScript = require('@willbooster/tree-sitter-javascript/grammar');
|
|
3
3
|
|
|
4
4
|
module.exports = function defineGrammar(dialect) {
|
|
5
5
|
return grammar(JavaScript, {
|
|
@@ -188,7 +188,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
188
188
|
'member',
|
|
189
189
|
seq(
|
|
190
190
|
field('function', $.primary_expression),
|
|
191
|
-
'
|
|
191
|
+
field('optional_chain', $.optional_chain),
|
|
192
192
|
field('type_arguments', optional($.type_arguments)),
|
|
193
193
|
field('arguments', $.arguments)
|
|
194
194
|
)
|
|
@@ -209,12 +209,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
209
209
|
assignment_expression: ($) =>
|
|
210
210
|
prec.right(
|
|
211
211
|
'assign',
|
|
212
|
-
seq(
|
|
213
|
-
optional('using'),
|
|
214
|
-
field('left', choice($.parenthesized_expression, $._lhs_expression)),
|
|
215
|
-
'=',
|
|
216
|
-
field('right', $.expression)
|
|
217
|
-
)
|
|
212
|
+
seq(field('left', choice($.parenthesized_expression, $._lhs_expression)), '=', field('right', $.expression))
|
|
218
213
|
),
|
|
219
214
|
|
|
220
215
|
_augmented_assignment_lhs: ($, previous) => choice(previous, $.non_null_expression),
|
|
@@ -257,6 +252,15 @@ module.exports = function defineGrammar(dialect) {
|
|
|
257
252
|
)
|
|
258
253
|
),
|
|
259
254
|
|
|
255
|
+
// Any identifier name may name a JSX attribute, such as `class` in `<div class="x" />`, which the JavaScript
|
|
256
|
+
// grammar's reserved words reject (WillBooster/tree-sitter-javascript#25).
|
|
257
|
+
_jsx_attribute_name: ($) =>
|
|
258
|
+
choice(
|
|
259
|
+
alias($.jsx_identifier, $.property_identifier),
|
|
260
|
+
alias(reserved('properties', $.identifier), $.property_identifier),
|
|
261
|
+
$.jsx_namespace_name
|
|
262
|
+
),
|
|
263
|
+
|
|
260
264
|
// This rule is only referenced by expression when the dialect is 'tsx'
|
|
261
265
|
jsx_opening_element: ($) => prec.dynamic(-1, seq($._jsx_start_opening_element, '>')),
|
|
262
266
|
|
|
@@ -265,6 +269,10 @@ module.exports = function defineGrammar(dialect) {
|
|
|
265
269
|
|
|
266
270
|
export_specifier: (_, previous) => seq(optional(choice('type', 'typeof')), previous),
|
|
267
271
|
|
|
272
|
+
// Any identifier name may be exported or imported. The JavaScript grammar rejects reserved words other than
|
|
273
|
+
// `default`, for which it leaves no node (WillBooster/tree-sitter-javascript#17 and #24).
|
|
274
|
+
_module_export_name: ($) => choice(reserved('properties', $.identifier), $.string),
|
|
275
|
+
|
|
268
276
|
_import_identifier: ($) => choice($.identifier, alias('type', $.identifier)),
|
|
269
277
|
|
|
270
278
|
import_specifier: ($) =>
|
|
@@ -307,12 +315,42 @@ module.exports = function defineGrammar(dialect) {
|
|
|
307
315
|
seq('export', 'as', 'namespace', $.identifier, $._semicolon)
|
|
308
316
|
),
|
|
309
317
|
|
|
318
|
+
// The JavaScript grammar leaves `await (x).y` ambiguous with a call of an identifier named `await`, and GLR keeps
|
|
319
|
+
// the call; TypeScript and V8 read the operator (WillBooster/tree-sitter-javascript#23).
|
|
320
|
+
await_expression: ($) => prec.dynamic(2, prec('unary_void', seq('await', $.expression))),
|
|
321
|
+
|
|
322
|
+
// The JavaScript grammar's for header takes no `using` declaration, although ECMAScript allows one.
|
|
323
|
+
for_statement: ($) =>
|
|
324
|
+
seq(
|
|
325
|
+
'for',
|
|
326
|
+
'(',
|
|
327
|
+
choice(
|
|
328
|
+
field(
|
|
329
|
+
'initializer',
|
|
330
|
+
choice(
|
|
331
|
+
alias($.for_lexical_declaration, $.lexical_declaration),
|
|
332
|
+
alias($.for_variable_declaration, $.variable_declaration),
|
|
333
|
+
alias($._for_using_declaration, $.using_declaration)
|
|
334
|
+
)
|
|
335
|
+
),
|
|
336
|
+
seq(field('initializer', $._expressions), ';'),
|
|
337
|
+
field('initializer', $.empty_statement)
|
|
338
|
+
),
|
|
339
|
+
field('condition', choice(seq($._expressions, ';'), $.empty_statement)),
|
|
340
|
+
field('increment', optional($._expressions)),
|
|
341
|
+
')',
|
|
342
|
+
field('body', $.statement)
|
|
343
|
+
),
|
|
344
|
+
|
|
345
|
+
_for_using_declaration: ($) =>
|
|
346
|
+
seq(field('kind', choice('using', seq('await', 'using'))), commaSep1($.variable_declarator), ';'),
|
|
347
|
+
|
|
310
348
|
non_null_expression: ($) => prec.left('unary', seq($.expression, '!')),
|
|
311
349
|
|
|
312
350
|
variable_declarator: ($) =>
|
|
313
351
|
choice(
|
|
314
352
|
seq(
|
|
315
|
-
field('name', choice($.identifier, $._destructuring_pattern)),
|
|
353
|
+
field('name', choice($.identifier, alias('of', $.identifier), $._destructuring_pattern)),
|
|
316
354
|
field('type', optional($.type_annotation)),
|
|
317
355
|
optional($._initializer)
|
|
318
356
|
),
|
|
@@ -378,15 +416,18 @@ module.exports = function defineGrammar(dialect) {
|
|
|
378
416
|
)
|
|
379
417
|
),
|
|
380
418
|
|
|
381
|
-
decorator_parenthesized_expression: ($) =>
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
419
|
+
decorator_parenthesized_expression: ($) => seq('(', $._expressions, ')'),
|
|
420
|
+
|
|
421
|
+
// A decorator's member name may be any identifier name, as a member expression's may, which the JavaScript
|
|
422
|
+
// grammar's reserved words reject.
|
|
423
|
+
decorator_member_expression: ($) =>
|
|
424
|
+
prec(
|
|
425
|
+
'member',
|
|
426
|
+
seq(
|
|
427
|
+
field('object', choice($.identifier, alias($.decorator_member_expression, $.member_expression))),
|
|
428
|
+
'.',
|
|
429
|
+
field('property', reserved('properties', alias($.identifier, $.property_identifier)))
|
|
430
|
+
)
|
|
390
431
|
),
|
|
391
432
|
|
|
392
433
|
class_body: ($) =>
|
|
@@ -523,7 +564,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
523
564
|
_module: ($) =>
|
|
524
565
|
prec.right(
|
|
525
566
|
seq(
|
|
526
|
-
field('name', choice($.string, $.identifier, $.nested_identifier)),
|
|
567
|
+
field('name', choice($.string, reserved('properties', $.identifier), $.nested_identifier)),
|
|
527
568
|
// On .d.ts files "declare module foo" desugars to "declare module foo {}",
|
|
528
569
|
// hence why it is optional here
|
|
529
570
|
field('body', optional($.statement_block))
|
|
@@ -532,6 +573,17 @@ module.exports = function defineGrammar(dialect) {
|
|
|
532
573
|
|
|
533
574
|
import_alias: ($) => seq('import', $.identifier, '=', choice($.identifier, $.nested_identifier), $._semicolon),
|
|
534
575
|
|
|
576
|
+
// A qualified name may end in any identifier name, as a member expression may.
|
|
577
|
+
nested_identifier: ($) =>
|
|
578
|
+
prec(
|
|
579
|
+
'member',
|
|
580
|
+
seq(
|
|
581
|
+
field('object', choice($.identifier, alias($.nested_identifier, $.member_expression))),
|
|
582
|
+
'.',
|
|
583
|
+
field('property', reserved('properties', alias($.identifier, $.property_identifier)))
|
|
584
|
+
)
|
|
585
|
+
),
|
|
586
|
+
|
|
535
587
|
nested_type_identifier: ($) =>
|
|
536
588
|
prec(
|
|
537
589
|
'member',
|
|
@@ -612,7 +664,10 @@ module.exports = function defineGrammar(dialect) {
|
|
|
612
664
|
)
|
|
613
665
|
),
|
|
614
666
|
'.',
|
|
615
|
-
field(
|
|
667
|
+
field(
|
|
668
|
+
'property',
|
|
669
|
+
choice($.private_property_identifier, reserved('properties', alias($.identifier, $.property_identifier)))
|
|
670
|
+
)
|
|
616
671
|
),
|
|
617
672
|
_type_query_call_expression_in_type_annotation: ($) =>
|
|
618
673
|
seq(
|
|
@@ -673,7 +728,8 @@ module.exports = function defineGrammar(dialect) {
|
|
|
673
728
|
'const',
|
|
674
729
|
'unique',
|
|
675
730
|
'abstract',
|
|
676
|
-
'import'
|
|
731
|
+
'import',
|
|
732
|
+
'function'
|
|
677
733
|
),
|
|
678
734
|
$.identifier
|
|
679
735
|
),
|
|
@@ -791,29 +847,32 @@ module.exports = function defineGrammar(dialect) {
|
|
|
791
847
|
field(
|
|
792
848
|
'object',
|
|
793
849
|
choice(
|
|
794
|
-
$.identifier,
|
|
850
|
+
reserved('properties', $.identifier),
|
|
795
851
|
$.this,
|
|
796
852
|
alias($._type_query_subscript_expression, $.subscript_expression),
|
|
797
853
|
alias($._type_query_member_expression, $.member_expression),
|
|
798
854
|
alias($._type_query_call_expression, $.call_expression)
|
|
799
855
|
)
|
|
800
856
|
),
|
|
801
|
-
choice('.', '
|
|
802
|
-
field(
|
|
857
|
+
choice('.', field('optional_chain', $.optional_chain)),
|
|
858
|
+
field(
|
|
859
|
+
'property',
|
|
860
|
+
choice($.private_property_identifier, reserved('properties', alias($.identifier, $.property_identifier)))
|
|
861
|
+
)
|
|
803
862
|
),
|
|
804
863
|
_type_query_subscript_expression: ($) =>
|
|
805
864
|
seq(
|
|
806
865
|
field(
|
|
807
866
|
'object',
|
|
808
867
|
choice(
|
|
809
|
-
$.identifier,
|
|
868
|
+
reserved('properties', $.identifier),
|
|
810
869
|
$.this,
|
|
811
870
|
alias($._type_query_subscript_expression, $.subscript_expression),
|
|
812
871
|
alias($._type_query_member_expression, $.member_expression),
|
|
813
872
|
alias($._type_query_call_expression, $.call_expression)
|
|
814
873
|
)
|
|
815
874
|
),
|
|
816
|
-
optional('
|
|
875
|
+
optional(field('optional_chain', $.optional_chain)),
|
|
817
876
|
'[',
|
|
818
877
|
field('index', choice($.predefined_type, $.string, $.number)),
|
|
819
878
|
']'
|
|
@@ -824,7 +883,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
824
883
|
'function',
|
|
825
884
|
choice(
|
|
826
885
|
$.import,
|
|
827
|
-
$.identifier,
|
|
886
|
+
reserved('properties', $.identifier),
|
|
828
887
|
alias($._type_query_member_expression, $.member_expression),
|
|
829
888
|
alias($._type_query_subscript_expression, $.subscript_expression)
|
|
830
889
|
)
|
|
@@ -837,7 +896,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
837
896
|
'function',
|
|
838
897
|
choice(
|
|
839
898
|
$.import,
|
|
840
|
-
$.identifier,
|
|
899
|
+
reserved('properties', $.identifier),
|
|
841
900
|
alias($._type_query_member_expression, $.member_expression),
|
|
842
901
|
alias($._type_query_subscript_expression, $.subscript_expression)
|
|
843
902
|
)
|
|
@@ -853,7 +912,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
853
912
|
alias($._type_query_member_expression, $.member_expression),
|
|
854
913
|
alias($._type_query_call_expression, $.call_expression),
|
|
855
914
|
alias($._type_query_instantiation_expression, $.instantiation_expression),
|
|
856
|
-
$.identifier,
|
|
915
|
+
reserved('properties', $.identifier),
|
|
857
916
|
$.this
|
|
858
917
|
)
|
|
859
918
|
)
|
|
@@ -1001,7 +1060,9 @@ module.exports = function defineGrammar(dialect) {
|
|
|
1001
1060
|
)
|
|
1002
1061
|
),
|
|
1003
1062
|
|
|
1004
|
-
|
|
1063
|
+
// A type name may be a reserved word, which TypeScript reports only as a semantic error. The reserved words must be
|
|
1064
|
+
// allowed on the identifier inside the alias: around the alias, the keyword token still wins in the lexer.
|
|
1065
|
+
_type_identifier: ($) => alias(reserved('properties', $.identifier), $.type_identifier),
|
|
1005
1066
|
|
|
1006
1067
|
_reserved_identifier: (_, previous) =>
|
|
1007
1068
|
choice(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-typescript",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "TypeScript and TSX grammars for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"@vitest/browser-playwright": "5.0.1",
|
|
50
50
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
51
51
|
"@willbooster/oxlint-config": "1.4.8",
|
|
52
|
+
"@willbooster/tree-sitter-javascript": "1.0.3",
|
|
52
53
|
"@willbooster/wb": "22.11.5",
|
|
53
54
|
"@willbooster/web-tree-sitter": "1.0.7",
|
|
54
55
|
"conventional-changelog-conventionalcommits": "10.4.0",
|
|
@@ -60,7 +61,6 @@
|
|
|
60
61
|
"semantic-release": "25.0.9",
|
|
61
62
|
"sort-package-json": "4.0.0",
|
|
62
63
|
"tree-sitter-cli": "0.27.0",
|
|
63
|
-
"tree-sitter-javascript": "0.23.1",
|
|
64
64
|
"typescript": "7.0.2",
|
|
65
65
|
"vite": "8.3.0",
|
|
66
66
|
"vitest": "5.0.1",
|
package/tree-sitter-tsx.wasm
CHANGED
|
Binary file
|
|
Binary file
|
package/tree-sitter.json
CHANGED
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
],
|
|
15
15
|
"highlights": [
|
|
16
16
|
"queries/highlights.scm",
|
|
17
|
-
"node_modules/tree-sitter-javascript/queries/highlights.scm"
|
|
17
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/highlights.scm"
|
|
18
18
|
],
|
|
19
|
-
"injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
|
|
19
|
+
"injections": "node_modules/@willbooster/tree-sitter-javascript/queries/injections.scm",
|
|
20
20
|
"locals": [
|
|
21
21
|
"queries/locals.scm",
|
|
22
|
-
"node_modules/tree-sitter-javascript/queries/locals.scm"
|
|
22
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/locals.scm"
|
|
23
23
|
],
|
|
24
24
|
"tags": [
|
|
25
25
|
"queries/tags.scm",
|
|
26
|
-
"node_modules/tree-sitter-javascript/queries/tags.scm"
|
|
26
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/tags.scm"
|
|
27
27
|
],
|
|
28
28
|
"injection-regex": "^(ts|typescript)$"
|
|
29
29
|
},
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
],
|
|
41
41
|
"highlights": [
|
|
42
42
|
"queries/highlights.scm",
|
|
43
|
-
"node_modules/tree-sitter-javascript/queries/highlights-jsx.scm",
|
|
44
|
-
"node_modules/tree-sitter-javascript/queries/highlights.scm"
|
|
43
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/highlights-jsx.scm",
|
|
44
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/highlights.scm"
|
|
45
45
|
],
|
|
46
|
-
"injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
|
|
47
|
-
"locals": "node_modules/tree-sitter-javascript/queries/locals.scm",
|
|
46
|
+
"injections": "node_modules/@willbooster/tree-sitter-javascript/queries/injections.scm",
|
|
47
|
+
"locals": "node_modules/@willbooster/tree-sitter-javascript/queries/locals.scm",
|
|
48
48
|
"tags": [
|
|
49
49
|
"queries/tags.scm",
|
|
50
|
-
"node_modules/tree-sitter-javascript/queries/tags.scm"
|
|
50
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/tags.scm"
|
|
51
51
|
],
|
|
52
52
|
"injection-regex": "^(ts|typescript)$"
|
|
53
53
|
},
|
|
@@ -64,20 +64,20 @@
|
|
|
64
64
|
],
|
|
65
65
|
"highlights": [
|
|
66
66
|
"queries/highlights.scm",
|
|
67
|
-
"node_modules/tree-sitter-javascript/queries/highlights-jsx.scm",
|
|
68
|
-
"node_modules/tree-sitter-javascript/queries/highlights.scm"
|
|
67
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/highlights-jsx.scm",
|
|
68
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/highlights.scm"
|
|
69
69
|
],
|
|
70
|
-
"injections": "node_modules/tree-sitter-javascript/queries/injections.scm",
|
|
71
|
-
"locals": "node_modules/tree-sitter-javascript/queries/locals.scm",
|
|
70
|
+
"injections": "node_modules/@willbooster/tree-sitter-javascript/queries/injections.scm",
|
|
71
|
+
"locals": "node_modules/@willbooster/tree-sitter-javascript/queries/locals.scm",
|
|
72
72
|
"tags": [
|
|
73
73
|
"queries/tags.scm",
|
|
74
|
-
"node_modules/tree-sitter-javascript/queries/tags.scm"
|
|
74
|
+
"node_modules/@willbooster/tree-sitter-javascript/queries/tags.scm"
|
|
75
75
|
],
|
|
76
76
|
"content-regex": "@flow"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"metadata": {
|
|
80
|
-
"version": "1.
|
|
80
|
+
"version": "1.2.0",
|
|
81
81
|
"license": "MIT",
|
|
82
82
|
"description": "TypeScript and TSX grammars for tree-sitter",
|
|
83
83
|
"authors": [
|
package/tsx/src/node-types.json
CHANGED
|
@@ -55,6 +55,10 @@
|
|
|
55
55
|
"type": "type_alias_declaration",
|
|
56
56
|
"named": true
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
"type": "using_declaration",
|
|
60
|
+
"named": true
|
|
61
|
+
},
|
|
58
62
|
{
|
|
59
63
|
"type": "variable_declaration",
|
|
60
64
|
"named": true
|
|
@@ -1244,6 +1248,16 @@
|
|
|
1244
1248
|
}
|
|
1245
1249
|
]
|
|
1246
1250
|
},
|
|
1251
|
+
"optional_chain": {
|
|
1252
|
+
"multiple": false,
|
|
1253
|
+
"required": false,
|
|
1254
|
+
"types": [
|
|
1255
|
+
{
|
|
1256
|
+
"type": "optional_chain",
|
|
1257
|
+
"named": true
|
|
1258
|
+
}
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1247
1261
|
"type_arguments": {
|
|
1248
1262
|
"multiple": false,
|
|
1249
1263
|
"required": false,
|
|
@@ -2141,9 +2155,13 @@
|
|
|
2141
2155
|
]
|
|
2142
2156
|
},
|
|
2143
2157
|
"kind": {
|
|
2144
|
-
"multiple":
|
|
2158
|
+
"multiple": true,
|
|
2145
2159
|
"required": false,
|
|
2146
2160
|
"types": [
|
|
2161
|
+
{
|
|
2162
|
+
"type": "await",
|
|
2163
|
+
"named": false
|
|
2164
|
+
},
|
|
2147
2165
|
{
|
|
2148
2166
|
"type": "const",
|
|
2149
2167
|
"named": false
|
|
@@ -2152,6 +2170,10 @@
|
|
|
2152
2170
|
"type": "let",
|
|
2153
2171
|
"named": false
|
|
2154
2172
|
},
|
|
2173
|
+
{
|
|
2174
|
+
"type": "using",
|
|
2175
|
+
"named": false
|
|
2176
|
+
},
|
|
2155
2177
|
{
|
|
2156
2178
|
"type": "var",
|
|
2157
2179
|
"named": false
|
|
@@ -2306,6 +2328,10 @@
|
|
|
2306
2328
|
"type": "sequence_expression",
|
|
2307
2329
|
"named": true
|
|
2308
2330
|
},
|
|
2331
|
+
{
|
|
2332
|
+
"type": "using_declaration",
|
|
2333
|
+
"named": true
|
|
2334
|
+
},
|
|
2309
2335
|
{
|
|
2310
2336
|
"type": "variable_declaration",
|
|
2311
2337
|
"named": true
|
|
@@ -4178,11 +4204,6 @@
|
|
|
4178
4204
|
]
|
|
4179
4205
|
}
|
|
4180
4206
|
},
|
|
4181
|
-
{
|
|
4182
|
-
"type": "optional_chain",
|
|
4183
|
-
"named": true,
|
|
4184
|
-
"fields": {}
|
|
4185
|
-
},
|
|
4186
4207
|
{
|
|
4187
4208
|
"type": "optional_parameter",
|
|
4188
4209
|
"named": true,
|
|
@@ -4384,22 +4405,10 @@
|
|
|
4384
4405
|
"multiple": false,
|
|
4385
4406
|
"required": true,
|
|
4386
4407
|
"types": [
|
|
4387
|
-
{
|
|
4388
|
-
"type": "call_expression",
|
|
4389
|
-
"named": true
|
|
4390
|
-
},
|
|
4391
4408
|
{
|
|
4392
4409
|
"type": "expression",
|
|
4393
4410
|
"named": true
|
|
4394
4411
|
},
|
|
4395
|
-
{
|
|
4396
|
-
"type": "identifier",
|
|
4397
|
-
"named": true
|
|
4398
|
-
},
|
|
4399
|
-
{
|
|
4400
|
-
"type": "member_expression",
|
|
4401
|
-
"named": true
|
|
4402
|
-
},
|
|
4403
4412
|
{
|
|
4404
4413
|
"type": "sequence_expression",
|
|
4405
4414
|
"named": true
|
|
@@ -5499,6 +5508,36 @@
|
|
|
5499
5508
|
}
|
|
5500
5509
|
}
|
|
5501
5510
|
},
|
|
5511
|
+
{
|
|
5512
|
+
"type": "using_declaration",
|
|
5513
|
+
"named": true,
|
|
5514
|
+
"fields": {
|
|
5515
|
+
"kind": {
|
|
5516
|
+
"multiple": true,
|
|
5517
|
+
"required": true,
|
|
5518
|
+
"types": [
|
|
5519
|
+
{
|
|
5520
|
+
"type": "await",
|
|
5521
|
+
"named": false
|
|
5522
|
+
},
|
|
5523
|
+
{
|
|
5524
|
+
"type": "using",
|
|
5525
|
+
"named": false
|
|
5526
|
+
}
|
|
5527
|
+
]
|
|
5528
|
+
}
|
|
5529
|
+
},
|
|
5530
|
+
"children": {
|
|
5531
|
+
"multiple": true,
|
|
5532
|
+
"required": true,
|
|
5533
|
+
"types": [
|
|
5534
|
+
{
|
|
5535
|
+
"type": "variable_declarator",
|
|
5536
|
+
"named": true
|
|
5537
|
+
}
|
|
5538
|
+
]
|
|
5539
|
+
}
|
|
5540
|
+
},
|
|
5502
5541
|
{
|
|
5503
5542
|
"type": "variable_declaration",
|
|
5504
5543
|
"named": true,
|
|
@@ -5825,10 +5864,6 @@
|
|
|
5825
5864
|
"type": "?",
|
|
5826
5865
|
"named": false
|
|
5827
5866
|
},
|
|
5828
|
-
{
|
|
5829
|
-
"type": "?.",
|
|
5830
|
-
"named": false
|
|
5831
|
-
},
|
|
5832
5867
|
{
|
|
5833
5868
|
"type": "?:",
|
|
5834
5869
|
"named": false
|
|
@@ -6095,6 +6130,10 @@
|
|
|
6095
6130
|
"type": "of",
|
|
6096
6131
|
"named": false
|
|
6097
6132
|
},
|
|
6133
|
+
{
|
|
6134
|
+
"type": "optional_chain",
|
|
6135
|
+
"named": true
|
|
6136
|
+
},
|
|
6098
6137
|
{
|
|
6099
6138
|
"type": "override",
|
|
6100
6139
|
"named": false
|
|
@@ -55,6 +55,10 @@
|
|
|
55
55
|
"type": "type_alias_declaration",
|
|
56
56
|
"named": true
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
"type": "using_declaration",
|
|
60
|
+
"named": true
|
|
61
|
+
},
|
|
58
62
|
{
|
|
59
63
|
"type": "variable_declaration",
|
|
60
64
|
"named": true
|
|
@@ -1240,6 +1244,16 @@
|
|
|
1240
1244
|
}
|
|
1241
1245
|
]
|
|
1242
1246
|
},
|
|
1247
|
+
"optional_chain": {
|
|
1248
|
+
"multiple": false,
|
|
1249
|
+
"required": false,
|
|
1250
|
+
"types": [
|
|
1251
|
+
{
|
|
1252
|
+
"type": "optional_chain",
|
|
1253
|
+
"named": true
|
|
1254
|
+
}
|
|
1255
|
+
]
|
|
1256
|
+
},
|
|
1243
1257
|
"type_arguments": {
|
|
1244
1258
|
"multiple": false,
|
|
1245
1259
|
"required": false,
|
|
@@ -2137,9 +2151,13 @@
|
|
|
2137
2151
|
]
|
|
2138
2152
|
},
|
|
2139
2153
|
"kind": {
|
|
2140
|
-
"multiple":
|
|
2154
|
+
"multiple": true,
|
|
2141
2155
|
"required": false,
|
|
2142
2156
|
"types": [
|
|
2157
|
+
{
|
|
2158
|
+
"type": "await",
|
|
2159
|
+
"named": false
|
|
2160
|
+
},
|
|
2143
2161
|
{
|
|
2144
2162
|
"type": "const",
|
|
2145
2163
|
"named": false
|
|
@@ -2148,6 +2166,10 @@
|
|
|
2148
2166
|
"type": "let",
|
|
2149
2167
|
"named": false
|
|
2150
2168
|
},
|
|
2169
|
+
{
|
|
2170
|
+
"type": "using",
|
|
2171
|
+
"named": false
|
|
2172
|
+
},
|
|
2151
2173
|
{
|
|
2152
2174
|
"type": "var",
|
|
2153
2175
|
"named": false
|
|
@@ -2302,6 +2324,10 @@
|
|
|
2302
2324
|
"type": "sequence_expression",
|
|
2303
2325
|
"named": true
|
|
2304
2326
|
},
|
|
2327
|
+
{
|
|
2328
|
+
"type": "using_declaration",
|
|
2329
|
+
"named": true
|
|
2330
|
+
},
|
|
2305
2331
|
{
|
|
2306
2332
|
"type": "variable_declaration",
|
|
2307
2333
|
"named": true
|
|
@@ -3929,11 +3955,6 @@
|
|
|
3929
3955
|
]
|
|
3930
3956
|
}
|
|
3931
3957
|
},
|
|
3932
|
-
{
|
|
3933
|
-
"type": "optional_chain",
|
|
3934
|
-
"named": true,
|
|
3935
|
-
"fields": {}
|
|
3936
|
-
},
|
|
3937
3958
|
{
|
|
3938
3959
|
"type": "optional_parameter",
|
|
3939
3960
|
"named": true,
|
|
@@ -4135,22 +4156,10 @@
|
|
|
4135
4156
|
"multiple": false,
|
|
4136
4157
|
"required": true,
|
|
4137
4158
|
"types": [
|
|
4138
|
-
{
|
|
4139
|
-
"type": "call_expression",
|
|
4140
|
-
"named": true
|
|
4141
|
-
},
|
|
4142
4159
|
{
|
|
4143
4160
|
"type": "expression",
|
|
4144
4161
|
"named": true
|
|
4145
4162
|
},
|
|
4146
|
-
{
|
|
4147
|
-
"type": "identifier",
|
|
4148
|
-
"named": true
|
|
4149
|
-
},
|
|
4150
|
-
{
|
|
4151
|
-
"type": "member_expression",
|
|
4152
|
-
"named": true
|
|
4153
|
-
},
|
|
4154
4163
|
{
|
|
4155
4164
|
"type": "sequence_expression",
|
|
4156
4165
|
"named": true
|
|
@@ -5265,6 +5274,36 @@
|
|
|
5265
5274
|
}
|
|
5266
5275
|
}
|
|
5267
5276
|
},
|
|
5277
|
+
{
|
|
5278
|
+
"type": "using_declaration",
|
|
5279
|
+
"named": true,
|
|
5280
|
+
"fields": {
|
|
5281
|
+
"kind": {
|
|
5282
|
+
"multiple": true,
|
|
5283
|
+
"required": true,
|
|
5284
|
+
"types": [
|
|
5285
|
+
{
|
|
5286
|
+
"type": "await",
|
|
5287
|
+
"named": false
|
|
5288
|
+
},
|
|
5289
|
+
{
|
|
5290
|
+
"type": "using",
|
|
5291
|
+
"named": false
|
|
5292
|
+
}
|
|
5293
|
+
]
|
|
5294
|
+
}
|
|
5295
|
+
},
|
|
5296
|
+
"children": {
|
|
5297
|
+
"multiple": true,
|
|
5298
|
+
"required": true,
|
|
5299
|
+
"types": [
|
|
5300
|
+
{
|
|
5301
|
+
"type": "variable_declarator",
|
|
5302
|
+
"named": true
|
|
5303
|
+
}
|
|
5304
|
+
]
|
|
5305
|
+
}
|
|
5306
|
+
},
|
|
5268
5307
|
{
|
|
5269
5308
|
"type": "variable_declaration",
|
|
5270
5309
|
"named": true,
|
|
@@ -5583,10 +5622,6 @@
|
|
|
5583
5622
|
"type": "?",
|
|
5584
5623
|
"named": false
|
|
5585
5624
|
},
|
|
5586
|
-
{
|
|
5587
|
-
"type": "?.",
|
|
5588
|
-
"named": false
|
|
5589
|
-
},
|
|
5590
5625
|
{
|
|
5591
5626
|
"type": "?:",
|
|
5592
5627
|
"named": false
|
|
@@ -5845,6 +5880,10 @@
|
|
|
5845
5880
|
"type": "of",
|
|
5846
5881
|
"named": false
|
|
5847
5882
|
},
|
|
5883
|
+
{
|
|
5884
|
+
"type": "optional_chain",
|
|
5885
|
+
"named": true
|
|
5886
|
+
},
|
|
5848
5887
|
{
|
|
5849
5888
|
"type": "override",
|
|
5850
5889
|
"named": false
|