oxc-parser 0.121.0 → 0.124.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/package.json +27 -27
- package/src-js/bindings.js +52 -52
- package/src-js/generated/constants.js +12 -4
- package/src-js/generated/deserialize/js.js +543 -501
- package/src-js/generated/deserialize/js_range.js +549 -515
- package/src-js/generated/deserialize/ts.js +599 -556
- package/src-js/generated/deserialize/ts_range.js +597 -565
- package/src-js/generated/lazy/constructors.js +462 -474
- package/src-js/generated/lazy/walk.js +285 -285
|
@@ -1,31 +1,46 @@
|
|
|
1
1
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
3
|
|
|
4
|
-
let uint8,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
let uint8,
|
|
5
|
+
uint32,
|
|
6
|
+
float64,
|
|
7
|
+
sourceText,
|
|
8
|
+
sourceTextLatin,
|
|
9
|
+
sourceEndPos = 0,
|
|
10
|
+
firstNonAsciiPos = 0;
|
|
11
|
+
|
|
12
|
+
const { fromCharCode } = String,
|
|
13
|
+
{ utf8Slice, latin1Slice } = Buffer.prototype,
|
|
14
|
+
stringDecodeArrays = Array(65).fill(null);
|
|
15
|
+
for (let i = 0; i <= 64; i++) stringDecodeArrays[i] = Array(i).fill(0);
|
|
9
16
|
|
|
10
17
|
export function deserialize(buffer, sourceText, sourceByteLen) {
|
|
11
18
|
sourceEndPos = sourceByteLen;
|
|
12
|
-
|
|
13
|
-
resetBuffer();
|
|
14
|
-
return data;
|
|
19
|
+
return deserializeWith(buffer, sourceText, sourceByteLen, deserializeRawTransferData);
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
function deserializeWith(buffer, sourceTextInput, sourceByteLen,
|
|
22
|
+
function deserializeWith(buffer, sourceTextInput, sourceByteLen, deserialize) {
|
|
18
23
|
uint8 = buffer;
|
|
19
24
|
uint32 = buffer.uint32;
|
|
20
25
|
float64 = buffer.float64;
|
|
21
26
|
sourceText = sourceTextInput;
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
if (sourceText.length === sourceByteLen) {
|
|
28
|
+
firstNonAsciiPos = sourceByteLen;
|
|
29
|
+
sourceTextLatin = sourceText;
|
|
30
|
+
} else {
|
|
31
|
+
let i = 0;
|
|
32
|
+
for (; i < sourceByteLen && uint8[i] < 128; i++);
|
|
33
|
+
firstNonAsciiPos = i;
|
|
34
|
+
sourceTextLatin = latin1Slice.call(uint8, 0, sourceByteLen);
|
|
35
|
+
}
|
|
36
|
+
let data = deserialize(uint32[536870900]);
|
|
37
|
+
resetBuffer();
|
|
38
|
+
return data;
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
export function resetBuffer() {
|
|
27
|
-
// Clear buffer and source text
|
|
28
|
-
uint8 = uint32 = float64 = sourceText = void 0;
|
|
42
|
+
// Clear buffer and source text strings to allow them to be garbage collected
|
|
43
|
+
uint8 = uint32 = float64 = sourceText = sourceTextLatin = void 0;
|
|
29
44
|
}
|
|
30
45
|
|
|
31
46
|
function deserializeProgram(pos) {
|
|
@@ -39,9 +54,9 @@ function deserializeProgram(pos) {
|
|
|
39
54
|
end,
|
|
40
55
|
range: [0, end],
|
|
41
56
|
};
|
|
42
|
-
program.hashbang = deserializeOptionHashbang(pos +
|
|
43
|
-
let body = (program.body = deserializeVecDirective(pos +
|
|
44
|
-
body.push(...deserializeVecStatement(pos +
|
|
57
|
+
program.hashbang = deserializeOptionHashbang(pos + 56);
|
|
58
|
+
let body = (program.body = deserializeVecDirective(pos + 88));
|
|
59
|
+
body.push(...deserializeVecStatement(pos + 112));
|
|
45
60
|
{
|
|
46
61
|
let start;
|
|
47
62
|
if (body.length > 0) {
|
|
@@ -163,7 +178,7 @@ function deserializeIdentifierName(pos) {
|
|
|
163
178
|
node = {
|
|
164
179
|
type: "Identifier",
|
|
165
180
|
decorators: null,
|
|
166
|
-
name: deserializeStr(pos +
|
|
181
|
+
name: deserializeStr(pos + 16),
|
|
167
182
|
optional: null,
|
|
168
183
|
typeAnnotation: null,
|
|
169
184
|
start: (start = deserializeU32(pos)),
|
|
@@ -181,7 +196,7 @@ function deserializeIdentifierReference(pos) {
|
|
|
181
196
|
node = {
|
|
182
197
|
type: "Identifier",
|
|
183
198
|
decorators: null,
|
|
184
|
-
name: deserializeStr(pos +
|
|
199
|
+
name: deserializeStr(pos + 16),
|
|
185
200
|
optional: null,
|
|
186
201
|
typeAnnotation: null,
|
|
187
202
|
start: (start = deserializeU32(pos)),
|
|
@@ -199,7 +214,7 @@ function deserializeBindingIdentifier(pos) {
|
|
|
199
214
|
node = {
|
|
200
215
|
type: "Identifier",
|
|
201
216
|
decorators: null,
|
|
202
|
-
name: deserializeStr(pos +
|
|
217
|
+
name: deserializeStr(pos + 16),
|
|
203
218
|
optional: null,
|
|
204
219
|
typeAnnotation: null,
|
|
205
220
|
start: (start = deserializeU32(pos)),
|
|
@@ -217,7 +232,7 @@ function deserializeLabelIdentifier(pos) {
|
|
|
217
232
|
node = {
|
|
218
233
|
type: "Identifier",
|
|
219
234
|
decorators: null,
|
|
220
|
-
name: deserializeStr(pos +
|
|
235
|
+
name: deserializeStr(pos + 16),
|
|
221
236
|
optional: null,
|
|
222
237
|
typeAnnotation: null,
|
|
223
238
|
start: (start = deserializeU32(pos)),
|
|
@@ -249,7 +264,7 @@ function deserializeArrayExpression(pos) {
|
|
|
249
264
|
end: (end = deserializeU32(pos + 4)),
|
|
250
265
|
range: [start, end],
|
|
251
266
|
};
|
|
252
|
-
node.elements = deserializeVecArrayExpressionElement(pos +
|
|
267
|
+
node.elements = deserializeVecArrayExpressionElement(pos + 16);
|
|
253
268
|
return node;
|
|
254
269
|
}
|
|
255
270
|
|
|
@@ -364,7 +379,7 @@ function deserializeObjectExpression(pos) {
|
|
|
364
379
|
end: (end = deserializeU32(pos + 4)),
|
|
365
380
|
range: [start, end],
|
|
366
381
|
};
|
|
367
|
-
node.properties = deserializeVecObjectPropertyKind(pos +
|
|
382
|
+
node.properties = deserializeVecObjectPropertyKind(pos + 16);
|
|
368
383
|
return node;
|
|
369
384
|
}
|
|
370
385
|
|
|
@@ -384,19 +399,19 @@ function deserializeObjectProperty(pos) {
|
|
|
384
399
|
end,
|
|
385
400
|
node = {
|
|
386
401
|
type: "Property",
|
|
387
|
-
kind: deserializePropertyKind(pos +
|
|
402
|
+
kind: deserializePropertyKind(pos + 12),
|
|
388
403
|
key: null,
|
|
389
404
|
value: null,
|
|
390
|
-
method: deserializeBool(pos +
|
|
391
|
-
shorthand: deserializeBool(pos +
|
|
392
|
-
computed: deserializeBool(pos +
|
|
405
|
+
method: deserializeBool(pos + 13),
|
|
406
|
+
shorthand: deserializeBool(pos + 14),
|
|
407
|
+
computed: deserializeBool(pos + 15),
|
|
393
408
|
optional: null,
|
|
394
409
|
start: (start = deserializeU32(pos)),
|
|
395
410
|
end: (end = deserializeU32(pos + 4)),
|
|
396
411
|
range: [start, end],
|
|
397
412
|
};
|
|
398
|
-
node.key = deserializePropertyKey(pos +
|
|
399
|
-
node.value = deserializeExpression(pos +
|
|
413
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
414
|
+
node.value = deserializeExpression(pos + 32);
|
|
400
415
|
node.optional = false;
|
|
401
416
|
return node;
|
|
402
417
|
}
|
|
@@ -522,8 +537,8 @@ function deserializeTemplateLiteral(pos) {
|
|
|
522
537
|
end: (end = deserializeU32(pos + 4)),
|
|
523
538
|
range: [start, end],
|
|
524
539
|
};
|
|
525
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
526
|
-
node.expressions = deserializeVecExpression(pos +
|
|
540
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
541
|
+
node.expressions = deserializeVecExpression(pos + 40);
|
|
527
542
|
return node;
|
|
528
543
|
}
|
|
529
544
|
|
|
@@ -539,19 +554,19 @@ function deserializeTaggedTemplateExpression(pos) {
|
|
|
539
554
|
end: (end = deserializeU32(pos + 4)),
|
|
540
555
|
range: [start, end],
|
|
541
556
|
};
|
|
542
|
-
node.tag = deserializeExpression(pos +
|
|
543
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
544
|
-
node.quasi = deserializeTemplateLiteral(pos +
|
|
557
|
+
node.tag = deserializeExpression(pos + 16);
|
|
558
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
559
|
+
node.quasi = deserializeTemplateLiteral(pos + 40);
|
|
545
560
|
return node;
|
|
546
561
|
}
|
|
547
562
|
|
|
548
563
|
function deserializeTemplateElement(pos) {
|
|
549
|
-
let tail = deserializeBool(pos +
|
|
564
|
+
let tail = deserializeBool(pos + 12),
|
|
550
565
|
start = deserializeU32(pos) - 1,
|
|
551
566
|
end = deserializeU32(pos + 4) + 2 - tail,
|
|
552
|
-
value = deserializeTemplateElementValue(pos +
|
|
567
|
+
value = deserializeTemplateElementValue(pos + 16);
|
|
553
568
|
value.cooked !== null &&
|
|
554
|
-
deserializeBool(pos +
|
|
569
|
+
deserializeBool(pos + 13) &&
|
|
555
570
|
(value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) =>
|
|
556
571
|
String.fromCodePoint(parseInt(hex, 16)),
|
|
557
572
|
));
|
|
@@ -579,14 +594,14 @@ function deserializeComputedMemberExpression(pos) {
|
|
|
579
594
|
type: "MemberExpression",
|
|
580
595
|
object: null,
|
|
581
596
|
property: null,
|
|
582
|
-
optional: deserializeBool(pos +
|
|
597
|
+
optional: deserializeBool(pos + 12),
|
|
583
598
|
computed: null,
|
|
584
599
|
start: (start = deserializeU32(pos)),
|
|
585
600
|
end: (end = deserializeU32(pos + 4)),
|
|
586
601
|
range: [start, end],
|
|
587
602
|
};
|
|
588
|
-
node.object = deserializeExpression(pos +
|
|
589
|
-
node.property = deserializeExpression(pos +
|
|
603
|
+
node.object = deserializeExpression(pos + 16);
|
|
604
|
+
node.property = deserializeExpression(pos + 32);
|
|
590
605
|
node.computed = true;
|
|
591
606
|
return node;
|
|
592
607
|
}
|
|
@@ -598,14 +613,14 @@ function deserializeStaticMemberExpression(pos) {
|
|
|
598
613
|
type: "MemberExpression",
|
|
599
614
|
object: null,
|
|
600
615
|
property: null,
|
|
601
|
-
optional: deserializeBool(pos +
|
|
616
|
+
optional: deserializeBool(pos + 12),
|
|
602
617
|
computed: null,
|
|
603
618
|
start: (start = deserializeU32(pos)),
|
|
604
619
|
end: (end = deserializeU32(pos + 4)),
|
|
605
620
|
range: [start, end],
|
|
606
621
|
};
|
|
607
|
-
node.object = deserializeExpression(pos +
|
|
608
|
-
node.property = deserializeIdentifierName(pos +
|
|
622
|
+
node.object = deserializeExpression(pos + 16);
|
|
623
|
+
node.property = deserializeIdentifierName(pos + 32);
|
|
609
624
|
node.computed = false;
|
|
610
625
|
return node;
|
|
611
626
|
}
|
|
@@ -617,14 +632,14 @@ function deserializePrivateFieldExpression(pos) {
|
|
|
617
632
|
type: "MemberExpression",
|
|
618
633
|
object: null,
|
|
619
634
|
property: null,
|
|
620
|
-
optional: deserializeBool(pos +
|
|
635
|
+
optional: deserializeBool(pos + 12),
|
|
621
636
|
computed: null,
|
|
622
637
|
start: (start = deserializeU32(pos)),
|
|
623
638
|
end: (end = deserializeU32(pos + 4)),
|
|
624
639
|
range: [start, end],
|
|
625
640
|
};
|
|
626
|
-
node.object = deserializeExpression(pos +
|
|
627
|
-
node.property = deserializePrivateIdentifier(pos +
|
|
641
|
+
node.object = deserializeExpression(pos + 16);
|
|
642
|
+
node.property = deserializePrivateIdentifier(pos + 32);
|
|
628
643
|
node.computed = false;
|
|
629
644
|
return node;
|
|
630
645
|
}
|
|
@@ -637,14 +652,14 @@ function deserializeCallExpression(pos) {
|
|
|
637
652
|
callee: null,
|
|
638
653
|
typeArguments: null,
|
|
639
654
|
arguments: null,
|
|
640
|
-
optional: deserializeBool(pos +
|
|
655
|
+
optional: deserializeBool(pos + 12),
|
|
641
656
|
start: (start = deserializeU32(pos)),
|
|
642
657
|
end: (end = deserializeU32(pos + 4)),
|
|
643
658
|
range: [start, end],
|
|
644
659
|
};
|
|
645
|
-
node.callee = deserializeExpression(pos +
|
|
646
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
647
|
-
node.arguments = deserializeVecArgument(pos +
|
|
660
|
+
node.callee = deserializeExpression(pos + 16);
|
|
661
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
662
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
648
663
|
return node;
|
|
649
664
|
}
|
|
650
665
|
|
|
@@ -660,9 +675,9 @@ function deserializeNewExpression(pos) {
|
|
|
660
675
|
end: (end = deserializeU32(pos + 4)),
|
|
661
676
|
range: [start, end],
|
|
662
677
|
};
|
|
663
|
-
node.callee = deserializeExpression(pos +
|
|
664
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
665
|
-
node.arguments = deserializeVecArgument(pos +
|
|
678
|
+
node.callee = deserializeExpression(pos + 16);
|
|
679
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
680
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
666
681
|
return node;
|
|
667
682
|
}
|
|
668
683
|
|
|
@@ -677,8 +692,8 @@ function deserializeMetaProperty(pos) {
|
|
|
677
692
|
end: (end = deserializeU32(pos + 4)),
|
|
678
693
|
range: [start, end],
|
|
679
694
|
};
|
|
680
|
-
node.meta = deserializeIdentifierName(pos +
|
|
681
|
-
node.property = deserializeIdentifierName(pos +
|
|
695
|
+
node.meta = deserializeIdentifierName(pos + 16);
|
|
696
|
+
node.property = deserializeIdentifierName(pos + 48);
|
|
682
697
|
return node;
|
|
683
698
|
}
|
|
684
699
|
|
|
@@ -692,7 +707,7 @@ function deserializeSpreadElement(pos) {
|
|
|
692
707
|
end: (end = deserializeU32(pos + 4)),
|
|
693
708
|
range: [start, end],
|
|
694
709
|
};
|
|
695
|
-
node.argument = deserializeExpression(pos +
|
|
710
|
+
node.argument = deserializeExpression(pos + 16);
|
|
696
711
|
return node;
|
|
697
712
|
}
|
|
698
713
|
|
|
@@ -796,14 +811,14 @@ function deserializeUpdateExpression(pos) {
|
|
|
796
811
|
end,
|
|
797
812
|
node = {
|
|
798
813
|
type: "UpdateExpression",
|
|
799
|
-
operator: deserializeUpdateOperator(pos +
|
|
800
|
-
prefix: deserializeBool(pos +
|
|
814
|
+
operator: deserializeUpdateOperator(pos + 12),
|
|
815
|
+
prefix: deserializeBool(pos + 13),
|
|
801
816
|
argument: null,
|
|
802
817
|
start: (start = deserializeU32(pos)),
|
|
803
818
|
end: (end = deserializeU32(pos + 4)),
|
|
804
819
|
range: [start, end],
|
|
805
820
|
};
|
|
806
|
-
node.argument = deserializeSimpleAssignmentTarget(pos +
|
|
821
|
+
node.argument = deserializeSimpleAssignmentTarget(pos + 16);
|
|
807
822
|
return node;
|
|
808
823
|
}
|
|
809
824
|
|
|
@@ -812,14 +827,14 @@ function deserializeUnaryExpression(pos) {
|
|
|
812
827
|
end,
|
|
813
828
|
node = {
|
|
814
829
|
type: "UnaryExpression",
|
|
815
|
-
operator: deserializeUnaryOperator(pos +
|
|
830
|
+
operator: deserializeUnaryOperator(pos + 12),
|
|
816
831
|
argument: null,
|
|
817
832
|
prefix: null,
|
|
818
833
|
start: (start = deserializeU32(pos)),
|
|
819
834
|
end: (end = deserializeU32(pos + 4)),
|
|
820
835
|
range: [start, end],
|
|
821
836
|
};
|
|
822
|
-
node.argument = deserializeExpression(pos +
|
|
837
|
+
node.argument = deserializeExpression(pos + 16);
|
|
823
838
|
node.prefix = true;
|
|
824
839
|
return node;
|
|
825
840
|
}
|
|
@@ -830,14 +845,14 @@ function deserializeBinaryExpression(pos) {
|
|
|
830
845
|
node = {
|
|
831
846
|
type: "BinaryExpression",
|
|
832
847
|
left: null,
|
|
833
|
-
operator: deserializeBinaryOperator(pos +
|
|
848
|
+
operator: deserializeBinaryOperator(pos + 12),
|
|
834
849
|
right: null,
|
|
835
850
|
start: (start = deserializeU32(pos)),
|
|
836
851
|
end: (end = deserializeU32(pos + 4)),
|
|
837
852
|
range: [start, end],
|
|
838
853
|
};
|
|
839
|
-
node.left = deserializeExpression(pos +
|
|
840
|
-
node.right = deserializeExpression(pos +
|
|
854
|
+
node.left = deserializeExpression(pos + 16);
|
|
855
|
+
node.right = deserializeExpression(pos + 32);
|
|
841
856
|
return node;
|
|
842
857
|
}
|
|
843
858
|
|
|
@@ -853,9 +868,9 @@ function deserializePrivateInExpression(pos) {
|
|
|
853
868
|
end: (end = deserializeU32(pos + 4)),
|
|
854
869
|
range: [start, end],
|
|
855
870
|
};
|
|
856
|
-
node.left = deserializePrivateIdentifier(pos +
|
|
871
|
+
node.left = deserializePrivateIdentifier(pos + 16);
|
|
857
872
|
node.operator = "in";
|
|
858
|
-
node.right = deserializeExpression(pos +
|
|
873
|
+
node.right = deserializeExpression(pos + 48);
|
|
859
874
|
return node;
|
|
860
875
|
}
|
|
861
876
|
|
|
@@ -865,14 +880,14 @@ function deserializeLogicalExpression(pos) {
|
|
|
865
880
|
node = {
|
|
866
881
|
type: "LogicalExpression",
|
|
867
882
|
left: null,
|
|
868
|
-
operator: deserializeLogicalOperator(pos +
|
|
883
|
+
operator: deserializeLogicalOperator(pos + 12),
|
|
869
884
|
right: null,
|
|
870
885
|
start: (start = deserializeU32(pos)),
|
|
871
886
|
end: (end = deserializeU32(pos + 4)),
|
|
872
887
|
range: [start, end],
|
|
873
888
|
};
|
|
874
|
-
node.left = deserializeExpression(pos +
|
|
875
|
-
node.right = deserializeExpression(pos +
|
|
889
|
+
node.left = deserializeExpression(pos + 16);
|
|
890
|
+
node.right = deserializeExpression(pos + 32);
|
|
876
891
|
return node;
|
|
877
892
|
}
|
|
878
893
|
|
|
@@ -888,9 +903,9 @@ function deserializeConditionalExpression(pos) {
|
|
|
888
903
|
end: (end = deserializeU32(pos + 4)),
|
|
889
904
|
range: [start, end],
|
|
890
905
|
};
|
|
891
|
-
node.test = deserializeExpression(pos +
|
|
892
|
-
node.consequent = deserializeExpression(pos +
|
|
893
|
-
node.alternate = deserializeExpression(pos +
|
|
906
|
+
node.test = deserializeExpression(pos + 16);
|
|
907
|
+
node.consequent = deserializeExpression(pos + 32);
|
|
908
|
+
node.alternate = deserializeExpression(pos + 48);
|
|
894
909
|
return node;
|
|
895
910
|
}
|
|
896
911
|
|
|
@@ -899,15 +914,15 @@ function deserializeAssignmentExpression(pos) {
|
|
|
899
914
|
end,
|
|
900
915
|
node = {
|
|
901
916
|
type: "AssignmentExpression",
|
|
902
|
-
operator: deserializeAssignmentOperator(pos +
|
|
917
|
+
operator: deserializeAssignmentOperator(pos + 12),
|
|
903
918
|
left: null,
|
|
904
919
|
right: null,
|
|
905
920
|
start: (start = deserializeU32(pos)),
|
|
906
921
|
end: (end = deserializeU32(pos + 4)),
|
|
907
922
|
range: [start, end],
|
|
908
923
|
};
|
|
909
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
910
|
-
node.right = deserializeExpression(pos +
|
|
924
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
925
|
+
node.right = deserializeExpression(pos + 32);
|
|
911
926
|
return node;
|
|
912
927
|
}
|
|
913
928
|
|
|
@@ -974,8 +989,8 @@ function deserializeArrayAssignmentTarget(pos) {
|
|
|
974
989
|
end: (end = deserializeU32(pos + 4)),
|
|
975
990
|
range: [start, end],
|
|
976
991
|
},
|
|
977
|
-
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos +
|
|
978
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
992
|
+
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos + 16),
|
|
993
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
979
994
|
rest !== null && elements.push(rest);
|
|
980
995
|
node.decorators = [];
|
|
981
996
|
node.elements = elements;
|
|
@@ -996,8 +1011,8 @@ function deserializeObjectAssignmentTarget(pos) {
|
|
|
996
1011
|
end: (end = deserializeU32(pos + 4)),
|
|
997
1012
|
range: [start, end],
|
|
998
1013
|
},
|
|
999
|
-
properties = deserializeVecAssignmentTargetProperty(pos +
|
|
1000
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
1014
|
+
properties = deserializeVecAssignmentTargetProperty(pos + 16),
|
|
1015
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
1001
1016
|
rest !== null && properties.push(rest);
|
|
1002
1017
|
node.decorators = [];
|
|
1003
1018
|
node.properties = properties;
|
|
@@ -1020,7 +1035,7 @@ function deserializeAssignmentTargetRest(pos) {
|
|
|
1020
1035
|
range: [start, end],
|
|
1021
1036
|
};
|
|
1022
1037
|
node.decorators = [];
|
|
1023
|
-
node.argument = deserializeAssignmentTarget(pos +
|
|
1038
|
+
node.argument = deserializeAssignmentTarget(pos + 16);
|
|
1024
1039
|
node.optional = false;
|
|
1025
1040
|
return node;
|
|
1026
1041
|
}
|
|
@@ -1069,8 +1084,8 @@ function deserializeAssignmentTargetWithDefault(pos) {
|
|
|
1069
1084
|
range: [start, end],
|
|
1070
1085
|
};
|
|
1071
1086
|
node.decorators = [];
|
|
1072
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
1073
|
-
node.right = deserializeExpression(pos +
|
|
1087
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
1088
|
+
node.right = deserializeExpression(pos + 32);
|
|
1074
1089
|
node.optional = false;
|
|
1075
1090
|
return node;
|
|
1076
1091
|
}
|
|
@@ -1102,7 +1117,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1102
1117
|
end,
|
|
1103
1118
|
range: [start, end],
|
|
1104
1119
|
},
|
|
1105
|
-
key = deserializeIdentifierReference(pos +
|
|
1120
|
+
key = deserializeIdentifierReference(pos + 16),
|
|
1106
1121
|
keyStart,
|
|
1107
1122
|
keyEnd,
|
|
1108
1123
|
value = {
|
|
@@ -1115,7 +1130,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1115
1130
|
end: (keyEnd = key.end),
|
|
1116
1131
|
range: [keyStart, keyEnd],
|
|
1117
1132
|
},
|
|
1118
|
-
init = deserializeOptionExpression(pos +
|
|
1133
|
+
init = deserializeOptionExpression(pos + 48);
|
|
1119
1134
|
init !== null &&
|
|
1120
1135
|
(value = {
|
|
1121
1136
|
type: "AssignmentPattern",
|
|
@@ -1148,15 +1163,15 @@ function deserializeAssignmentTargetPropertyProperty(pos) {
|
|
|
1148
1163
|
value: null,
|
|
1149
1164
|
method: null,
|
|
1150
1165
|
shorthand: null,
|
|
1151
|
-
computed: deserializeBool(pos +
|
|
1166
|
+
computed: deserializeBool(pos + 12),
|
|
1152
1167
|
optional: null,
|
|
1153
1168
|
start: (start = deserializeU32(pos)),
|
|
1154
1169
|
end: (end = deserializeU32(pos + 4)),
|
|
1155
1170
|
range: [start, end],
|
|
1156
1171
|
};
|
|
1157
1172
|
node.kind = "init";
|
|
1158
|
-
node.key = deserializePropertyKey(pos +
|
|
1159
|
-
node.value = deserializeAssignmentTargetMaybeDefault(pos +
|
|
1173
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1174
|
+
node.value = deserializeAssignmentTargetMaybeDefault(pos + 32);
|
|
1160
1175
|
node.method = false;
|
|
1161
1176
|
node.shorthand = false;
|
|
1162
1177
|
node.optional = false;
|
|
@@ -1173,7 +1188,7 @@ function deserializeSequenceExpression(pos) {
|
|
|
1173
1188
|
end: (end = deserializeU32(pos + 4)),
|
|
1174
1189
|
range: [start, end],
|
|
1175
1190
|
};
|
|
1176
|
-
node.expressions = deserializeVecExpression(pos +
|
|
1191
|
+
node.expressions = deserializeVecExpression(pos + 16);
|
|
1177
1192
|
return node;
|
|
1178
1193
|
}
|
|
1179
1194
|
|
|
@@ -1197,7 +1212,7 @@ function deserializeAwaitExpression(pos) {
|
|
|
1197
1212
|
end: (end = deserializeU32(pos + 4)),
|
|
1198
1213
|
range: [start, end],
|
|
1199
1214
|
};
|
|
1200
|
-
node.argument = deserializeExpression(pos +
|
|
1215
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1201
1216
|
return node;
|
|
1202
1217
|
}
|
|
1203
1218
|
|
|
@@ -1211,7 +1226,7 @@ function deserializeChainExpression(pos) {
|
|
|
1211
1226
|
end: (end = deserializeU32(pos + 4)),
|
|
1212
1227
|
range: [start, end],
|
|
1213
1228
|
};
|
|
1214
|
-
node.expression = deserializeChainElement(pos +
|
|
1229
|
+
node.expression = deserializeChainElement(pos + 16);
|
|
1215
1230
|
return node;
|
|
1216
1231
|
}
|
|
1217
1232
|
|
|
@@ -1243,7 +1258,7 @@ function deserializeParenthesizedExpression(pos) {
|
|
|
1243
1258
|
end: (end = deserializeU32(pos + 4)),
|
|
1244
1259
|
range: [start, end],
|
|
1245
1260
|
};
|
|
1246
|
-
node.expression = deserializeExpression(pos +
|
|
1261
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1247
1262
|
}
|
|
1248
1263
|
return node;
|
|
1249
1264
|
}
|
|
@@ -1327,12 +1342,12 @@ function deserializeDirective(pos) {
|
|
|
1327
1342
|
node = {
|
|
1328
1343
|
type: "ExpressionStatement",
|
|
1329
1344
|
expression: null,
|
|
1330
|
-
directive: deserializeStr(pos +
|
|
1345
|
+
directive: deserializeStr(pos + 64),
|
|
1331
1346
|
start: (start = deserializeU32(pos)),
|
|
1332
1347
|
end: (end = deserializeU32(pos + 4)),
|
|
1333
1348
|
range: [start, end],
|
|
1334
1349
|
};
|
|
1335
|
-
node.expression = deserializeStringLiteral(pos +
|
|
1350
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
1336
1351
|
return node;
|
|
1337
1352
|
}
|
|
1338
1353
|
|
|
@@ -1340,7 +1355,7 @@ function deserializeHashbang(pos) {
|
|
|
1340
1355
|
let start, end;
|
|
1341
1356
|
return {
|
|
1342
1357
|
type: "Hashbang",
|
|
1343
|
-
value: deserializeStr(pos +
|
|
1358
|
+
value: deserializeStr(pos + 16),
|
|
1344
1359
|
start: (start = deserializeU32(pos)),
|
|
1345
1360
|
end: (end = deserializeU32(pos + 4)),
|
|
1346
1361
|
range: [start, end],
|
|
@@ -1357,7 +1372,7 @@ function deserializeBlockStatement(pos) {
|
|
|
1357
1372
|
end: (end = deserializeU32(pos + 4)),
|
|
1358
1373
|
range: [start, end],
|
|
1359
1374
|
};
|
|
1360
|
-
node.body = deserializeVecStatement(pos +
|
|
1375
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
1361
1376
|
return node;
|
|
1362
1377
|
}
|
|
1363
1378
|
|
|
@@ -1391,14 +1406,14 @@ function deserializeVariableDeclaration(pos) {
|
|
|
1391
1406
|
end,
|
|
1392
1407
|
node = {
|
|
1393
1408
|
type: "VariableDeclaration",
|
|
1394
|
-
kind: deserializeVariableDeclarationKind(pos +
|
|
1409
|
+
kind: deserializeVariableDeclarationKind(pos + 12),
|
|
1395
1410
|
declarations: null,
|
|
1396
|
-
declare: deserializeBool(pos +
|
|
1411
|
+
declare: deserializeBool(pos + 13),
|
|
1397
1412
|
start: (start = deserializeU32(pos)),
|
|
1398
1413
|
end: (end = deserializeU32(pos + 4)),
|
|
1399
1414
|
range: [start, end],
|
|
1400
1415
|
};
|
|
1401
|
-
node.declarations = deserializeVecVariableDeclarator(pos +
|
|
1416
|
+
node.declarations = deserializeVecVariableDeclarator(pos + 16);
|
|
1402
1417
|
return node;
|
|
1403
1418
|
}
|
|
1404
1419
|
|
|
@@ -1420,27 +1435,28 @@ function deserializeVariableDeclarationKind(pos) {
|
|
|
1420
1435
|
}
|
|
1421
1436
|
|
|
1422
1437
|
function deserializeVariableDeclarator(pos) {
|
|
1423
|
-
let
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1438
|
+
let start,
|
|
1439
|
+
end,
|
|
1440
|
+
node = {
|
|
1441
|
+
type: "VariableDeclarator",
|
|
1442
|
+
id: null,
|
|
1443
|
+
init: null,
|
|
1444
|
+
definite: deserializeBool(pos + 13),
|
|
1445
|
+
start: (start = deserializeU32(pos)),
|
|
1446
|
+
end: (end = deserializeU32(pos + 4)),
|
|
1447
|
+
range: [start, end],
|
|
1448
|
+
},
|
|
1449
|
+
pattern = deserializeBindingPattern(pos + 16);
|
|
1433
1450
|
{
|
|
1434
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1435
|
-
variableDeclarator.id.typeAnnotation = typeAnnotation;
|
|
1451
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1436
1452
|
if (typeAnnotation !== null) {
|
|
1437
|
-
|
|
1438
|
-
|
|
1453
|
+
pattern.typeAnnotation = typeAnnotation;
|
|
1454
|
+
pattern.range[1] = pattern.end = typeAnnotation.end;
|
|
1439
1455
|
}
|
|
1440
|
-
variableDeclarator.definite = deserializeBool(pos + 53);
|
|
1441
1456
|
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1457
|
+
node.id = pattern;
|
|
1458
|
+
node.init = deserializeOptionExpression(pos + 40);
|
|
1459
|
+
return node;
|
|
1444
1460
|
}
|
|
1445
1461
|
|
|
1446
1462
|
function deserializeEmptyStatement(pos) {
|
|
@@ -1464,7 +1480,7 @@ function deserializeExpressionStatement(pos) {
|
|
|
1464
1480
|
end: (end = deserializeU32(pos + 4)),
|
|
1465
1481
|
range: [start, end],
|
|
1466
1482
|
};
|
|
1467
|
-
node.expression = deserializeExpression(pos +
|
|
1483
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1468
1484
|
return node;
|
|
1469
1485
|
}
|
|
1470
1486
|
|
|
@@ -1480,9 +1496,9 @@ function deserializeIfStatement(pos) {
|
|
|
1480
1496
|
end: (end = deserializeU32(pos + 4)),
|
|
1481
1497
|
range: [start, end],
|
|
1482
1498
|
};
|
|
1483
|
-
node.test = deserializeExpression(pos +
|
|
1484
|
-
node.consequent = deserializeStatement(pos +
|
|
1485
|
-
node.alternate = deserializeOptionStatement(pos +
|
|
1499
|
+
node.test = deserializeExpression(pos + 16);
|
|
1500
|
+
node.consequent = deserializeStatement(pos + 32);
|
|
1501
|
+
node.alternate = deserializeOptionStatement(pos + 48);
|
|
1486
1502
|
return node;
|
|
1487
1503
|
}
|
|
1488
1504
|
|
|
@@ -1497,8 +1513,8 @@ function deserializeDoWhileStatement(pos) {
|
|
|
1497
1513
|
end: (end = deserializeU32(pos + 4)),
|
|
1498
1514
|
range: [start, end],
|
|
1499
1515
|
};
|
|
1500
|
-
node.body = deserializeStatement(pos +
|
|
1501
|
-
node.test = deserializeExpression(pos +
|
|
1516
|
+
node.body = deserializeStatement(pos + 16);
|
|
1517
|
+
node.test = deserializeExpression(pos + 32);
|
|
1502
1518
|
return node;
|
|
1503
1519
|
}
|
|
1504
1520
|
|
|
@@ -1513,8 +1529,8 @@ function deserializeWhileStatement(pos) {
|
|
|
1513
1529
|
end: (end = deserializeU32(pos + 4)),
|
|
1514
1530
|
range: [start, end],
|
|
1515
1531
|
};
|
|
1516
|
-
node.test = deserializeExpression(pos +
|
|
1517
|
-
node.body = deserializeStatement(pos +
|
|
1532
|
+
node.test = deserializeExpression(pos + 16);
|
|
1533
|
+
node.body = deserializeStatement(pos + 32);
|
|
1518
1534
|
return node;
|
|
1519
1535
|
}
|
|
1520
1536
|
|
|
@@ -1531,10 +1547,10 @@ function deserializeForStatement(pos) {
|
|
|
1531
1547
|
end: (end = deserializeU32(pos + 4)),
|
|
1532
1548
|
range: [start, end],
|
|
1533
1549
|
};
|
|
1534
|
-
node.init = deserializeOptionForStatementInit(pos +
|
|
1535
|
-
node.test = deserializeOptionExpression(pos +
|
|
1536
|
-
node.update = deserializeOptionExpression(pos +
|
|
1537
|
-
node.body = deserializeStatement(pos +
|
|
1550
|
+
node.init = deserializeOptionForStatementInit(pos + 16);
|
|
1551
|
+
node.test = deserializeOptionExpression(pos + 32);
|
|
1552
|
+
node.update = deserializeOptionExpression(pos + 48);
|
|
1553
|
+
node.body = deserializeStatement(pos + 64);
|
|
1538
1554
|
return node;
|
|
1539
1555
|
}
|
|
1540
1556
|
|
|
@@ -1645,9 +1661,9 @@ function deserializeForInStatement(pos) {
|
|
|
1645
1661
|
end: (end = deserializeU32(pos + 4)),
|
|
1646
1662
|
range: [start, end],
|
|
1647
1663
|
};
|
|
1648
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1649
|
-
node.right = deserializeExpression(pos +
|
|
1650
|
-
node.body = deserializeStatement(pos +
|
|
1664
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1665
|
+
node.right = deserializeExpression(pos + 32);
|
|
1666
|
+
node.body = deserializeStatement(pos + 48);
|
|
1651
1667
|
return node;
|
|
1652
1668
|
}
|
|
1653
1669
|
|
|
@@ -1693,9 +1709,9 @@ function deserializeForOfStatement(pos) {
|
|
|
1693
1709
|
end: (end = deserializeU32(pos + 4)),
|
|
1694
1710
|
range: [start, end],
|
|
1695
1711
|
};
|
|
1696
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1697
|
-
node.right = deserializeExpression(pos +
|
|
1698
|
-
node.body = deserializeStatement(pos +
|
|
1712
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1713
|
+
node.right = deserializeExpression(pos + 32);
|
|
1714
|
+
node.body = deserializeStatement(pos + 48);
|
|
1699
1715
|
return node;
|
|
1700
1716
|
}
|
|
1701
1717
|
|
|
@@ -1709,7 +1725,7 @@ function deserializeContinueStatement(pos) {
|
|
|
1709
1725
|
end: (end = deserializeU32(pos + 4)),
|
|
1710
1726
|
range: [start, end],
|
|
1711
1727
|
};
|
|
1712
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1728
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1713
1729
|
return node;
|
|
1714
1730
|
}
|
|
1715
1731
|
|
|
@@ -1723,7 +1739,7 @@ function deserializeBreakStatement(pos) {
|
|
|
1723
1739
|
end: (end = deserializeU32(pos + 4)),
|
|
1724
1740
|
range: [start, end],
|
|
1725
1741
|
};
|
|
1726
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1742
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1727
1743
|
return node;
|
|
1728
1744
|
}
|
|
1729
1745
|
|
|
@@ -1737,7 +1753,7 @@ function deserializeReturnStatement(pos) {
|
|
|
1737
1753
|
end: (end = deserializeU32(pos + 4)),
|
|
1738
1754
|
range: [start, end],
|
|
1739
1755
|
};
|
|
1740
|
-
node.argument = deserializeOptionExpression(pos +
|
|
1756
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
1741
1757
|
return node;
|
|
1742
1758
|
}
|
|
1743
1759
|
|
|
@@ -1752,8 +1768,8 @@ function deserializeWithStatement(pos) {
|
|
|
1752
1768
|
end: (end = deserializeU32(pos + 4)),
|
|
1753
1769
|
range: [start, end],
|
|
1754
1770
|
};
|
|
1755
|
-
node.object = deserializeExpression(pos +
|
|
1756
|
-
node.body = deserializeStatement(pos +
|
|
1771
|
+
node.object = deserializeExpression(pos + 16);
|
|
1772
|
+
node.body = deserializeStatement(pos + 32);
|
|
1757
1773
|
return node;
|
|
1758
1774
|
}
|
|
1759
1775
|
|
|
@@ -1768,8 +1784,8 @@ function deserializeSwitchStatement(pos) {
|
|
|
1768
1784
|
end: (end = deserializeU32(pos + 4)),
|
|
1769
1785
|
range: [start, end],
|
|
1770
1786
|
};
|
|
1771
|
-
node.discriminant = deserializeExpression(pos +
|
|
1772
|
-
node.cases = deserializeVecSwitchCase(pos +
|
|
1787
|
+
node.discriminant = deserializeExpression(pos + 16);
|
|
1788
|
+
node.cases = deserializeVecSwitchCase(pos + 32);
|
|
1773
1789
|
return node;
|
|
1774
1790
|
}
|
|
1775
1791
|
|
|
@@ -1784,8 +1800,8 @@ function deserializeSwitchCase(pos) {
|
|
|
1784
1800
|
end: (end = deserializeU32(pos + 4)),
|
|
1785
1801
|
range: [start, end],
|
|
1786
1802
|
};
|
|
1787
|
-
node.test = deserializeOptionExpression(pos +
|
|
1788
|
-
node.consequent = deserializeVecStatement(pos +
|
|
1803
|
+
node.test = deserializeOptionExpression(pos + 16);
|
|
1804
|
+
node.consequent = deserializeVecStatement(pos + 32);
|
|
1789
1805
|
return node;
|
|
1790
1806
|
}
|
|
1791
1807
|
|
|
@@ -1800,8 +1816,8 @@ function deserializeLabeledStatement(pos) {
|
|
|
1800
1816
|
end: (end = deserializeU32(pos + 4)),
|
|
1801
1817
|
range: [start, end],
|
|
1802
1818
|
};
|
|
1803
|
-
node.label = deserializeLabelIdentifier(pos +
|
|
1804
|
-
node.body = deserializeStatement(pos +
|
|
1819
|
+
node.label = deserializeLabelIdentifier(pos + 16);
|
|
1820
|
+
node.body = deserializeStatement(pos + 48);
|
|
1805
1821
|
return node;
|
|
1806
1822
|
}
|
|
1807
1823
|
|
|
@@ -1815,7 +1831,7 @@ function deserializeThrowStatement(pos) {
|
|
|
1815
1831
|
end: (end = deserializeU32(pos + 4)),
|
|
1816
1832
|
range: [start, end],
|
|
1817
1833
|
};
|
|
1818
|
-
node.argument = deserializeExpression(pos +
|
|
1834
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1819
1835
|
return node;
|
|
1820
1836
|
}
|
|
1821
1837
|
|
|
@@ -1831,9 +1847,9 @@ function deserializeTryStatement(pos) {
|
|
|
1831
1847
|
end: (end = deserializeU32(pos + 4)),
|
|
1832
1848
|
range: [start, end],
|
|
1833
1849
|
};
|
|
1834
|
-
node.block = deserializeBoxBlockStatement(pos +
|
|
1835
|
-
node.handler = deserializeOptionBoxCatchClause(pos +
|
|
1836
|
-
node.finalizer = deserializeOptionBoxBlockStatement(pos +
|
|
1850
|
+
node.block = deserializeBoxBlockStatement(pos + 16);
|
|
1851
|
+
node.handler = deserializeOptionBoxCatchClause(pos + 24);
|
|
1852
|
+
node.finalizer = deserializeOptionBoxBlockStatement(pos + 32);
|
|
1837
1853
|
return node;
|
|
1838
1854
|
}
|
|
1839
1855
|
|
|
@@ -1848,15 +1864,15 @@ function deserializeCatchClause(pos) {
|
|
|
1848
1864
|
end: (end = deserializeU32(pos + 4)),
|
|
1849
1865
|
range: [start, end],
|
|
1850
1866
|
};
|
|
1851
|
-
node.param = deserializeOptionCatchParameter(pos +
|
|
1852
|
-
node.body = deserializeBoxBlockStatement(pos +
|
|
1867
|
+
node.param = deserializeOptionCatchParameter(pos + 16);
|
|
1868
|
+
node.body = deserializeBoxBlockStatement(pos + 56);
|
|
1853
1869
|
return node;
|
|
1854
1870
|
}
|
|
1855
1871
|
|
|
1856
1872
|
function deserializeCatchParameter(pos) {
|
|
1857
|
-
let pattern = deserializeBindingPattern(pos +
|
|
1873
|
+
let pattern = deserializeBindingPattern(pos + 16);
|
|
1858
1874
|
{
|
|
1859
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1875
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1860
1876
|
pattern.typeAnnotation = typeAnnotation;
|
|
1861
1877
|
if (typeAnnotation !== null) {
|
|
1862
1878
|
pattern.end = typeAnnotation.end;
|
|
@@ -1906,8 +1922,8 @@ function deserializeAssignmentPattern(pos) {
|
|
|
1906
1922
|
range: [start, end],
|
|
1907
1923
|
};
|
|
1908
1924
|
node.decorators = [];
|
|
1909
|
-
node.left = deserializeBindingPattern(pos +
|
|
1910
|
-
node.right = deserializeExpression(pos +
|
|
1925
|
+
node.left = deserializeBindingPattern(pos + 16);
|
|
1926
|
+
node.right = deserializeExpression(pos + 32);
|
|
1911
1927
|
node.optional = false;
|
|
1912
1928
|
return node;
|
|
1913
1929
|
}
|
|
@@ -1925,8 +1941,8 @@ function deserializeObjectPattern(pos) {
|
|
|
1925
1941
|
end: (end = deserializeU32(pos + 4)),
|
|
1926
1942
|
range: [start, end],
|
|
1927
1943
|
},
|
|
1928
|
-
properties = deserializeVecBindingProperty(pos +
|
|
1929
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1944
|
+
properties = deserializeVecBindingProperty(pos + 16),
|
|
1945
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1930
1946
|
rest !== null && properties.push(rest);
|
|
1931
1947
|
node.decorators = [];
|
|
1932
1948
|
node.properties = properties;
|
|
@@ -1943,16 +1959,16 @@ function deserializeBindingProperty(pos) {
|
|
|
1943
1959
|
key: null,
|
|
1944
1960
|
value: null,
|
|
1945
1961
|
method: null,
|
|
1946
|
-
shorthand: deserializeBool(pos +
|
|
1947
|
-
computed: deserializeBool(pos +
|
|
1962
|
+
shorthand: deserializeBool(pos + 12),
|
|
1963
|
+
computed: deserializeBool(pos + 13),
|
|
1948
1964
|
optional: null,
|
|
1949
1965
|
start: (start = deserializeU32(pos)),
|
|
1950
1966
|
end: (end = deserializeU32(pos + 4)),
|
|
1951
1967
|
range: [start, end],
|
|
1952
1968
|
};
|
|
1953
1969
|
node.kind = "init";
|
|
1954
|
-
node.key = deserializePropertyKey(pos +
|
|
1955
|
-
node.value = deserializeBindingPattern(pos +
|
|
1970
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1971
|
+
node.value = deserializeBindingPattern(pos + 32);
|
|
1956
1972
|
node.method = false;
|
|
1957
1973
|
node.optional = false;
|
|
1958
1974
|
return node;
|
|
@@ -1971,8 +1987,8 @@ function deserializeArrayPattern(pos) {
|
|
|
1971
1987
|
end: (end = deserializeU32(pos + 4)),
|
|
1972
1988
|
range: [start, end],
|
|
1973
1989
|
},
|
|
1974
|
-
elements = deserializeVecOptionBindingPattern(pos +
|
|
1975
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1990
|
+
elements = deserializeVecOptionBindingPattern(pos + 16),
|
|
1991
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1976
1992
|
rest !== null && elements.push(rest);
|
|
1977
1993
|
node.decorators = [];
|
|
1978
1994
|
node.elements = elements;
|
|
@@ -1995,7 +2011,7 @@ function deserializeBindingRestElement(pos) {
|
|
|
1995
2011
|
range: [start, end],
|
|
1996
2012
|
};
|
|
1997
2013
|
node.decorators = [];
|
|
1998
|
-
node.argument = deserializeBindingPattern(pos +
|
|
2014
|
+
node.argument = deserializeBindingPattern(pos + 16);
|
|
1999
2015
|
node.optional = false;
|
|
2000
2016
|
return node;
|
|
2001
2017
|
}
|
|
@@ -2018,16 +2034,16 @@ function deserializeFunction(pos) {
|
|
|
2018
2034
|
end: (end = deserializeU32(pos + 4)),
|
|
2019
2035
|
range: [start, end],
|
|
2020
2036
|
},
|
|
2021
|
-
params = deserializeBoxFormalParameters(pos +
|
|
2037
|
+
params = deserializeBoxFormalParameters(pos + 64);
|
|
2022
2038
|
{
|
|
2023
|
-
let thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
2039
|
+
let thisParam = deserializeOptionBoxTSThisParameter(pos + 56);
|
|
2024
2040
|
thisParam !== null && params.unshift(thisParam);
|
|
2025
2041
|
}
|
|
2026
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
2027
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
2042
|
+
node.id = deserializeOptionBindingIdentifier(pos + 16);
|
|
2043
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
2028
2044
|
node.params = params;
|
|
2029
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2030
|
-
node.body = deserializeOptionBoxFunctionBody(pos +
|
|
2045
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
2046
|
+
node.body = deserializeOptionBoxFunctionBody(pos + 80);
|
|
2031
2047
|
node.expression = false;
|
|
2032
2048
|
return node;
|
|
2033
2049
|
}
|
|
@@ -2048,9 +2064,9 @@ function deserializeFunctionType(pos) {
|
|
|
2048
2064
|
}
|
|
2049
2065
|
|
|
2050
2066
|
function deserializeFormalParameters(pos) {
|
|
2051
|
-
let params = deserializeVecFormalParameter(pos +
|
|
2052
|
-
if (uint32[(pos +
|
|
2053
|
-
pos = uint32[(pos +
|
|
2067
|
+
let params = deserializeVecFormalParameter(pos + 16);
|
|
2068
|
+
if (uint32[(pos + 40) >> 2] !== 0 && uint32[(pos + 44) >> 2] !== 0) {
|
|
2069
|
+
pos = uint32[(pos + 40) >> 2];
|
|
2054
2070
|
let start,
|
|
2055
2071
|
end,
|
|
2056
2072
|
rest = {
|
|
@@ -2060,12 +2076,12 @@ function deserializeFormalParameters(pos) {
|
|
|
2060
2076
|
optional: false,
|
|
2061
2077
|
typeAnnotation: null,
|
|
2062
2078
|
value: null,
|
|
2063
|
-
start: (start = deserializeU32(pos +
|
|
2064
|
-
end: (end = deserializeU32(pos +
|
|
2079
|
+
start: (start = deserializeU32(pos + 40)),
|
|
2080
|
+
end: (end = deserializeU32(pos + 44)),
|
|
2065
2081
|
range: [start, end],
|
|
2066
2082
|
};
|
|
2067
|
-
rest.argument = deserializeBindingPattern(pos +
|
|
2068
|
-
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2083
|
+
rest.argument = deserializeBindingPattern(pos + 56);
|
|
2084
|
+
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
2069
2085
|
if (rest.typeAnnotation !== null) {
|
|
2070
2086
|
end = rest.typeAnnotation.end;
|
|
2071
2087
|
rest.end = end;
|
|
@@ -2078,13 +2094,13 @@ function deserializeFormalParameters(pos) {
|
|
|
2078
2094
|
|
|
2079
2095
|
function deserializeFormalParameter(pos) {
|
|
2080
2096
|
let param,
|
|
2081
|
-
hasInitializer = uint32[(pos +
|
|
2097
|
+
hasInitializer = uint32[(pos + 64) >> 2] !== 0 && uint32[(pos + 68) >> 2] !== 0;
|
|
2082
2098
|
{
|
|
2083
|
-
let accessibility = deserializeOptionTSAccessibility(pos +
|
|
2084
|
-
readonly = deserializeBool(pos +
|
|
2085
|
-
override = deserializeBool(pos +
|
|
2099
|
+
let accessibility = deserializeOptionTSAccessibility(pos + 13),
|
|
2100
|
+
readonly = deserializeBool(pos + 14),
|
|
2101
|
+
override = deserializeBool(pos + 15);
|
|
2086
2102
|
if (accessibility === null && !readonly && !override) {
|
|
2087
|
-
let optional = deserializeBool(pos +
|
|
2103
|
+
let optional = deserializeBool(pos + 12);
|
|
2088
2104
|
if (hasInitializer) {
|
|
2089
2105
|
let start, end;
|
|
2090
2106
|
param = {
|
|
@@ -2098,22 +2114,22 @@ function deserializeFormalParameter(pos) {
|
|
|
2098
2114
|
end: (end = deserializeU32(pos + 4)),
|
|
2099
2115
|
range: [start, end],
|
|
2100
2116
|
};
|
|
2101
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
2102
|
-
param.left = deserializeBindingPattern(pos +
|
|
2117
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
2118
|
+
param.left = deserializeBindingPattern(pos + 40);
|
|
2103
2119
|
param.left.decorators = [];
|
|
2104
2120
|
param.left.optional = false;
|
|
2105
|
-
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2121
|
+
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2106
2122
|
param.left.typeAnnotation = leftTypeAnnotation;
|
|
2107
2123
|
if (leftTypeAnnotation !== null) {
|
|
2108
2124
|
param.left.end = leftTypeAnnotation.end;
|
|
2109
2125
|
param.left.range[1] = leftTypeAnnotation.end;
|
|
2110
2126
|
}
|
|
2111
|
-
param.right = deserializeOptionBoxExpression(pos +
|
|
2127
|
+
param.right = deserializeOptionBoxExpression(pos + 64);
|
|
2112
2128
|
} else {
|
|
2113
|
-
param = deserializeBindingPattern(pos +
|
|
2114
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
2129
|
+
param = deserializeBindingPattern(pos + 40);
|
|
2130
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
2115
2131
|
param.optional = optional;
|
|
2116
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2132
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2117
2133
|
param.typeAnnotation = typeAnnotation;
|
|
2118
2134
|
if (typeAnnotation !== null) {
|
|
2119
2135
|
param.end = typeAnnotation.end;
|
|
@@ -2137,10 +2153,10 @@ function deserializeFormalParameter(pos) {
|
|
|
2137
2153
|
end: (end = deserializeU32(pos + 4)),
|
|
2138
2154
|
range: [start, end],
|
|
2139
2155
|
};
|
|
2140
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
2156
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
2141
2157
|
if (hasInitializer) {
|
|
2142
|
-
let pattern = deserializeBindingPattern(pos +
|
|
2143
|
-
initializer = deserializeOptionBoxExpression(pos +
|
|
2158
|
+
let pattern = deserializeBindingPattern(pos + 40),
|
|
2159
|
+
initializer = deserializeOptionBoxExpression(pos + 64),
|
|
2144
2160
|
assignStart,
|
|
2145
2161
|
assignEnd,
|
|
2146
2162
|
assignParam = {
|
|
@@ -2157,7 +2173,7 @@ function deserializeFormalParameter(pos) {
|
|
|
2157
2173
|
assignParam.left = pattern;
|
|
2158
2174
|
pattern.decorators = [];
|
|
2159
2175
|
pattern.optional = false;
|
|
2160
|
-
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2176
|
+
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2161
2177
|
pattern.typeAnnotation = patternTypeAnnotation;
|
|
2162
2178
|
if (patternTypeAnnotation !== null) {
|
|
2163
2179
|
pattern.end = patternTypeAnnotation.end;
|
|
@@ -2166,11 +2182,11 @@ function deserializeFormalParameter(pos) {
|
|
|
2166
2182
|
assignParam.right = initializer;
|
|
2167
2183
|
param.parameter = assignParam;
|
|
2168
2184
|
} else {
|
|
2169
|
-
param.parameter = deserializeBindingPattern(pos +
|
|
2185
|
+
param.parameter = deserializeBindingPattern(pos + 40);
|
|
2170
2186
|
param.parameter.decorators = [];
|
|
2171
|
-
let paramOptional = deserializeBool(pos +
|
|
2187
|
+
let paramOptional = deserializeBool(pos + 12);
|
|
2172
2188
|
param.parameter.optional = paramOptional;
|
|
2173
|
-
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2189
|
+
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2174
2190
|
param.parameter.typeAnnotation = paramTypeAnnotation;
|
|
2175
2191
|
if (paramTypeAnnotation !== null) {
|
|
2176
2192
|
param.parameter.end = paramTypeAnnotation.end;
|
|
@@ -2196,8 +2212,8 @@ function deserializeFunctionBody(pos) {
|
|
|
2196
2212
|
end: (end = deserializeU32(pos + 4)),
|
|
2197
2213
|
range: [start, end],
|
|
2198
2214
|
},
|
|
2199
|
-
body = deserializeVecDirective(pos +
|
|
2200
|
-
body.push(...deserializeVecStatement(pos +
|
|
2215
|
+
body = deserializeVecDirective(pos + 16);
|
|
2216
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
2201
2217
|
node.body = body;
|
|
2202
2218
|
return node;
|
|
2203
2219
|
}
|
|
@@ -2220,11 +2236,11 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
2220
2236
|
end: (end = deserializeU32(pos + 4)),
|
|
2221
2237
|
range: [start, end],
|
|
2222
2238
|
},
|
|
2223
|
-
body = deserializeBoxFunctionBody(pos +
|
|
2239
|
+
body = deserializeBoxFunctionBody(pos + 40);
|
|
2224
2240
|
expression === true && (body = body.body[0].expression);
|
|
2225
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
2226
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
2227
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2241
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
2242
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
2243
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
2228
2244
|
node.body = body;
|
|
2229
2245
|
node.generator = false;
|
|
2230
2246
|
return node;
|
|
@@ -2235,13 +2251,13 @@ function deserializeYieldExpression(pos) {
|
|
|
2235
2251
|
end,
|
|
2236
2252
|
node = {
|
|
2237
2253
|
type: "YieldExpression",
|
|
2238
|
-
delegate: deserializeBool(pos +
|
|
2254
|
+
delegate: deserializeBool(pos + 12),
|
|
2239
2255
|
argument: null,
|
|
2240
2256
|
start: (start = deserializeU32(pos)),
|
|
2241
2257
|
end: (end = deserializeU32(pos + 4)),
|
|
2242
2258
|
range: [start, end],
|
|
2243
2259
|
};
|
|
2244
|
-
node.argument = deserializeOptionExpression(pos +
|
|
2260
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
2245
2261
|
return node;
|
|
2246
2262
|
}
|
|
2247
2263
|
|
|
@@ -2263,13 +2279,13 @@ function deserializeClass(pos) {
|
|
|
2263
2279
|
end: (end = deserializeU32(pos + 4)),
|
|
2264
2280
|
range: [start, end],
|
|
2265
2281
|
};
|
|
2266
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2267
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
2268
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
2269
|
-
node.superClass = deserializeOptionExpression(pos +
|
|
2270
|
-
node.superTypeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
2271
|
-
node.implements = deserializeVecTSClassImplements(pos +
|
|
2272
|
-
node.body = deserializeBoxClassBody(pos +
|
|
2282
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2283
|
+
node.id = deserializeOptionBindingIdentifier(pos + 40);
|
|
2284
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 72);
|
|
2285
|
+
node.superClass = deserializeOptionExpression(pos + 80);
|
|
2286
|
+
node.superTypeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 96);
|
|
2287
|
+
node.implements = deserializeVecTSClassImplements(pos + 104);
|
|
2288
|
+
node.body = deserializeBoxClassBody(pos + 128);
|
|
2273
2289
|
return node;
|
|
2274
2290
|
}
|
|
2275
2291
|
|
|
@@ -2294,7 +2310,7 @@ function deserializeClassBody(pos) {
|
|
|
2294
2310
|
end: (end = deserializeU32(pos + 4)),
|
|
2295
2311
|
range: [start, end],
|
|
2296
2312
|
};
|
|
2297
|
-
node.body = deserializeVecClassElement(pos +
|
|
2313
|
+
node.body = deserializeVecClassElement(pos + 16);
|
|
2298
2314
|
return node;
|
|
2299
2315
|
}
|
|
2300
2316
|
|
|
@@ -2319,13 +2335,13 @@ function deserializeMethodDefinition(pos) {
|
|
|
2319
2335
|
let start,
|
|
2320
2336
|
end,
|
|
2321
2337
|
node = {
|
|
2322
|
-
type: deserializeMethodDefinitionType(pos +
|
|
2338
|
+
type: deserializeMethodDefinitionType(pos + 12),
|
|
2323
2339
|
decorators: null,
|
|
2324
2340
|
key: null,
|
|
2325
2341
|
value: null,
|
|
2326
|
-
kind: deserializeMethodDefinitionKind(pos +
|
|
2327
|
-
computed: deserializeBool(pos +
|
|
2328
|
-
static: deserializeBool(pos +
|
|
2342
|
+
kind: deserializeMethodDefinitionKind(pos + 13),
|
|
2343
|
+
computed: deserializeBool(pos + 14),
|
|
2344
|
+
static: deserializeBool(pos + 15),
|
|
2329
2345
|
override: deserializeBool(pos + 64),
|
|
2330
2346
|
optional: deserializeBool(pos + 65),
|
|
2331
2347
|
accessibility: deserializeOptionTSAccessibility(pos + 66),
|
|
@@ -2333,9 +2349,9 @@ function deserializeMethodDefinition(pos) {
|
|
|
2333
2349
|
end: (end = deserializeU32(pos + 4)),
|
|
2334
2350
|
range: [start, end],
|
|
2335
2351
|
};
|
|
2336
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2337
|
-
node.key = deserializePropertyKey(pos +
|
|
2338
|
-
node.value = deserializeBoxFunction(pos +
|
|
2352
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2353
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2354
|
+
node.value = deserializeBoxFunction(pos + 56);
|
|
2339
2355
|
return node;
|
|
2340
2356
|
}
|
|
2341
2357
|
|
|
@@ -2354,14 +2370,14 @@ function deserializePropertyDefinition(pos) {
|
|
|
2354
2370
|
let start,
|
|
2355
2371
|
end,
|
|
2356
2372
|
node = {
|
|
2357
|
-
type: deserializePropertyDefinitionType(pos +
|
|
2373
|
+
type: deserializePropertyDefinitionType(pos + 12),
|
|
2358
2374
|
decorators: null,
|
|
2359
2375
|
key: null,
|
|
2360
2376
|
typeAnnotation: null,
|
|
2361
2377
|
value: null,
|
|
2362
|
-
computed: deserializeBool(pos +
|
|
2363
|
-
static: deserializeBool(pos +
|
|
2364
|
-
declare: deserializeBool(pos +
|
|
2378
|
+
computed: deserializeBool(pos + 13),
|
|
2379
|
+
static: deserializeBool(pos + 14),
|
|
2380
|
+
declare: deserializeBool(pos + 15),
|
|
2365
2381
|
override: deserializeBool(pos + 80),
|
|
2366
2382
|
optional: deserializeBool(pos + 81),
|
|
2367
2383
|
definite: deserializeBool(pos + 82),
|
|
@@ -2371,10 +2387,10 @@ function deserializePropertyDefinition(pos) {
|
|
|
2371
2387
|
end: (end = deserializeU32(pos + 4)),
|
|
2372
2388
|
range: [start, end],
|
|
2373
2389
|
};
|
|
2374
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2375
|
-
node.key = deserializePropertyKey(pos +
|
|
2376
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2377
|
-
node.value = deserializeOptionExpression(pos +
|
|
2390
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2391
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2392
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2393
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2378
2394
|
return node;
|
|
2379
2395
|
}
|
|
2380
2396
|
|
|
@@ -2408,7 +2424,7 @@ function deserializePrivateIdentifier(pos) {
|
|
|
2408
2424
|
let start, end;
|
|
2409
2425
|
return {
|
|
2410
2426
|
type: "PrivateIdentifier",
|
|
2411
|
-
name: deserializeStr(pos +
|
|
2427
|
+
name: deserializeStr(pos + 16),
|
|
2412
2428
|
start: (start = deserializeU32(pos)),
|
|
2413
2429
|
end: (end = deserializeU32(pos + 4)),
|
|
2414
2430
|
range: [start, end],
|
|
@@ -2425,7 +2441,7 @@ function deserializeStaticBlock(pos) {
|
|
|
2425
2441
|
end: (end = deserializeU32(pos + 4)),
|
|
2426
2442
|
range: [start, end],
|
|
2427
2443
|
};
|
|
2428
|
-
node.body = deserializeVecStatement(pos +
|
|
2444
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
2429
2445
|
return node;
|
|
2430
2446
|
}
|
|
2431
2447
|
|
|
@@ -2444,14 +2460,14 @@ function deserializeAccessorProperty(pos) {
|
|
|
2444
2460
|
let start,
|
|
2445
2461
|
end,
|
|
2446
2462
|
node = {
|
|
2447
|
-
type: deserializeAccessorPropertyType(pos +
|
|
2463
|
+
type: deserializeAccessorPropertyType(pos + 12),
|
|
2448
2464
|
decorators: null,
|
|
2449
2465
|
key: null,
|
|
2450
2466
|
typeAnnotation: null,
|
|
2451
2467
|
value: null,
|
|
2452
|
-
computed: deserializeBool(pos +
|
|
2453
|
-
static: deserializeBool(pos +
|
|
2454
|
-
override: deserializeBool(pos +
|
|
2468
|
+
computed: deserializeBool(pos + 13),
|
|
2469
|
+
static: deserializeBool(pos + 14),
|
|
2470
|
+
override: deserializeBool(pos + 15),
|
|
2455
2471
|
definite: deserializeBool(pos + 80),
|
|
2456
2472
|
accessibility: deserializeOptionTSAccessibility(pos + 81),
|
|
2457
2473
|
declare: null,
|
|
@@ -2461,10 +2477,10 @@ function deserializeAccessorProperty(pos) {
|
|
|
2461
2477
|
end: (end = deserializeU32(pos + 4)),
|
|
2462
2478
|
range: [start, end],
|
|
2463
2479
|
};
|
|
2464
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2465
|
-
node.key = deserializePropertyKey(pos +
|
|
2466
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2467
|
-
node.value = deserializeOptionExpression(pos +
|
|
2480
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2481
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2482
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2483
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2468
2484
|
node.declare = false;
|
|
2469
2485
|
node.optional = false;
|
|
2470
2486
|
node.readonly = false;
|
|
@@ -2478,13 +2494,13 @@ function deserializeImportExpression(pos) {
|
|
|
2478
2494
|
type: "ImportExpression",
|
|
2479
2495
|
source: null,
|
|
2480
2496
|
options: null,
|
|
2481
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2497
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2482
2498
|
start: (start = deserializeU32(pos)),
|
|
2483
2499
|
end: (end = deserializeU32(pos + 4)),
|
|
2484
2500
|
range: [start, end],
|
|
2485
2501
|
};
|
|
2486
|
-
node.source = deserializeExpression(pos +
|
|
2487
|
-
node.options = deserializeOptionExpression(pos +
|
|
2502
|
+
node.source = deserializeExpression(pos + 16);
|
|
2503
|
+
node.options = deserializeOptionExpression(pos + 32);
|
|
2488
2504
|
return node;
|
|
2489
2505
|
}
|
|
2490
2506
|
|
|
@@ -2495,18 +2511,18 @@ function deserializeImportDeclaration(pos) {
|
|
|
2495
2511
|
type: "ImportDeclaration",
|
|
2496
2512
|
specifiers: null,
|
|
2497
2513
|
source: null,
|
|
2498
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2514
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2499
2515
|
attributes: null,
|
|
2500
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2516
|
+
importKind: deserializeImportOrExportKind(pos + 13),
|
|
2501
2517
|
start: (start = deserializeU32(pos)),
|
|
2502
2518
|
end: (end = deserializeU32(pos + 4)),
|
|
2503
2519
|
range: [start, end],
|
|
2504
2520
|
},
|
|
2505
|
-
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos +
|
|
2521
|
+
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos + 16);
|
|
2506
2522
|
specifiers === null && (specifiers = []);
|
|
2507
|
-
let withClause = deserializeOptionBoxWithClause(pos +
|
|
2523
|
+
let withClause = deserializeOptionBoxWithClause(pos + 88);
|
|
2508
2524
|
node.specifiers = specifiers;
|
|
2509
|
-
node.source = deserializeStringLiteral(pos +
|
|
2525
|
+
node.source = deserializeStringLiteral(pos + 40);
|
|
2510
2526
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2511
2527
|
return node;
|
|
2512
2528
|
}
|
|
@@ -2542,13 +2558,13 @@ function deserializeImportSpecifier(pos) {
|
|
|
2542
2558
|
type: "ImportSpecifier",
|
|
2543
2559
|
imported: null,
|
|
2544
2560
|
local: null,
|
|
2545
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2561
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
2546
2562
|
start: (start = deserializeU32(pos)),
|
|
2547
2563
|
end: (end = deserializeU32(pos + 4)),
|
|
2548
2564
|
range: [start, end],
|
|
2549
2565
|
};
|
|
2550
|
-
node.imported = deserializeModuleExportName(pos +
|
|
2551
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2566
|
+
node.imported = deserializeModuleExportName(pos + 16);
|
|
2567
|
+
node.local = deserializeBindingIdentifier(pos + 72);
|
|
2552
2568
|
return node;
|
|
2553
2569
|
}
|
|
2554
2570
|
|
|
@@ -2562,7 +2578,7 @@ function deserializeImportDefaultSpecifier(pos) {
|
|
|
2562
2578
|
end: (end = deserializeU32(pos + 4)),
|
|
2563
2579
|
range: [start, end],
|
|
2564
2580
|
};
|
|
2565
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2581
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2566
2582
|
return node;
|
|
2567
2583
|
}
|
|
2568
2584
|
|
|
@@ -2576,18 +2592,12 @@ function deserializeImportNamespaceSpecifier(pos) {
|
|
|
2576
2592
|
end: (end = deserializeU32(pos + 4)),
|
|
2577
2593
|
range: [start, end],
|
|
2578
2594
|
};
|
|
2579
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2595
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2580
2596
|
return node;
|
|
2581
2597
|
}
|
|
2582
2598
|
|
|
2583
2599
|
function deserializeWithClause(pos) {
|
|
2584
|
-
|
|
2585
|
-
return {
|
|
2586
|
-
attributes: deserializeVecImportAttribute(pos + 8),
|
|
2587
|
-
start: (start = deserializeU32(pos)),
|
|
2588
|
-
end: (end = deserializeU32(pos + 4)),
|
|
2589
|
-
range: [start, end],
|
|
2590
|
-
};
|
|
2600
|
+
return { attributes: deserializeVecImportAttribute(pos + 16) };
|
|
2591
2601
|
}
|
|
2592
2602
|
|
|
2593
2603
|
function deserializeImportAttribute(pos) {
|
|
@@ -2601,8 +2611,8 @@ function deserializeImportAttribute(pos) {
|
|
|
2601
2611
|
end: (end = deserializeU32(pos + 4)),
|
|
2602
2612
|
range: [start, end],
|
|
2603
2613
|
};
|
|
2604
|
-
node.key = deserializeImportAttributeKey(pos +
|
|
2605
|
-
node.value = deserializeStringLiteral(pos +
|
|
2614
|
+
node.key = deserializeImportAttributeKey(pos + 16);
|
|
2615
|
+
node.value = deserializeStringLiteral(pos + 72);
|
|
2606
2616
|
return node;
|
|
2607
2617
|
}
|
|
2608
2618
|
|
|
@@ -2625,16 +2635,16 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2625
2635
|
declaration: null,
|
|
2626
2636
|
specifiers: null,
|
|
2627
2637
|
source: null,
|
|
2628
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2638
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2629
2639
|
attributes: null,
|
|
2630
2640
|
start: (start = deserializeU32(pos)),
|
|
2631
2641
|
end: (end = deserializeU32(pos + 4)),
|
|
2632
2642
|
range: [start, end],
|
|
2633
2643
|
},
|
|
2634
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2635
|
-
node.declaration = deserializeOptionDeclaration(pos +
|
|
2636
|
-
node.specifiers = deserializeVecExportSpecifier(pos +
|
|
2637
|
-
node.source = deserializeOptionStringLiteral(pos +
|
|
2644
|
+
withClause = deserializeOptionBoxWithClause(pos + 104);
|
|
2645
|
+
node.declaration = deserializeOptionDeclaration(pos + 16);
|
|
2646
|
+
node.specifiers = deserializeVecExportSpecifier(pos + 32);
|
|
2647
|
+
node.source = deserializeOptionStringLiteral(pos + 56);
|
|
2638
2648
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2639
2649
|
return node;
|
|
2640
2650
|
}
|
|
@@ -2650,7 +2660,7 @@ function deserializeExportDefaultDeclaration(pos) {
|
|
|
2650
2660
|
end: (end = deserializeU32(pos + 4)),
|
|
2651
2661
|
range: [start, end],
|
|
2652
2662
|
};
|
|
2653
|
-
node.declaration = deserializeExportDefaultDeclarationKind(pos +
|
|
2663
|
+
node.declaration = deserializeExportDefaultDeclarationKind(pos + 16);
|
|
2654
2664
|
node.exportKind = "value";
|
|
2655
2665
|
return node;
|
|
2656
2666
|
}
|
|
@@ -2663,14 +2673,14 @@ function deserializeExportAllDeclaration(pos) {
|
|
|
2663
2673
|
exported: null,
|
|
2664
2674
|
source: null,
|
|
2665
2675
|
attributes: null,
|
|
2666
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2676
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2667
2677
|
start: (start = deserializeU32(pos)),
|
|
2668
2678
|
end: (end = deserializeU32(pos + 4)),
|
|
2669
2679
|
range: [start, end],
|
|
2670
2680
|
},
|
|
2671
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2672
|
-
node.exported = deserializeOptionModuleExportName(pos +
|
|
2673
|
-
node.source = deserializeStringLiteral(pos +
|
|
2681
|
+
withClause = deserializeOptionBoxWithClause(pos + 120);
|
|
2682
|
+
node.exported = deserializeOptionModuleExportName(pos + 16);
|
|
2683
|
+
node.source = deserializeStringLiteral(pos + 72);
|
|
2674
2684
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2675
2685
|
return node;
|
|
2676
2686
|
}
|
|
@@ -2682,13 +2692,13 @@ function deserializeExportSpecifier(pos) {
|
|
|
2682
2692
|
type: "ExportSpecifier",
|
|
2683
2693
|
local: null,
|
|
2684
2694
|
exported: null,
|
|
2685
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2695
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2686
2696
|
start: (start = deserializeU32(pos)),
|
|
2687
2697
|
end: (end = deserializeU32(pos + 4)),
|
|
2688
2698
|
range: [start, end],
|
|
2689
2699
|
};
|
|
2690
|
-
node.local = deserializeModuleExportName(pos +
|
|
2691
|
-
node.exported = deserializeModuleExportName(pos +
|
|
2700
|
+
node.local = deserializeModuleExportName(pos + 16);
|
|
2701
|
+
node.exported = deserializeModuleExportName(pos + 72);
|
|
2692
2702
|
return node;
|
|
2693
2703
|
}
|
|
2694
2704
|
|
|
@@ -2815,8 +2825,8 @@ function deserializeV8IntrinsicExpression(pos) {
|
|
|
2815
2825
|
end: (end = deserializeU32(pos + 4)),
|
|
2816
2826
|
range: [start, end],
|
|
2817
2827
|
};
|
|
2818
|
-
node.name = deserializeIdentifierName(pos +
|
|
2819
|
-
node.arguments = deserializeVecArgument(pos +
|
|
2828
|
+
node.name = deserializeIdentifierName(pos + 16);
|
|
2829
|
+
node.arguments = deserializeVecArgument(pos + 48);
|
|
2820
2830
|
return node;
|
|
2821
2831
|
}
|
|
2822
2832
|
|
|
@@ -2852,66 +2862,79 @@ function deserializeNullLiteral(pos) {
|
|
|
2852
2862
|
}
|
|
2853
2863
|
|
|
2854
2864
|
function deserializeNumericLiteral(pos) {
|
|
2855
|
-
let start,
|
|
2865
|
+
let start = deserializeU32(pos),
|
|
2866
|
+
end = deserializeU32(pos + 4);
|
|
2856
2867
|
return {
|
|
2857
2868
|
type: "Literal",
|
|
2858
|
-
value: deserializeF64(pos +
|
|
2859
|
-
raw:
|
|
2860
|
-
|
|
2861
|
-
|
|
2869
|
+
value: deserializeF64(pos + 32),
|
|
2870
|
+
raw:
|
|
2871
|
+
uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
2872
|
+
? null
|
|
2873
|
+
: sourceText.slice(start, end),
|
|
2874
|
+
start,
|
|
2875
|
+
end,
|
|
2862
2876
|
range: [start, end],
|
|
2863
2877
|
};
|
|
2864
2878
|
}
|
|
2865
2879
|
|
|
2866
2880
|
function deserializeStringLiteral(pos) {
|
|
2867
|
-
let start,
|
|
2868
|
-
end,
|
|
2881
|
+
let start = deserializeU32(pos),
|
|
2882
|
+
end = deserializeU32(pos + 4),
|
|
2869
2883
|
node = {
|
|
2870
2884
|
type: "Literal",
|
|
2871
2885
|
value: null,
|
|
2872
|
-
raw:
|
|
2873
|
-
|
|
2874
|
-
|
|
2886
|
+
raw:
|
|
2887
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2888
|
+
? null
|
|
2889
|
+
: sourceText.slice(start, end),
|
|
2890
|
+
start,
|
|
2891
|
+
end,
|
|
2875
2892
|
range: [start, end],
|
|
2876
2893
|
},
|
|
2877
|
-
value = deserializeStr(pos +
|
|
2878
|
-
deserializeBool(pos +
|
|
2894
|
+
value = deserializeStr(pos + 16);
|
|
2895
|
+
deserializeBool(pos + 12) &&
|
|
2879
2896
|
(value = value.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
2880
2897
|
node.value = value;
|
|
2881
2898
|
return node;
|
|
2882
2899
|
}
|
|
2883
2900
|
|
|
2884
2901
|
function deserializeBigIntLiteral(pos) {
|
|
2885
|
-
let start,
|
|
2886
|
-
end,
|
|
2902
|
+
let start = deserializeU32(pos),
|
|
2903
|
+
end = deserializeU32(pos + 4),
|
|
2887
2904
|
node = {
|
|
2888
2905
|
type: "Literal",
|
|
2889
2906
|
value: null,
|
|
2890
|
-
raw:
|
|
2907
|
+
raw:
|
|
2908
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2909
|
+
? null
|
|
2910
|
+
: sourceText.slice(start, end),
|
|
2891
2911
|
bigint: null,
|
|
2892
|
-
start
|
|
2893
|
-
end
|
|
2912
|
+
start,
|
|
2913
|
+
end,
|
|
2894
2914
|
range: [start, end],
|
|
2895
2915
|
},
|
|
2896
|
-
bigint = deserializeStr(pos +
|
|
2916
|
+
bigint = deserializeStr(pos + 16);
|
|
2897
2917
|
node.value = BigInt(bigint);
|
|
2898
2918
|
node.bigint = bigint;
|
|
2899
2919
|
return node;
|
|
2900
2920
|
}
|
|
2901
2921
|
|
|
2902
2922
|
function deserializeRegExpLiteral(pos) {
|
|
2903
|
-
let start,
|
|
2904
|
-
end,
|
|
2923
|
+
let start = deserializeU32(pos),
|
|
2924
|
+
end = deserializeU32(pos + 4),
|
|
2905
2925
|
node = {
|
|
2906
2926
|
type: "Literal",
|
|
2907
2927
|
value: null,
|
|
2908
|
-
raw:
|
|
2928
|
+
raw:
|
|
2929
|
+
uint32[(pos + 48) >> 2] === 0 && uint32[(pos + 52) >> 2] === 0
|
|
2930
|
+
? null
|
|
2931
|
+
: sourceText.slice(start, end),
|
|
2909
2932
|
regex: null,
|
|
2910
|
-
start
|
|
2911
|
-
end
|
|
2933
|
+
start,
|
|
2934
|
+
end,
|
|
2912
2935
|
range: [start, end],
|
|
2913
2936
|
},
|
|
2914
|
-
regex = deserializeRegExp(pos +
|
|
2937
|
+
regex = deserializeRegExp(pos + 16),
|
|
2915
2938
|
value = null;
|
|
2916
2939
|
try {
|
|
2917
2940
|
value = new RegExp(regex.pattern, regex.flags);
|
|
@@ -2955,11 +2978,11 @@ function deserializeJSXElement(pos) {
|
|
|
2955
2978
|
end: (end = deserializeU32(pos + 4)),
|
|
2956
2979
|
range: [start, end],
|
|
2957
2980
|
},
|
|
2958
|
-
closingElement = deserializeOptionBoxJSXClosingElement(pos +
|
|
2959
|
-
openingElement = deserializeBoxJSXOpeningElement(pos +
|
|
2981
|
+
closingElement = deserializeOptionBoxJSXClosingElement(pos + 48),
|
|
2982
|
+
openingElement = deserializeBoxJSXOpeningElement(pos + 16);
|
|
2960
2983
|
closingElement === null && (openingElement.selfClosing = true);
|
|
2961
2984
|
node.openingElement = openingElement;
|
|
2962
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2985
|
+
node.children = deserializeVecJSXChild(pos + 24);
|
|
2963
2986
|
node.closingElement = closingElement;
|
|
2964
2987
|
return node;
|
|
2965
2988
|
}
|
|
@@ -2977,9 +3000,9 @@ function deserializeJSXOpeningElement(pos) {
|
|
|
2977
3000
|
end: (end = deserializeU32(pos + 4)),
|
|
2978
3001
|
range: [start, end],
|
|
2979
3002
|
};
|
|
2980
|
-
node.name = deserializeJSXElementName(pos +
|
|
2981
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
2982
|
-
node.attributes = deserializeVecJSXAttributeItem(pos +
|
|
3003
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
3004
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3005
|
+
node.attributes = deserializeVecJSXAttributeItem(pos + 40);
|
|
2983
3006
|
node.selfClosing = false;
|
|
2984
3007
|
return node;
|
|
2985
3008
|
}
|
|
@@ -2994,7 +3017,7 @@ function deserializeJSXClosingElement(pos) {
|
|
|
2994
3017
|
end: (end = deserializeU32(pos + 4)),
|
|
2995
3018
|
range: [start, end],
|
|
2996
3019
|
};
|
|
2997
|
-
node.name = deserializeJSXElementName(pos +
|
|
3020
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2998
3021
|
return node;
|
|
2999
3022
|
}
|
|
3000
3023
|
|
|
@@ -3010,9 +3033,9 @@ function deserializeJSXFragment(pos) {
|
|
|
3010
3033
|
end: (end = deserializeU32(pos + 4)),
|
|
3011
3034
|
range: [start, end],
|
|
3012
3035
|
};
|
|
3013
|
-
node.openingFragment = deserializeJSXOpeningFragment(pos +
|
|
3014
|
-
node.children = deserializeVecJSXChild(pos +
|
|
3015
|
-
node.closingFragment = deserializeJSXClosingFragment(pos +
|
|
3036
|
+
node.openingFragment = deserializeJSXOpeningFragment(pos + 16);
|
|
3037
|
+
node.children = deserializeVecJSXChild(pos + 32);
|
|
3038
|
+
node.closingFragment = deserializeJSXClosingFragment(pos + 56);
|
|
3016
3039
|
return node;
|
|
3017
3040
|
}
|
|
3018
3041
|
|
|
@@ -3078,8 +3101,8 @@ function deserializeJSXNamespacedName(pos) {
|
|
|
3078
3101
|
end: (end = deserializeU32(pos + 4)),
|
|
3079
3102
|
range: [start, end],
|
|
3080
3103
|
};
|
|
3081
|
-
node.namespace = deserializeJSXIdentifier(pos +
|
|
3082
|
-
node.name = deserializeJSXIdentifier(pos +
|
|
3104
|
+
node.namespace = deserializeJSXIdentifier(pos + 16);
|
|
3105
|
+
node.name = deserializeJSXIdentifier(pos + 48);
|
|
3083
3106
|
return node;
|
|
3084
3107
|
}
|
|
3085
3108
|
|
|
@@ -3094,8 +3117,8 @@ function deserializeJSXMemberExpression(pos) {
|
|
|
3094
3117
|
end: (end = deserializeU32(pos + 4)),
|
|
3095
3118
|
range: [start, end],
|
|
3096
3119
|
};
|
|
3097
|
-
node.object = deserializeJSXMemberExpressionObject(pos +
|
|
3098
|
-
node.property = deserializeJSXIdentifier(pos +
|
|
3120
|
+
node.object = deserializeJSXMemberExpressionObject(pos + 16);
|
|
3121
|
+
node.property = deserializeJSXIdentifier(pos + 32);
|
|
3099
3122
|
return node;
|
|
3100
3123
|
}
|
|
3101
3124
|
|
|
@@ -3136,7 +3159,7 @@ function deserializeJSXExpressionContainer(pos) {
|
|
|
3136
3159
|
end: (end = deserializeU32(pos + 4)),
|
|
3137
3160
|
range: [start, end],
|
|
3138
3161
|
};
|
|
3139
|
-
node.expression = deserializeJSXExpression(pos +
|
|
3162
|
+
node.expression = deserializeJSXExpression(pos + 16);
|
|
3140
3163
|
return node;
|
|
3141
3164
|
}
|
|
3142
3165
|
|
|
@@ -3267,8 +3290,8 @@ function deserializeJSXAttribute(pos) {
|
|
|
3267
3290
|
end: (end = deserializeU32(pos + 4)),
|
|
3268
3291
|
range: [start, end],
|
|
3269
3292
|
};
|
|
3270
|
-
node.name = deserializeJSXAttributeName(pos +
|
|
3271
|
-
node.value = deserializeOptionJSXAttributeValue(pos +
|
|
3293
|
+
node.name = deserializeJSXAttributeName(pos + 16);
|
|
3294
|
+
node.value = deserializeOptionJSXAttributeValue(pos + 32);
|
|
3272
3295
|
return node;
|
|
3273
3296
|
}
|
|
3274
3297
|
|
|
@@ -3282,7 +3305,7 @@ function deserializeJSXSpreadAttribute(pos) {
|
|
|
3282
3305
|
end: (end = deserializeU32(pos + 4)),
|
|
3283
3306
|
range: [start, end],
|
|
3284
3307
|
};
|
|
3285
|
-
node.argument = deserializeExpression(pos +
|
|
3308
|
+
node.argument = deserializeExpression(pos + 16);
|
|
3286
3309
|
return node;
|
|
3287
3310
|
}
|
|
3288
3311
|
|
|
@@ -3316,7 +3339,7 @@ function deserializeJSXIdentifier(pos) {
|
|
|
3316
3339
|
let start, end;
|
|
3317
3340
|
return {
|
|
3318
3341
|
type: "JSXIdentifier",
|
|
3319
|
-
name: deserializeStr(pos +
|
|
3342
|
+
name: deserializeStr(pos + 16),
|
|
3320
3343
|
start: (start = deserializeU32(pos)),
|
|
3321
3344
|
end: (end = deserializeU32(pos + 4)),
|
|
3322
3345
|
range: [start, end],
|
|
@@ -3350,18 +3373,22 @@ function deserializeJSXSpreadChild(pos) {
|
|
|
3350
3373
|
end: (end = deserializeU32(pos + 4)),
|
|
3351
3374
|
range: [start, end],
|
|
3352
3375
|
};
|
|
3353
|
-
node.expression = deserializeExpression(pos +
|
|
3376
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3354
3377
|
return node;
|
|
3355
3378
|
}
|
|
3356
3379
|
|
|
3357
3380
|
function deserializeJSXText(pos) {
|
|
3358
|
-
let start,
|
|
3381
|
+
let start = deserializeU32(pos),
|
|
3382
|
+
end = deserializeU32(pos + 4);
|
|
3359
3383
|
return {
|
|
3360
3384
|
type: "JSXText",
|
|
3361
|
-
value: deserializeStr(pos +
|
|
3362
|
-
raw:
|
|
3363
|
-
|
|
3364
|
-
|
|
3385
|
+
value: deserializeStr(pos + 16),
|
|
3386
|
+
raw:
|
|
3387
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
3388
|
+
? null
|
|
3389
|
+
: sourceText.slice(start, end),
|
|
3390
|
+
start,
|
|
3391
|
+
end,
|
|
3365
3392
|
range: [start, end],
|
|
3366
3393
|
};
|
|
3367
3394
|
}
|
|
@@ -3382,7 +3409,7 @@ function deserializeTSThisParameter(pos) {
|
|
|
3382
3409
|
node.decorators = [];
|
|
3383
3410
|
node.name = "this";
|
|
3384
3411
|
node.optional = false;
|
|
3385
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3412
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
|
|
3386
3413
|
return node;
|
|
3387
3414
|
}
|
|
3388
3415
|
|
|
@@ -3393,14 +3420,14 @@ function deserializeTSEnumDeclaration(pos) {
|
|
|
3393
3420
|
type: "TSEnumDeclaration",
|
|
3394
3421
|
id: null,
|
|
3395
3422
|
body: null,
|
|
3396
|
-
const: deserializeBool(pos +
|
|
3397
|
-
declare: deserializeBool(pos +
|
|
3423
|
+
const: deserializeBool(pos + 12),
|
|
3424
|
+
declare: deserializeBool(pos + 13),
|
|
3398
3425
|
start: (start = deserializeU32(pos)),
|
|
3399
3426
|
end: (end = deserializeU32(pos + 4)),
|
|
3400
3427
|
range: [start, end],
|
|
3401
3428
|
};
|
|
3402
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3403
|
-
node.body = deserializeTSEnumBody(pos +
|
|
3429
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3430
|
+
node.body = deserializeTSEnumBody(pos + 48);
|
|
3404
3431
|
return node;
|
|
3405
3432
|
}
|
|
3406
3433
|
|
|
@@ -3414,7 +3441,7 @@ function deserializeTSEnumBody(pos) {
|
|
|
3414
3441
|
end: (end = deserializeU32(pos + 4)),
|
|
3415
3442
|
range: [start, end],
|
|
3416
3443
|
};
|
|
3417
|
-
node.members = deserializeVecTSEnumMember(pos +
|
|
3444
|
+
node.members = deserializeVecTSEnumMember(pos + 16);
|
|
3418
3445
|
return node;
|
|
3419
3446
|
}
|
|
3420
3447
|
|
|
@@ -3430,9 +3457,9 @@ function deserializeTSEnumMember(pos) {
|
|
|
3430
3457
|
end: (end = deserializeU32(pos + 4)),
|
|
3431
3458
|
range: [start, end],
|
|
3432
3459
|
};
|
|
3433
|
-
node.id = deserializeTSEnumMemberName(pos +
|
|
3434
|
-
node.initializer = deserializeOptionExpression(pos +
|
|
3435
|
-
node.computed = deserializeU8(pos +
|
|
3460
|
+
node.id = deserializeTSEnumMemberName(pos + 16);
|
|
3461
|
+
node.initializer = deserializeOptionExpression(pos + 32);
|
|
3462
|
+
node.computed = deserializeU8(pos + 16) > 1;
|
|
3436
3463
|
return node;
|
|
3437
3464
|
}
|
|
3438
3465
|
|
|
@@ -3461,7 +3488,7 @@ function deserializeTSTypeAnnotation(pos) {
|
|
|
3461
3488
|
end: (end = deserializeU32(pos + 4)),
|
|
3462
3489
|
range: [start, end],
|
|
3463
3490
|
};
|
|
3464
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3491
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3465
3492
|
return node;
|
|
3466
3493
|
}
|
|
3467
3494
|
|
|
@@ -3475,7 +3502,7 @@ function deserializeTSLiteralType(pos) {
|
|
|
3475
3502
|
end: (end = deserializeU32(pos + 4)),
|
|
3476
3503
|
range: [start, end],
|
|
3477
3504
|
};
|
|
3478
|
-
node.literal = deserializeTSLiteral(pos +
|
|
3505
|
+
node.literal = deserializeTSLiteral(pos + 16);
|
|
3479
3506
|
return node;
|
|
3480
3507
|
}
|
|
3481
3508
|
|
|
@@ -3592,10 +3619,10 @@ function deserializeTSConditionalType(pos) {
|
|
|
3592
3619
|
end: (end = deserializeU32(pos + 4)),
|
|
3593
3620
|
range: [start, end],
|
|
3594
3621
|
};
|
|
3595
|
-
node.checkType = deserializeTSType(pos +
|
|
3596
|
-
node.extendsType = deserializeTSType(pos +
|
|
3597
|
-
node.trueType = deserializeTSType(pos +
|
|
3598
|
-
node.falseType = deserializeTSType(pos +
|
|
3622
|
+
node.checkType = deserializeTSType(pos + 16);
|
|
3623
|
+
node.extendsType = deserializeTSType(pos + 32);
|
|
3624
|
+
node.trueType = deserializeTSType(pos + 48);
|
|
3625
|
+
node.falseType = deserializeTSType(pos + 64);
|
|
3599
3626
|
return node;
|
|
3600
3627
|
}
|
|
3601
3628
|
|
|
@@ -3609,7 +3636,7 @@ function deserializeTSUnionType(pos) {
|
|
|
3609
3636
|
end: (end = deserializeU32(pos + 4)),
|
|
3610
3637
|
range: [start, end],
|
|
3611
3638
|
};
|
|
3612
|
-
node.types = deserializeVecTSType(pos +
|
|
3639
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3613
3640
|
return node;
|
|
3614
3641
|
}
|
|
3615
3642
|
|
|
@@ -3623,7 +3650,7 @@ function deserializeTSIntersectionType(pos) {
|
|
|
3623
3650
|
end: (end = deserializeU32(pos + 4)),
|
|
3624
3651
|
range: [start, end],
|
|
3625
3652
|
};
|
|
3626
|
-
node.types = deserializeVecTSType(pos +
|
|
3653
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3627
3654
|
return node;
|
|
3628
3655
|
}
|
|
3629
3656
|
|
|
@@ -3638,7 +3665,7 @@ function deserializeTSParenthesizedType(pos) {
|
|
|
3638
3665
|
end: (end = deserializeU32(pos + 4)),
|
|
3639
3666
|
range: [start, end],
|
|
3640
3667
|
};
|
|
3641
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3668
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3642
3669
|
}
|
|
3643
3670
|
return node;
|
|
3644
3671
|
}
|
|
@@ -3648,13 +3675,13 @@ function deserializeTSTypeOperator(pos) {
|
|
|
3648
3675
|
end,
|
|
3649
3676
|
node = {
|
|
3650
3677
|
type: "TSTypeOperator",
|
|
3651
|
-
operator: deserializeTSTypeOperatorOperator(pos +
|
|
3678
|
+
operator: deserializeTSTypeOperatorOperator(pos + 12),
|
|
3652
3679
|
typeAnnotation: null,
|
|
3653
3680
|
start: (start = deserializeU32(pos)),
|
|
3654
3681
|
end: (end = deserializeU32(pos + 4)),
|
|
3655
3682
|
range: [start, end],
|
|
3656
3683
|
};
|
|
3657
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3684
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3658
3685
|
return node;
|
|
3659
3686
|
}
|
|
3660
3687
|
|
|
@@ -3681,7 +3708,7 @@ function deserializeTSArrayType(pos) {
|
|
|
3681
3708
|
end: (end = deserializeU32(pos + 4)),
|
|
3682
3709
|
range: [start, end],
|
|
3683
3710
|
};
|
|
3684
|
-
node.elementType = deserializeTSType(pos +
|
|
3711
|
+
node.elementType = deserializeTSType(pos + 16);
|
|
3685
3712
|
return node;
|
|
3686
3713
|
}
|
|
3687
3714
|
|
|
@@ -3696,8 +3723,8 @@ function deserializeTSIndexedAccessType(pos) {
|
|
|
3696
3723
|
end: (end = deserializeU32(pos + 4)),
|
|
3697
3724
|
range: [start, end],
|
|
3698
3725
|
};
|
|
3699
|
-
node.objectType = deserializeTSType(pos +
|
|
3700
|
-
node.indexType = deserializeTSType(pos +
|
|
3726
|
+
node.objectType = deserializeTSType(pos + 16);
|
|
3727
|
+
node.indexType = deserializeTSType(pos + 32);
|
|
3701
3728
|
return node;
|
|
3702
3729
|
}
|
|
3703
3730
|
|
|
@@ -3711,7 +3738,7 @@ function deserializeTSTupleType(pos) {
|
|
|
3711
3738
|
end: (end = deserializeU32(pos + 4)),
|
|
3712
3739
|
range: [start, end],
|
|
3713
3740
|
};
|
|
3714
|
-
node.elementTypes = deserializeVecTSTupleElement(pos +
|
|
3741
|
+
node.elementTypes = deserializeVecTSTupleElement(pos + 16);
|
|
3715
3742
|
return node;
|
|
3716
3743
|
}
|
|
3717
3744
|
|
|
@@ -3722,13 +3749,13 @@ function deserializeTSNamedTupleMember(pos) {
|
|
|
3722
3749
|
type: "TSNamedTupleMember",
|
|
3723
3750
|
label: null,
|
|
3724
3751
|
elementType: null,
|
|
3725
|
-
optional: deserializeBool(pos +
|
|
3752
|
+
optional: deserializeBool(pos + 12),
|
|
3726
3753
|
start: (start = deserializeU32(pos)),
|
|
3727
3754
|
end: (end = deserializeU32(pos + 4)),
|
|
3728
3755
|
range: [start, end],
|
|
3729
3756
|
};
|
|
3730
|
-
node.label = deserializeIdentifierName(pos +
|
|
3731
|
-
node.elementType = deserializeTSTupleElement(pos +
|
|
3757
|
+
node.label = deserializeIdentifierName(pos + 16);
|
|
3758
|
+
node.elementType = deserializeTSTupleElement(pos + 48);
|
|
3732
3759
|
return node;
|
|
3733
3760
|
}
|
|
3734
3761
|
|
|
@@ -3742,7 +3769,7 @@ function deserializeTSOptionalType(pos) {
|
|
|
3742
3769
|
end: (end = deserializeU32(pos + 4)),
|
|
3743
3770
|
range: [start, end],
|
|
3744
3771
|
};
|
|
3745
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3772
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3746
3773
|
return node;
|
|
3747
3774
|
}
|
|
3748
3775
|
|
|
@@ -3756,7 +3783,7 @@ function deserializeTSRestType(pos) {
|
|
|
3756
3783
|
end: (end = deserializeU32(pos + 4)),
|
|
3757
3784
|
range: [start, end],
|
|
3758
3785
|
};
|
|
3759
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3786
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3760
3787
|
return node;
|
|
3761
3788
|
}
|
|
3762
3789
|
|
|
@@ -3996,8 +4023,8 @@ function deserializeTSTypeReference(pos) {
|
|
|
3996
4023
|
end: (end = deserializeU32(pos + 4)),
|
|
3997
4024
|
range: [start, end],
|
|
3998
4025
|
};
|
|
3999
|
-
node.typeName = deserializeTSTypeName(pos +
|
|
4000
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4026
|
+
node.typeName = deserializeTSTypeName(pos + 16);
|
|
4027
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4001
4028
|
return node;
|
|
4002
4029
|
}
|
|
4003
4030
|
|
|
@@ -4025,8 +4052,8 @@ function deserializeTSQualifiedName(pos) {
|
|
|
4025
4052
|
end: (end = deserializeU32(pos + 4)),
|
|
4026
4053
|
range: [start, end],
|
|
4027
4054
|
};
|
|
4028
|
-
node.left = deserializeTSTypeName(pos +
|
|
4029
|
-
node.right = deserializeIdentifierName(pos +
|
|
4055
|
+
node.left = deserializeTSTypeName(pos + 16);
|
|
4056
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
4030
4057
|
return node;
|
|
4031
4058
|
}
|
|
4032
4059
|
|
|
@@ -4040,7 +4067,7 @@ function deserializeTSTypeParameterInstantiation(pos) {
|
|
|
4040
4067
|
end: (end = deserializeU32(pos + 4)),
|
|
4041
4068
|
range: [start, end],
|
|
4042
4069
|
};
|
|
4043
|
-
node.params = deserializeVecTSType(pos +
|
|
4070
|
+
node.params = deserializeVecTSType(pos + 16);
|
|
4044
4071
|
return node;
|
|
4045
4072
|
}
|
|
4046
4073
|
|
|
@@ -4052,16 +4079,16 @@ function deserializeTSTypeParameter(pos) {
|
|
|
4052
4079
|
name: null,
|
|
4053
4080
|
constraint: null,
|
|
4054
4081
|
default: null,
|
|
4055
|
-
in: deserializeBool(pos +
|
|
4056
|
-
out: deserializeBool(pos +
|
|
4057
|
-
const: deserializeBool(pos +
|
|
4082
|
+
in: deserializeBool(pos + 12),
|
|
4083
|
+
out: deserializeBool(pos + 13),
|
|
4084
|
+
const: deserializeBool(pos + 14),
|
|
4058
4085
|
start: (start = deserializeU32(pos)),
|
|
4059
4086
|
end: (end = deserializeU32(pos + 4)),
|
|
4060
4087
|
range: [start, end],
|
|
4061
4088
|
};
|
|
4062
|
-
node.name = deserializeBindingIdentifier(pos +
|
|
4063
|
-
node.constraint = deserializeOptionTSType(pos +
|
|
4064
|
-
node.default = deserializeOptionTSType(pos +
|
|
4089
|
+
node.name = deserializeBindingIdentifier(pos + 16);
|
|
4090
|
+
node.constraint = deserializeOptionTSType(pos + 48);
|
|
4091
|
+
node.default = deserializeOptionTSType(pos + 64);
|
|
4065
4092
|
return node;
|
|
4066
4093
|
}
|
|
4067
4094
|
|
|
@@ -4075,7 +4102,7 @@ function deserializeTSTypeParameterDeclaration(pos) {
|
|
|
4075
4102
|
end: (end = deserializeU32(pos + 4)),
|
|
4076
4103
|
range: [start, end],
|
|
4077
4104
|
};
|
|
4078
|
-
node.params = deserializeVecTSTypeParameter(pos +
|
|
4105
|
+
node.params = deserializeVecTSTypeParameter(pos + 16);
|
|
4079
4106
|
return node;
|
|
4080
4107
|
}
|
|
4081
4108
|
|
|
@@ -4092,9 +4119,9 @@ function deserializeTSTypeAliasDeclaration(pos) {
|
|
|
4092
4119
|
end: (end = deserializeU32(pos + 4)),
|
|
4093
4120
|
range: [start, end],
|
|
4094
4121
|
};
|
|
4095
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4096
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4097
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4122
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4123
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
4124
|
+
node.typeAnnotation = deserializeTSType(pos + 56);
|
|
4098
4125
|
return node;
|
|
4099
4126
|
}
|
|
4100
4127
|
|
|
@@ -4122,7 +4149,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
4122
4149
|
end: (end = deserializeU32(pos + 4)),
|
|
4123
4150
|
range: [start, end],
|
|
4124
4151
|
},
|
|
4125
|
-
expression = deserializeTSTypeName(pos +
|
|
4152
|
+
expression = deserializeTSTypeName(pos + 16);
|
|
4126
4153
|
if (expression.type === "TSQualifiedName") {
|
|
4127
4154
|
let object = expression.left,
|
|
4128
4155
|
{ right } = expression,
|
|
@@ -4154,7 +4181,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
4154
4181
|
}
|
|
4155
4182
|
}
|
|
4156
4183
|
node.expression = expression;
|
|
4157
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4184
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4158
4185
|
return node;
|
|
4159
4186
|
}
|
|
4160
4187
|
|
|
@@ -4172,10 +4199,10 @@ function deserializeTSInterfaceDeclaration(pos) {
|
|
|
4172
4199
|
end: (end = deserializeU32(pos + 4)),
|
|
4173
4200
|
range: [start, end],
|
|
4174
4201
|
};
|
|
4175
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4176
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4177
|
-
node.extends = deserializeVecTSInterfaceHeritage(pos +
|
|
4178
|
-
node.body = deserializeBoxTSInterfaceBody(pos +
|
|
4202
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4203
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
4204
|
+
node.extends = deserializeVecTSInterfaceHeritage(pos + 56);
|
|
4205
|
+
node.body = deserializeBoxTSInterfaceBody(pos + 80);
|
|
4179
4206
|
return node;
|
|
4180
4207
|
}
|
|
4181
4208
|
|
|
@@ -4189,7 +4216,7 @@ function deserializeTSInterfaceBody(pos) {
|
|
|
4189
4216
|
end: (end = deserializeU32(pos + 4)),
|
|
4190
4217
|
range: [start, end],
|
|
4191
4218
|
};
|
|
4192
|
-
node.body = deserializeVecTSSignature(pos +
|
|
4219
|
+
node.body = deserializeVecTSSignature(pos + 16);
|
|
4193
4220
|
return node;
|
|
4194
4221
|
}
|
|
4195
4222
|
|
|
@@ -4198,9 +4225,9 @@ function deserializeTSPropertySignature(pos) {
|
|
|
4198
4225
|
end,
|
|
4199
4226
|
node = {
|
|
4200
4227
|
type: "TSPropertySignature",
|
|
4201
|
-
computed: deserializeBool(pos +
|
|
4202
|
-
optional: deserializeBool(pos +
|
|
4203
|
-
readonly: deserializeBool(pos +
|
|
4228
|
+
computed: deserializeBool(pos + 12),
|
|
4229
|
+
optional: deserializeBool(pos + 13),
|
|
4230
|
+
readonly: deserializeBool(pos + 14),
|
|
4204
4231
|
key: null,
|
|
4205
4232
|
typeAnnotation: null,
|
|
4206
4233
|
accessibility: null,
|
|
@@ -4209,8 +4236,8 @@ function deserializeTSPropertySignature(pos) {
|
|
|
4209
4236
|
end: (end = deserializeU32(pos + 4)),
|
|
4210
4237
|
range: [start, end],
|
|
4211
4238
|
};
|
|
4212
|
-
node.key = deserializePropertyKey(pos +
|
|
4213
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4239
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
4240
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
4214
4241
|
node.static = false;
|
|
4215
4242
|
return node;
|
|
4216
4243
|
}
|
|
@@ -4239,15 +4266,15 @@ function deserializeTSIndexSignature(pos) {
|
|
|
4239
4266
|
type: "TSIndexSignature",
|
|
4240
4267
|
parameters: null,
|
|
4241
4268
|
typeAnnotation: null,
|
|
4242
|
-
readonly: deserializeBool(pos +
|
|
4243
|
-
static: deserializeBool(pos +
|
|
4269
|
+
readonly: deserializeBool(pos + 12),
|
|
4270
|
+
static: deserializeBool(pos + 13),
|
|
4244
4271
|
accessibility: null,
|
|
4245
4272
|
start: (start = deserializeU32(pos)),
|
|
4246
4273
|
end: (end = deserializeU32(pos + 4)),
|
|
4247
4274
|
range: [start, end],
|
|
4248
4275
|
};
|
|
4249
|
-
node.parameters = deserializeVecTSIndexSignatureName(pos +
|
|
4250
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
4276
|
+
node.parameters = deserializeVecTSIndexSignatureName(pos + 16);
|
|
4277
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
4251
4278
|
return node;
|
|
4252
4279
|
}
|
|
4253
4280
|
|
|
@@ -4263,12 +4290,12 @@ function deserializeTSCallSignatureDeclaration(pos) {
|
|
|
4263
4290
|
end: (end = deserializeU32(pos + 4)),
|
|
4264
4291
|
range: [start, end],
|
|
4265
4292
|
},
|
|
4266
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4267
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4293
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
4294
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
4268
4295
|
thisParam !== null && params.unshift(thisParam);
|
|
4269
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4296
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4270
4297
|
node.params = params;
|
|
4271
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4298
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
4272
4299
|
return node;
|
|
4273
4300
|
}
|
|
4274
4301
|
|
|
@@ -4304,13 +4331,13 @@ function deserializeTSMethodSignature(pos) {
|
|
|
4304
4331
|
end: (end = deserializeU32(pos + 4)),
|
|
4305
4332
|
range: [start, end],
|
|
4306
4333
|
},
|
|
4307
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4308
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4334
|
+
params = deserializeBoxFormalParameters(pos + 48),
|
|
4335
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 40);
|
|
4309
4336
|
thisParam !== null && params.unshift(thisParam);
|
|
4310
|
-
node.key = deserializePropertyKey(pos +
|
|
4311
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4337
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
4338
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 32);
|
|
4312
4339
|
node.params = params;
|
|
4313
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4340
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
4314
4341
|
node.readonly = false;
|
|
4315
4342
|
node.static = false;
|
|
4316
4343
|
return node;
|
|
@@ -4328,9 +4355,9 @@ function deserializeTSConstructSignatureDeclaration(pos) {
|
|
|
4328
4355
|
end: (end = deserializeU32(pos + 4)),
|
|
4329
4356
|
range: [start, end],
|
|
4330
4357
|
};
|
|
4331
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4332
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
4333
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4358
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4359
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4360
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
4334
4361
|
return node;
|
|
4335
4362
|
}
|
|
4336
4363
|
|
|
@@ -4340,7 +4367,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
4340
4367
|
node = {
|
|
4341
4368
|
type: "Identifier",
|
|
4342
4369
|
decorators: null,
|
|
4343
|
-
name: deserializeStr(pos +
|
|
4370
|
+
name: deserializeStr(pos + 16),
|
|
4344
4371
|
optional: null,
|
|
4345
4372
|
typeAnnotation: null,
|
|
4346
4373
|
start: (start = deserializeU32(pos)),
|
|
@@ -4349,7 +4376,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
4349
4376
|
};
|
|
4350
4377
|
node.decorators = [];
|
|
4351
4378
|
node.optional = false;
|
|
4352
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
4379
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4353
4380
|
return node;
|
|
4354
4381
|
}
|
|
4355
4382
|
|
|
@@ -4364,8 +4391,8 @@ function deserializeTSInterfaceHeritage(pos) {
|
|
|
4364
4391
|
end: (end = deserializeU32(pos + 4)),
|
|
4365
4392
|
range: [start, end],
|
|
4366
4393
|
};
|
|
4367
|
-
node.expression = deserializeExpression(pos +
|
|
4368
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4394
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4395
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4369
4396
|
return node;
|
|
4370
4397
|
}
|
|
4371
4398
|
|
|
@@ -4375,14 +4402,14 @@ function deserializeTSTypePredicate(pos) {
|
|
|
4375
4402
|
node = {
|
|
4376
4403
|
type: "TSTypePredicate",
|
|
4377
4404
|
parameterName: null,
|
|
4378
|
-
asserts: deserializeBool(pos +
|
|
4405
|
+
asserts: deserializeBool(pos + 12),
|
|
4379
4406
|
typeAnnotation: null,
|
|
4380
4407
|
start: (start = deserializeU32(pos)),
|
|
4381
4408
|
end: (end = deserializeU32(pos + 4)),
|
|
4382
4409
|
range: [start, end],
|
|
4383
4410
|
};
|
|
4384
|
-
node.parameterName = deserializeTSTypePredicateName(pos +
|
|
4385
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4411
|
+
node.parameterName = deserializeTSTypePredicateName(pos + 16);
|
|
4412
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
4386
4413
|
return node;
|
|
4387
4414
|
}
|
|
4388
4415
|
|
|
@@ -4403,7 +4430,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4403
4430
|
end = deserializeU32(pos + 4),
|
|
4404
4431
|
declare = deserializeBool(pos + 89),
|
|
4405
4432
|
node,
|
|
4406
|
-
body = deserializeOptionTSModuleDeclarationBody(pos +
|
|
4433
|
+
body = deserializeOptionTSModuleDeclarationBody(pos + 72);
|
|
4407
4434
|
if (body === null) {
|
|
4408
4435
|
node = {
|
|
4409
4436
|
type: "TSModuleDeclaration",
|
|
@@ -4415,7 +4442,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4415
4442
|
end,
|
|
4416
4443
|
range: [start, end],
|
|
4417
4444
|
};
|
|
4418
|
-
node.id = deserializeTSModuleDeclarationName(pos +
|
|
4445
|
+
node.id = deserializeTSModuleDeclarationName(pos + 16);
|
|
4419
4446
|
} else {
|
|
4420
4447
|
node = {
|
|
4421
4448
|
type: "TSModuleDeclaration",
|
|
@@ -4428,7 +4455,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4428
4455
|
end,
|
|
4429
4456
|
range: [start, end],
|
|
4430
4457
|
};
|
|
4431
|
-
let id = deserializeTSModuleDeclarationName(pos +
|
|
4458
|
+
let id = deserializeTSModuleDeclarationName(pos + 16);
|
|
4432
4459
|
if (body.type === "TSModuleBlock") node.id = id;
|
|
4433
4460
|
else {
|
|
4434
4461
|
let innerId = body.id;
|
|
@@ -4527,11 +4554,11 @@ function deserializeTSGlobalDeclaration(pos) {
|
|
|
4527
4554
|
name: "global",
|
|
4528
4555
|
optional: false,
|
|
4529
4556
|
typeAnnotation: null,
|
|
4530
|
-
start: (keywordStart = deserializeU32(pos +
|
|
4531
|
-
end: (keywordEnd = deserializeU32(pos +
|
|
4557
|
+
start: (keywordStart = deserializeU32(pos + 16)),
|
|
4558
|
+
end: (keywordEnd = deserializeU32(pos + 20)),
|
|
4532
4559
|
range: [keywordStart, keywordEnd],
|
|
4533
4560
|
};
|
|
4534
|
-
node.body = deserializeTSModuleBlock(pos +
|
|
4561
|
+
node.body = deserializeTSModuleBlock(pos + 24);
|
|
4535
4562
|
node.kind = "global";
|
|
4536
4563
|
node.global = true;
|
|
4537
4564
|
return node;
|
|
@@ -4547,8 +4574,8 @@ function deserializeTSModuleBlock(pos) {
|
|
|
4547
4574
|
end: (end = deserializeU32(pos + 4)),
|
|
4548
4575
|
range: [start, end],
|
|
4549
4576
|
},
|
|
4550
|
-
body = deserializeVecDirective(pos +
|
|
4551
|
-
body.push(...deserializeVecStatement(pos +
|
|
4577
|
+
body = deserializeVecDirective(pos + 16);
|
|
4578
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
4552
4579
|
node.body = body;
|
|
4553
4580
|
return node;
|
|
4554
4581
|
}
|
|
@@ -4563,7 +4590,7 @@ function deserializeTSTypeLiteral(pos) {
|
|
|
4563
4590
|
end: (end = deserializeU32(pos + 4)),
|
|
4564
4591
|
range: [start, end],
|
|
4565
4592
|
};
|
|
4566
|
-
node.members = deserializeVecTSSignature(pos +
|
|
4593
|
+
node.members = deserializeVecTSSignature(pos + 16);
|
|
4567
4594
|
return node;
|
|
4568
4595
|
}
|
|
4569
4596
|
|
|
@@ -4577,7 +4604,7 @@ function deserializeTSInferType(pos) {
|
|
|
4577
4604
|
end: (end = deserializeU32(pos + 4)),
|
|
4578
4605
|
range: [start, end],
|
|
4579
4606
|
};
|
|
4580
|
-
node.typeParameter = deserializeBoxTSTypeParameter(pos +
|
|
4607
|
+
node.typeParameter = deserializeBoxTSTypeParameter(pos + 16);
|
|
4581
4608
|
return node;
|
|
4582
4609
|
}
|
|
4583
4610
|
|
|
@@ -4592,8 +4619,8 @@ function deserializeTSTypeQuery(pos) {
|
|
|
4592
4619
|
end: (end = deserializeU32(pos + 4)),
|
|
4593
4620
|
range: [start, end],
|
|
4594
4621
|
};
|
|
4595
|
-
node.exprName = deserializeTSTypeQueryExprName(pos +
|
|
4596
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4622
|
+
node.exprName = deserializeTSTypeQueryExprName(pos + 16);
|
|
4623
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4597
4624
|
return node;
|
|
4598
4625
|
}
|
|
4599
4626
|
|
|
@@ -4625,10 +4652,10 @@ function deserializeTSImportType(pos) {
|
|
|
4625
4652
|
end: (end = deserializeU32(pos + 4)),
|
|
4626
4653
|
range: [start, end],
|
|
4627
4654
|
};
|
|
4628
|
-
node.source = deserializeStringLiteral(pos +
|
|
4629
|
-
node.options = deserializeOptionBoxObjectExpression(pos +
|
|
4630
|
-
node.qualifier = deserializeOptionTSImportTypeQualifier(pos +
|
|
4631
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4655
|
+
node.source = deserializeStringLiteral(pos + 16);
|
|
4656
|
+
node.options = deserializeOptionBoxObjectExpression(pos + 64);
|
|
4657
|
+
node.qualifier = deserializeOptionTSImportTypeQualifier(pos + 72);
|
|
4658
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 88);
|
|
4632
4659
|
return node;
|
|
4633
4660
|
}
|
|
4634
4661
|
|
|
@@ -4654,8 +4681,8 @@ function deserializeTSImportTypeQualifiedName(pos) {
|
|
|
4654
4681
|
end: (end = deserializeU32(pos + 4)),
|
|
4655
4682
|
range: [start, end],
|
|
4656
4683
|
};
|
|
4657
|
-
node.left = deserializeTSImportTypeQualifier(pos +
|
|
4658
|
-
node.right = deserializeIdentifierName(pos +
|
|
4684
|
+
node.left = deserializeTSImportTypeQualifier(pos + 16);
|
|
4685
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
4659
4686
|
return node;
|
|
4660
4687
|
}
|
|
4661
4688
|
|
|
@@ -4671,12 +4698,12 @@ function deserializeTSFunctionType(pos) {
|
|
|
4671
4698
|
end: (end = deserializeU32(pos + 4)),
|
|
4672
4699
|
range: [start, end],
|
|
4673
4700
|
},
|
|
4674
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4675
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4701
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
4702
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
4676
4703
|
thisParam !== null && params.unshift(thisParam);
|
|
4677
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4704
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4678
4705
|
node.params = params;
|
|
4679
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4706
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
4680
4707
|
return node;
|
|
4681
4708
|
}
|
|
4682
4709
|
|
|
@@ -4693,9 +4720,9 @@ function deserializeTSConstructorType(pos) {
|
|
|
4693
4720
|
end: (end = deserializeU32(pos + 4)),
|
|
4694
4721
|
range: [start, end],
|
|
4695
4722
|
};
|
|
4696
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4697
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
4698
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4723
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4724
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4725
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4699
4726
|
return node;
|
|
4700
4727
|
}
|
|
4701
4728
|
|
|
@@ -4716,10 +4743,10 @@ function deserializeTSMappedType(pos) {
|
|
|
4716
4743
|
},
|
|
4717
4744
|
optional = deserializeOptionTSMappedTypeModifierOperator(pos + 96);
|
|
4718
4745
|
optional === null && (optional = false);
|
|
4719
|
-
node.key = deserializeBindingIdentifier(pos +
|
|
4720
|
-
node.constraint = deserializeTSType(pos +
|
|
4721
|
-
node.nameType = deserializeOptionTSType(pos +
|
|
4722
|
-
node.typeAnnotation = deserializeOptionTSType(pos +
|
|
4746
|
+
node.key = deserializeBindingIdentifier(pos + 16);
|
|
4747
|
+
node.constraint = deserializeTSType(pos + 48);
|
|
4748
|
+
node.nameType = deserializeOptionTSType(pos + 64);
|
|
4749
|
+
node.typeAnnotation = deserializeOptionTSType(pos + 80);
|
|
4723
4750
|
node.optional = optional;
|
|
4724
4751
|
return node;
|
|
4725
4752
|
}
|
|
@@ -4748,8 +4775,8 @@ function deserializeTSTemplateLiteralType(pos) {
|
|
|
4748
4775
|
end: (end = deserializeU32(pos + 4)),
|
|
4749
4776
|
range: [start, end],
|
|
4750
4777
|
};
|
|
4751
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
4752
|
-
node.types = deserializeVecTSType(pos +
|
|
4778
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
4779
|
+
node.types = deserializeVecTSType(pos + 40);
|
|
4753
4780
|
return node;
|
|
4754
4781
|
}
|
|
4755
4782
|
|
|
@@ -4764,8 +4791,8 @@ function deserializeTSAsExpression(pos) {
|
|
|
4764
4791
|
end: (end = deserializeU32(pos + 4)),
|
|
4765
4792
|
range: [start, end],
|
|
4766
4793
|
};
|
|
4767
|
-
node.expression = deserializeExpression(pos +
|
|
4768
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4794
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4795
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4769
4796
|
return node;
|
|
4770
4797
|
}
|
|
4771
4798
|
|
|
@@ -4780,8 +4807,8 @@ function deserializeTSSatisfiesExpression(pos) {
|
|
|
4780
4807
|
end: (end = deserializeU32(pos + 4)),
|
|
4781
4808
|
range: [start, end],
|
|
4782
4809
|
};
|
|
4783
|
-
node.expression = deserializeExpression(pos +
|
|
4784
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4810
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4811
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4785
4812
|
return node;
|
|
4786
4813
|
}
|
|
4787
4814
|
|
|
@@ -4796,8 +4823,8 @@ function deserializeTSTypeAssertion(pos) {
|
|
|
4796
4823
|
end: (end = deserializeU32(pos + 4)),
|
|
4797
4824
|
range: [start, end],
|
|
4798
4825
|
};
|
|
4799
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4800
|
-
node.expression = deserializeExpression(pos +
|
|
4826
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4827
|
+
node.expression = deserializeExpression(pos + 32);
|
|
4801
4828
|
return node;
|
|
4802
4829
|
}
|
|
4803
4830
|
|
|
@@ -4808,13 +4835,13 @@ function deserializeTSImportEqualsDeclaration(pos) {
|
|
|
4808
4835
|
type: "TSImportEqualsDeclaration",
|
|
4809
4836
|
id: null,
|
|
4810
4837
|
moduleReference: null,
|
|
4811
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
4838
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
4812
4839
|
start: (start = deserializeU32(pos)),
|
|
4813
4840
|
end: (end = deserializeU32(pos + 4)),
|
|
4814
4841
|
range: [start, end],
|
|
4815
4842
|
};
|
|
4816
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4817
|
-
node.moduleReference = deserializeTSModuleReference(pos +
|
|
4843
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4844
|
+
node.moduleReference = deserializeTSModuleReference(pos + 48);
|
|
4818
4845
|
return node;
|
|
4819
4846
|
}
|
|
4820
4847
|
|
|
@@ -4841,7 +4868,7 @@ function deserializeTSExternalModuleReference(pos) {
|
|
|
4841
4868
|
end: (end = deserializeU32(pos + 4)),
|
|
4842
4869
|
range: [start, end],
|
|
4843
4870
|
};
|
|
4844
|
-
node.expression = deserializeStringLiteral(pos +
|
|
4871
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
4845
4872
|
return node;
|
|
4846
4873
|
}
|
|
4847
4874
|
|
|
@@ -4855,7 +4882,7 @@ function deserializeTSNonNullExpression(pos) {
|
|
|
4855
4882
|
end: (end = deserializeU32(pos + 4)),
|
|
4856
4883
|
range: [start, end],
|
|
4857
4884
|
};
|
|
4858
|
-
node.expression = deserializeExpression(pos +
|
|
4885
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4859
4886
|
return node;
|
|
4860
4887
|
}
|
|
4861
4888
|
|
|
@@ -4869,7 +4896,7 @@ function deserializeDecorator(pos) {
|
|
|
4869
4896
|
end: (end = deserializeU32(pos + 4)),
|
|
4870
4897
|
range: [start, end],
|
|
4871
4898
|
};
|
|
4872
|
-
node.expression = deserializeExpression(pos +
|
|
4899
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4873
4900
|
return node;
|
|
4874
4901
|
}
|
|
4875
4902
|
|
|
@@ -4883,7 +4910,7 @@ function deserializeTSExportAssignment(pos) {
|
|
|
4883
4910
|
end: (end = deserializeU32(pos + 4)),
|
|
4884
4911
|
range: [start, end],
|
|
4885
4912
|
};
|
|
4886
|
-
node.expression = deserializeExpression(pos +
|
|
4913
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4887
4914
|
return node;
|
|
4888
4915
|
}
|
|
4889
4916
|
|
|
@@ -4897,7 +4924,7 @@ function deserializeTSNamespaceExportDeclaration(pos) {
|
|
|
4897
4924
|
end: (end = deserializeU32(pos + 4)),
|
|
4898
4925
|
range: [start, end],
|
|
4899
4926
|
};
|
|
4900
|
-
node.id = deserializeIdentifierName(pos +
|
|
4927
|
+
node.id = deserializeIdentifierName(pos + 16);
|
|
4901
4928
|
return node;
|
|
4902
4929
|
}
|
|
4903
4930
|
|
|
@@ -4912,8 +4939,8 @@ function deserializeTSInstantiationExpression(pos) {
|
|
|
4912
4939
|
end: (end = deserializeU32(pos + 4)),
|
|
4913
4940
|
range: [start, end],
|
|
4914
4941
|
};
|
|
4915
|
-
node.expression = deserializeExpression(pos +
|
|
4916
|
-
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos +
|
|
4942
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4943
|
+
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos + 32);
|
|
4917
4944
|
return node;
|
|
4918
4945
|
}
|
|
4919
4946
|
|
|
@@ -4934,12 +4961,12 @@ function deserializeJSDocNullableType(pos) {
|
|
|
4934
4961
|
node = {
|
|
4935
4962
|
type: "TSJSDocNullableType",
|
|
4936
4963
|
typeAnnotation: null,
|
|
4937
|
-
postfix: deserializeBool(pos +
|
|
4964
|
+
postfix: deserializeBool(pos + 12),
|
|
4938
4965
|
start: (start = deserializeU32(pos)),
|
|
4939
4966
|
end: (end = deserializeU32(pos + 4)),
|
|
4940
4967
|
range: [start, end],
|
|
4941
4968
|
};
|
|
4942
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4969
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4943
4970
|
return node;
|
|
4944
4971
|
}
|
|
4945
4972
|
|
|
@@ -4949,12 +4976,12 @@ function deserializeJSDocNonNullableType(pos) {
|
|
|
4949
4976
|
node = {
|
|
4950
4977
|
type: "TSJSDocNonNullableType",
|
|
4951
4978
|
typeAnnotation: null,
|
|
4952
|
-
postfix: deserializeBool(pos +
|
|
4979
|
+
postfix: deserializeBool(pos + 12),
|
|
4953
4980
|
start: (start = deserializeU32(pos)),
|
|
4954
4981
|
end: (end = deserializeU32(pos + 4)),
|
|
4955
4982
|
range: [start, end],
|
|
4956
4983
|
};
|
|
4957
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4984
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4958
4985
|
return node;
|
|
4959
4986
|
}
|
|
4960
4987
|
|
|
@@ -4994,6 +5021,26 @@ function deserializeComment(pos) {
|
|
|
4994
5021
|
};
|
|
4995
5022
|
}
|
|
4996
5023
|
|
|
5024
|
+
function deserializeModuleKind(pos) {
|
|
5025
|
+
switch (uint8[pos]) {
|
|
5026
|
+
case 0:
|
|
5027
|
+
return "script";
|
|
5028
|
+
case 1:
|
|
5029
|
+
return "module";
|
|
5030
|
+
case 3:
|
|
5031
|
+
return "commonjs";
|
|
5032
|
+
default:
|
|
5033
|
+
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
5034
|
+
}
|
|
5035
|
+
}
|
|
5036
|
+
|
|
5037
|
+
function deserializeSpan(pos) {
|
|
5038
|
+
return {
|
|
5039
|
+
start: deserializeU32(pos),
|
|
5040
|
+
end: deserializeU32(pos + 4),
|
|
5041
|
+
};
|
|
5042
|
+
}
|
|
5043
|
+
|
|
4997
5044
|
function deserializeNameSpan(pos) {
|
|
4998
5045
|
let start, end;
|
|
4999
5046
|
return {
|
|
@@ -5310,26 +5357,6 @@ function deserializeUpdateOperator(pos) {
|
|
|
5310
5357
|
}
|
|
5311
5358
|
}
|
|
5312
5359
|
|
|
5313
|
-
function deserializeSpan(pos) {
|
|
5314
|
-
return {
|
|
5315
|
-
start: deserializeU32(pos),
|
|
5316
|
-
end: deserializeU32(pos + 4),
|
|
5317
|
-
};
|
|
5318
|
-
}
|
|
5319
|
-
|
|
5320
|
-
function deserializeModuleKind(pos) {
|
|
5321
|
-
switch (uint8[pos]) {
|
|
5322
|
-
case 0:
|
|
5323
|
-
return "script";
|
|
5324
|
-
case 1:
|
|
5325
|
-
return "module";
|
|
5326
|
-
case 3:
|
|
5327
|
-
return "commonjs";
|
|
5328
|
-
default:
|
|
5329
|
-
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
5330
|
-
}
|
|
5331
|
-
}
|
|
5332
|
-
|
|
5333
5360
|
function deserializeRawTransferData(pos) {
|
|
5334
5361
|
return {
|
|
5335
5362
|
program: deserializeProgram(pos),
|
|
@@ -5403,36 +5430,32 @@ function deserializeStaticExport(pos) {
|
|
|
5403
5430
|
};
|
|
5404
5431
|
}
|
|
5405
5432
|
|
|
5406
|
-
function deserializeU32(pos) {
|
|
5407
|
-
return uint32[pos >> 2];
|
|
5408
|
-
}
|
|
5409
|
-
|
|
5410
|
-
function deserializeU8(pos) {
|
|
5411
|
-
return uint8[pos];
|
|
5412
|
-
}
|
|
5413
|
-
|
|
5414
5433
|
function deserializeStr(pos) {
|
|
5415
5434
|
let pos32 = pos >> 2,
|
|
5416
5435
|
len = uint32[pos32 + 2];
|
|
5417
5436
|
if (len === 0) return "";
|
|
5418
5437
|
pos = uint32[pos32];
|
|
5419
|
-
if (sourceIsAscii && pos < sourceEndPos) return sourceText.substr(pos, len);
|
|
5420
|
-
// Longer strings use `TextDecoder`
|
|
5421
|
-
// TODO: Find best switch-over point
|
|
5422
5438
|
let end = pos + len;
|
|
5423
|
-
if (
|
|
5424
|
-
//
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5439
|
+
if (end <= firstNonAsciiPos) return sourceTextLatin.substr(pos, len);
|
|
5440
|
+
// Use `utf8Slice` for strings longer than 64 bytes
|
|
5441
|
+
if (len > 64) return utf8Slice.call(uint8, pos, end);
|
|
5442
|
+
if (pos < sourceEndPos) {
|
|
5443
|
+
// Check if all bytes are ASCII, use `utf8Slice` if not
|
|
5444
|
+
for (let i = pos; i < end; i++) if (uint8[i] >= 128) return utf8Slice.call(uint8, pos, end);
|
|
5445
|
+
// String is all ASCII, so slice from `sourceTextLatin`
|
|
5446
|
+
return sourceTextLatin.substr(pos, len);
|
|
5447
|
+
}
|
|
5448
|
+
// String is not in source region - use `fromCharCode.apply` with a temp array of correct length.
|
|
5449
|
+
// Copy bytes into temp array.
|
|
5450
|
+
// If any byte is non-ASCII, use `utf8Slice`.
|
|
5451
|
+
let arr = stringDecodeArrays[len];
|
|
5452
|
+
for (let i = 0; i < len; i++) {
|
|
5453
|
+
let b = uint8[pos + i];
|
|
5454
|
+
if (b >= 128) return utf8Slice.call(uint8, pos, end);
|
|
5455
|
+
arr[i] = b;
|
|
5456
|
+
}
|
|
5457
|
+
// Call `fromCharCode` with temp array
|
|
5458
|
+
return fromCharCode.apply(null, arr);
|
|
5436
5459
|
}
|
|
5437
5460
|
|
|
5438
5461
|
function deserializeVecComment(pos) {
|
|
@@ -5448,8 +5471,9 @@ function deserializeVecComment(pos) {
|
|
|
5448
5471
|
}
|
|
5449
5472
|
|
|
5450
5473
|
function deserializeOptionHashbang(pos) {
|
|
5451
|
-
|
|
5452
|
-
|
|
5474
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5475
|
+
? null
|
|
5476
|
+
: deserializeHashbang(pos);
|
|
5453
5477
|
}
|
|
5454
5478
|
|
|
5455
5479
|
function deserializeVecDirective(pos) {
|
|
@@ -5709,13 +5733,13 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
|
|
|
5709
5733
|
}
|
|
5710
5734
|
|
|
5711
5735
|
function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
|
|
5712
|
-
|
|
5713
|
-
|
|
5736
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5737
|
+
? null
|
|
5738
|
+
: deserializeBoxTSTypeParameterInstantiation(pos);
|
|
5714
5739
|
}
|
|
5715
5740
|
|
|
5716
5741
|
function deserializeOptionStr(pos) {
|
|
5717
|
-
|
|
5718
|
-
return deserializeStr(pos);
|
|
5742
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0 ? null : deserializeStr(pos);
|
|
5719
5743
|
}
|
|
5720
5744
|
|
|
5721
5745
|
function deserializeBoxComputedMemberExpression(pos) {
|
|
@@ -5751,8 +5775,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
|
|
|
5751
5775
|
}
|
|
5752
5776
|
|
|
5753
5777
|
function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
5754
|
-
|
|
5755
|
-
return deserializeAssignmentTargetMaybeDefault(pos);
|
|
5778
|
+
return uint8[pos] === 51 ? null : deserializeAssignmentTargetMaybeDefault(pos);
|
|
5756
5779
|
}
|
|
5757
5780
|
|
|
5758
5781
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
@@ -5772,8 +5795,9 @@ function deserializeBoxAssignmentTargetRest(pos) {
|
|
|
5772
5795
|
}
|
|
5773
5796
|
|
|
5774
5797
|
function deserializeOptionBoxAssignmentTargetRest(pos) {
|
|
5775
|
-
|
|
5776
|
-
|
|
5798
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5799
|
+
? null
|
|
5800
|
+
: deserializeBoxAssignmentTargetRest(pos);
|
|
5777
5801
|
}
|
|
5778
5802
|
|
|
5779
5803
|
function deserializeVecAssignmentTargetProperty(pos) {
|
|
@@ -5801,8 +5825,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
|
|
|
5801
5825
|
}
|
|
5802
5826
|
|
|
5803
5827
|
function deserializeOptionExpression(pos) {
|
|
5804
|
-
|
|
5805
|
-
return deserializeExpression(pos);
|
|
5828
|
+
return uint8[pos] === 51 ? null : deserializeExpression(pos);
|
|
5806
5829
|
}
|
|
5807
5830
|
|
|
5808
5831
|
function deserializeBoxBlockStatement(pos) {
|
|
@@ -5922,23 +5945,23 @@ function deserializeBoxTSTypeAnnotation(pos) {
|
|
|
5922
5945
|
}
|
|
5923
5946
|
|
|
5924
5947
|
function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
5925
|
-
|
|
5926
|
-
|
|
5948
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5949
|
+
? null
|
|
5950
|
+
: deserializeBoxTSTypeAnnotation(pos);
|
|
5927
5951
|
}
|
|
5928
5952
|
|
|
5929
5953
|
function deserializeOptionStatement(pos) {
|
|
5930
|
-
|
|
5931
|
-
return deserializeStatement(pos);
|
|
5954
|
+
return uint8[pos] === 70 ? null : deserializeStatement(pos);
|
|
5932
5955
|
}
|
|
5933
5956
|
|
|
5934
5957
|
function deserializeOptionForStatementInit(pos) {
|
|
5935
|
-
|
|
5936
|
-
return deserializeForStatementInit(pos);
|
|
5958
|
+
return uint8[pos] === 65 ? null : deserializeForStatementInit(pos);
|
|
5937
5959
|
}
|
|
5938
5960
|
|
|
5939
5961
|
function deserializeOptionLabelIdentifier(pos) {
|
|
5940
|
-
|
|
5941
|
-
|
|
5962
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5963
|
+
? null
|
|
5964
|
+
: deserializeLabelIdentifier(pos);
|
|
5942
5965
|
}
|
|
5943
5966
|
|
|
5944
5967
|
function deserializeVecSwitchCase(pos) {
|
|
@@ -5958,18 +5981,19 @@ function deserializeBoxCatchClause(pos) {
|
|
|
5958
5981
|
}
|
|
5959
5982
|
|
|
5960
5983
|
function deserializeOptionBoxCatchClause(pos) {
|
|
5961
|
-
|
|
5962
|
-
|
|
5984
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5985
|
+
? null
|
|
5986
|
+
: deserializeBoxCatchClause(pos);
|
|
5963
5987
|
}
|
|
5964
5988
|
|
|
5965
5989
|
function deserializeOptionBoxBlockStatement(pos) {
|
|
5966
|
-
|
|
5967
|
-
|
|
5990
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5991
|
+
? null
|
|
5992
|
+
: deserializeBoxBlockStatement(pos);
|
|
5968
5993
|
}
|
|
5969
5994
|
|
|
5970
5995
|
function deserializeOptionCatchParameter(pos) {
|
|
5971
|
-
|
|
5972
|
-
return deserializeCatchParameter(pos);
|
|
5996
|
+
return uint8[pos + 16] === 4 ? null : deserializeCatchParameter(pos);
|
|
5973
5997
|
}
|
|
5974
5998
|
|
|
5975
5999
|
function deserializeBoxBindingIdentifier(pos) {
|
|
@@ -6005,13 +6029,13 @@ function deserializeBoxBindingRestElement(pos) {
|
|
|
6005
6029
|
}
|
|
6006
6030
|
|
|
6007
6031
|
function deserializeOptionBoxBindingRestElement(pos) {
|
|
6008
|
-
|
|
6009
|
-
|
|
6032
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6033
|
+
? null
|
|
6034
|
+
: deserializeBoxBindingRestElement(pos);
|
|
6010
6035
|
}
|
|
6011
6036
|
|
|
6012
6037
|
function deserializeOptionBindingPattern(pos) {
|
|
6013
|
-
|
|
6014
|
-
return deserializeBindingPattern(pos);
|
|
6038
|
+
return uint8[pos] === 4 ? null : deserializeBindingPattern(pos);
|
|
6015
6039
|
}
|
|
6016
6040
|
|
|
6017
6041
|
function deserializeVecOptionBindingPattern(pos) {
|
|
@@ -6027,8 +6051,9 @@ function deserializeVecOptionBindingPattern(pos) {
|
|
|
6027
6051
|
}
|
|
6028
6052
|
|
|
6029
6053
|
function deserializeOptionBindingIdentifier(pos) {
|
|
6030
|
-
|
|
6031
|
-
|
|
6054
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
6055
|
+
? null
|
|
6056
|
+
: deserializeBindingIdentifier(pos);
|
|
6032
6057
|
}
|
|
6033
6058
|
|
|
6034
6059
|
function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
@@ -6036,8 +6061,9 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
|
6036
6061
|
}
|
|
6037
6062
|
|
|
6038
6063
|
function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
|
|
6039
|
-
|
|
6040
|
-
|
|
6064
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6065
|
+
? null
|
|
6066
|
+
: deserializeBoxTSTypeParameterDeclaration(pos);
|
|
6041
6067
|
}
|
|
6042
6068
|
|
|
6043
6069
|
function deserializeBoxTSThisParameter(pos) {
|
|
@@ -6045,8 +6071,9 @@ function deserializeBoxTSThisParameter(pos) {
|
|
|
6045
6071
|
}
|
|
6046
6072
|
|
|
6047
6073
|
function deserializeOptionBoxTSThisParameter(pos) {
|
|
6048
|
-
|
|
6049
|
-
|
|
6074
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6075
|
+
? null
|
|
6076
|
+
: deserializeBoxTSThisParameter(pos);
|
|
6050
6077
|
}
|
|
6051
6078
|
|
|
6052
6079
|
function deserializeBoxFormalParameters(pos) {
|
|
@@ -6058,8 +6085,9 @@ function deserializeBoxFunctionBody(pos) {
|
|
|
6058
6085
|
}
|
|
6059
6086
|
|
|
6060
6087
|
function deserializeOptionBoxFunctionBody(pos) {
|
|
6061
|
-
|
|
6062
|
-
|
|
6088
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6089
|
+
? null
|
|
6090
|
+
: deserializeBoxFunctionBody(pos);
|
|
6063
6091
|
}
|
|
6064
6092
|
|
|
6065
6093
|
function deserializeVecFormalParameter(pos) {
|
|
@@ -6091,13 +6119,13 @@ function deserializeBoxExpression(pos) {
|
|
|
6091
6119
|
}
|
|
6092
6120
|
|
|
6093
6121
|
function deserializeOptionBoxExpression(pos) {
|
|
6094
|
-
|
|
6095
|
-
|
|
6122
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6123
|
+
? null
|
|
6124
|
+
: deserializeBoxExpression(pos);
|
|
6096
6125
|
}
|
|
6097
6126
|
|
|
6098
6127
|
function deserializeOptionTSAccessibility(pos) {
|
|
6099
|
-
|
|
6100
|
-
return deserializeTSAccessibility(pos);
|
|
6128
|
+
return uint8[pos] === 3 ? null : deserializeTSAccessibility(pos);
|
|
6101
6129
|
}
|
|
6102
6130
|
|
|
6103
6131
|
function deserializeVecTSClassImplements(pos) {
|
|
@@ -6173,8 +6201,7 @@ function deserializeBoxTSNamespaceExportDeclaration(pos) {
|
|
|
6173
6201
|
}
|
|
6174
6202
|
|
|
6175
6203
|
function deserializeOptionImportPhase(pos) {
|
|
6176
|
-
|
|
6177
|
-
return deserializeImportPhase(pos);
|
|
6204
|
+
return uint8[pos] === 2 ? null : deserializeImportPhase(pos);
|
|
6178
6205
|
}
|
|
6179
6206
|
|
|
6180
6207
|
function deserializeVecImportDeclarationSpecifier(pos) {
|
|
@@ -6190,8 +6217,9 @@ function deserializeVecImportDeclarationSpecifier(pos) {
|
|
|
6190
6217
|
}
|
|
6191
6218
|
|
|
6192
6219
|
function deserializeOptionVecImportDeclarationSpecifier(pos) {
|
|
6193
|
-
|
|
6194
|
-
|
|
6220
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6221
|
+
? null
|
|
6222
|
+
: deserializeVecImportDeclarationSpecifier(pos);
|
|
6195
6223
|
}
|
|
6196
6224
|
|
|
6197
6225
|
function deserializeBoxWithClause(pos) {
|
|
@@ -6199,8 +6227,9 @@ function deserializeBoxWithClause(pos) {
|
|
|
6199
6227
|
}
|
|
6200
6228
|
|
|
6201
6229
|
function deserializeOptionBoxWithClause(pos) {
|
|
6202
|
-
|
|
6203
|
-
|
|
6230
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6231
|
+
? null
|
|
6232
|
+
: deserializeBoxWithClause(pos);
|
|
6204
6233
|
}
|
|
6205
6234
|
|
|
6206
6235
|
function deserializeBoxImportSpecifier(pos) {
|
|
@@ -6228,8 +6257,7 @@ function deserializeVecImportAttribute(pos) {
|
|
|
6228
6257
|
}
|
|
6229
6258
|
|
|
6230
6259
|
function deserializeOptionDeclaration(pos) {
|
|
6231
|
-
|
|
6232
|
-
return deserializeDeclaration(pos);
|
|
6260
|
+
return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
|
|
6233
6261
|
}
|
|
6234
6262
|
|
|
6235
6263
|
function deserializeVecExportSpecifier(pos) {
|
|
@@ -6245,19 +6273,21 @@ function deserializeVecExportSpecifier(pos) {
|
|
|
6245
6273
|
}
|
|
6246
6274
|
|
|
6247
6275
|
function deserializeOptionStringLiteral(pos) {
|
|
6248
|
-
|
|
6249
|
-
return deserializeStringLiteral(pos);
|
|
6276
|
+
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
6250
6277
|
}
|
|
6251
6278
|
|
|
6252
6279
|
function deserializeOptionModuleExportName(pos) {
|
|
6253
|
-
|
|
6254
|
-
return deserializeModuleExportName(pos);
|
|
6280
|
+
return uint8[pos] === 3 ? null : deserializeModuleExportName(pos);
|
|
6255
6281
|
}
|
|
6256
6282
|
|
|
6257
6283
|
function deserializeF64(pos) {
|
|
6258
6284
|
return float64[pos >> 3];
|
|
6259
6285
|
}
|
|
6260
6286
|
|
|
6287
|
+
function deserializeU8(pos) {
|
|
6288
|
+
return uint8[pos];
|
|
6289
|
+
}
|
|
6290
|
+
|
|
6261
6291
|
function deserializeBoxJSXOpeningElement(pos) {
|
|
6262
6292
|
return deserializeJSXOpeningElement(uint32[pos >> 2]);
|
|
6263
6293
|
}
|
|
@@ -6279,8 +6309,9 @@ function deserializeBoxJSXClosingElement(pos) {
|
|
|
6279
6309
|
}
|
|
6280
6310
|
|
|
6281
6311
|
function deserializeOptionBoxJSXClosingElement(pos) {
|
|
6282
|
-
|
|
6283
|
-
|
|
6312
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6313
|
+
? null
|
|
6314
|
+
: deserializeBoxJSXClosingElement(pos);
|
|
6284
6315
|
}
|
|
6285
6316
|
|
|
6286
6317
|
function deserializeVecJSXAttributeItem(pos) {
|
|
@@ -6316,8 +6347,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
|
|
|
6316
6347
|
}
|
|
6317
6348
|
|
|
6318
6349
|
function deserializeOptionJSXAttributeValue(pos) {
|
|
6319
|
-
|
|
6320
|
-
return deserializeJSXAttributeValue(pos);
|
|
6350
|
+
return uint8[pos] === 4 ? null : deserializeJSXAttributeValue(pos);
|
|
6321
6351
|
}
|
|
6322
6352
|
|
|
6323
6353
|
function deserializeBoxJSXExpressionContainer(pos) {
|
|
@@ -6529,8 +6559,7 @@ function deserializeBoxTSQualifiedName(pos) {
|
|
|
6529
6559
|
}
|
|
6530
6560
|
|
|
6531
6561
|
function deserializeOptionTSType(pos) {
|
|
6532
|
-
|
|
6533
|
-
return deserializeTSType(pos);
|
|
6562
|
+
return uint8[pos] === 38 ? null : deserializeTSType(pos);
|
|
6534
6563
|
}
|
|
6535
6564
|
|
|
6536
6565
|
function deserializeVecTSTypeParameter(pos) {
|
|
@@ -6602,8 +6631,7 @@ function deserializeVecTSIndexSignatureName(pos) {
|
|
|
6602
6631
|
}
|
|
6603
6632
|
|
|
6604
6633
|
function deserializeOptionTSModuleDeclarationBody(pos) {
|
|
6605
|
-
|
|
6606
|
-
return deserializeTSModuleDeclarationBody(pos);
|
|
6634
|
+
return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
|
|
6607
6635
|
}
|
|
6608
6636
|
|
|
6609
6637
|
function deserializeBoxTSModuleBlock(pos) {
|
|
@@ -6615,13 +6643,13 @@ function deserializeBoxTSTypeParameter(pos) {
|
|
|
6615
6643
|
}
|
|
6616
6644
|
|
|
6617
6645
|
function deserializeOptionBoxObjectExpression(pos) {
|
|
6618
|
-
|
|
6619
|
-
|
|
6646
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6647
|
+
? null
|
|
6648
|
+
: deserializeBoxObjectExpression(pos);
|
|
6620
6649
|
}
|
|
6621
6650
|
|
|
6622
6651
|
function deserializeOptionTSImportTypeQualifier(pos) {
|
|
6623
|
-
|
|
6624
|
-
return deserializeTSImportTypeQualifier(pos);
|
|
6652
|
+
return uint8[pos] === 2 ? null : deserializeTSImportTypeQualifier(pos);
|
|
6625
6653
|
}
|
|
6626
6654
|
|
|
6627
6655
|
function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
@@ -6629,17 +6657,21 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
|
6629
6657
|
}
|
|
6630
6658
|
|
|
6631
6659
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
6632
|
-
|
|
6633
|
-
return deserializeTSMappedTypeModifierOperator(pos);
|
|
6660
|
+
return uint8[pos] === 3 ? null : deserializeTSMappedTypeModifierOperator(pos);
|
|
6634
6661
|
}
|
|
6635
6662
|
|
|
6636
6663
|
function deserializeBoxTSExternalModuleReference(pos) {
|
|
6637
6664
|
return deserializeTSExternalModuleReference(uint32[pos >> 2]);
|
|
6638
6665
|
}
|
|
6639
6666
|
|
|
6667
|
+
function deserializeU32(pos) {
|
|
6668
|
+
return uint32[pos >> 2];
|
|
6669
|
+
}
|
|
6670
|
+
|
|
6640
6671
|
function deserializeOptionNameSpan(pos) {
|
|
6641
|
-
|
|
6642
|
-
|
|
6672
|
+
return uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0
|
|
6673
|
+
? null
|
|
6674
|
+
: deserializeNameSpan(pos);
|
|
6643
6675
|
}
|
|
6644
6676
|
|
|
6645
6677
|
function deserializeVecError(pos) {
|