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) {
|
|
@@ -38,9 +53,9 @@ function deserializeProgram(pos) {
|
|
|
38
53
|
start: 0,
|
|
39
54
|
end,
|
|
40
55
|
};
|
|
41
|
-
program.hashbang = deserializeOptionHashbang(pos +
|
|
42
|
-
let body = (program.body = deserializeVecDirective(pos +
|
|
43
|
-
body.push(...deserializeVecStatement(pos +
|
|
56
|
+
program.hashbang = deserializeOptionHashbang(pos + 56);
|
|
57
|
+
let body = (program.body = deserializeVecDirective(pos + 88));
|
|
58
|
+
body.push(...deserializeVecStatement(pos + 112));
|
|
44
59
|
{
|
|
45
60
|
let start;
|
|
46
61
|
if (body.length > 0) {
|
|
@@ -160,7 +175,7 @@ function deserializeIdentifierName(pos) {
|
|
|
160
175
|
let node = {
|
|
161
176
|
type: "Identifier",
|
|
162
177
|
decorators: null,
|
|
163
|
-
name: deserializeStr(pos +
|
|
178
|
+
name: deserializeStr(pos + 16),
|
|
164
179
|
optional: null,
|
|
165
180
|
typeAnnotation: null,
|
|
166
181
|
start: deserializeU32(pos),
|
|
@@ -175,7 +190,7 @@ function deserializeIdentifierReference(pos) {
|
|
|
175
190
|
let node = {
|
|
176
191
|
type: "Identifier",
|
|
177
192
|
decorators: null,
|
|
178
|
-
name: deserializeStr(pos +
|
|
193
|
+
name: deserializeStr(pos + 16),
|
|
179
194
|
optional: null,
|
|
180
195
|
typeAnnotation: null,
|
|
181
196
|
start: deserializeU32(pos),
|
|
@@ -190,7 +205,7 @@ function deserializeBindingIdentifier(pos) {
|
|
|
190
205
|
let node = {
|
|
191
206
|
type: "Identifier",
|
|
192
207
|
decorators: null,
|
|
193
|
-
name: deserializeStr(pos +
|
|
208
|
+
name: deserializeStr(pos + 16),
|
|
194
209
|
optional: null,
|
|
195
210
|
typeAnnotation: null,
|
|
196
211
|
start: deserializeU32(pos),
|
|
@@ -205,7 +220,7 @@ function deserializeLabelIdentifier(pos) {
|
|
|
205
220
|
let node = {
|
|
206
221
|
type: "Identifier",
|
|
207
222
|
decorators: null,
|
|
208
|
-
name: deserializeStr(pos +
|
|
223
|
+
name: deserializeStr(pos + 16),
|
|
209
224
|
optional: null,
|
|
210
225
|
typeAnnotation: null,
|
|
211
226
|
start: deserializeU32(pos),
|
|
@@ -231,7 +246,7 @@ function deserializeArrayExpression(pos) {
|
|
|
231
246
|
start: deserializeU32(pos),
|
|
232
247
|
end: deserializeU32(pos + 4),
|
|
233
248
|
};
|
|
234
|
-
node.elements = deserializeVecArrayExpressionElement(pos +
|
|
249
|
+
node.elements = deserializeVecArrayExpressionElement(pos + 16);
|
|
235
250
|
return node;
|
|
236
251
|
}
|
|
237
252
|
|
|
@@ -343,7 +358,7 @@ function deserializeObjectExpression(pos) {
|
|
|
343
358
|
start: deserializeU32(pos),
|
|
344
359
|
end: deserializeU32(pos + 4),
|
|
345
360
|
};
|
|
346
|
-
node.properties = deserializeVecObjectPropertyKind(pos +
|
|
361
|
+
node.properties = deserializeVecObjectPropertyKind(pos + 16);
|
|
347
362
|
return node;
|
|
348
363
|
}
|
|
349
364
|
|
|
@@ -361,18 +376,18 @@ function deserializeObjectPropertyKind(pos) {
|
|
|
361
376
|
function deserializeObjectProperty(pos) {
|
|
362
377
|
let node = {
|
|
363
378
|
type: "Property",
|
|
364
|
-
kind: deserializePropertyKind(pos +
|
|
379
|
+
kind: deserializePropertyKind(pos + 12),
|
|
365
380
|
key: null,
|
|
366
381
|
value: null,
|
|
367
|
-
method: deserializeBool(pos +
|
|
368
|
-
shorthand: deserializeBool(pos +
|
|
369
|
-
computed: deserializeBool(pos +
|
|
382
|
+
method: deserializeBool(pos + 13),
|
|
383
|
+
shorthand: deserializeBool(pos + 14),
|
|
384
|
+
computed: deserializeBool(pos + 15),
|
|
370
385
|
optional: null,
|
|
371
386
|
start: deserializeU32(pos),
|
|
372
387
|
end: deserializeU32(pos + 4),
|
|
373
388
|
};
|
|
374
|
-
node.key = deserializePropertyKey(pos +
|
|
375
|
-
node.value = deserializeExpression(pos +
|
|
389
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
390
|
+
node.value = deserializeExpression(pos + 32);
|
|
376
391
|
node.optional = false;
|
|
377
392
|
return node;
|
|
378
393
|
}
|
|
@@ -495,8 +510,8 @@ function deserializeTemplateLiteral(pos) {
|
|
|
495
510
|
start: deserializeU32(pos),
|
|
496
511
|
end: deserializeU32(pos + 4),
|
|
497
512
|
};
|
|
498
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
499
|
-
node.expressions = deserializeVecExpression(pos +
|
|
513
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
514
|
+
node.expressions = deserializeVecExpression(pos + 40);
|
|
500
515
|
return node;
|
|
501
516
|
}
|
|
502
517
|
|
|
@@ -509,19 +524,19 @@ function deserializeTaggedTemplateExpression(pos) {
|
|
|
509
524
|
start: deserializeU32(pos),
|
|
510
525
|
end: deserializeU32(pos + 4),
|
|
511
526
|
};
|
|
512
|
-
node.tag = deserializeExpression(pos +
|
|
513
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
514
|
-
node.quasi = deserializeTemplateLiteral(pos +
|
|
527
|
+
node.tag = deserializeExpression(pos + 16);
|
|
528
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
529
|
+
node.quasi = deserializeTemplateLiteral(pos + 40);
|
|
515
530
|
return node;
|
|
516
531
|
}
|
|
517
532
|
|
|
518
533
|
function deserializeTemplateElement(pos) {
|
|
519
|
-
let tail = deserializeBool(pos +
|
|
534
|
+
let tail = deserializeBool(pos + 12),
|
|
520
535
|
start = deserializeU32(pos) - 1,
|
|
521
536
|
end = deserializeU32(pos + 4) + 2 - tail,
|
|
522
|
-
value = deserializeTemplateElementValue(pos +
|
|
537
|
+
value = deserializeTemplateElementValue(pos + 16);
|
|
523
538
|
value.cooked !== null &&
|
|
524
|
-
deserializeBool(pos +
|
|
539
|
+
deserializeBool(pos + 13) &&
|
|
525
540
|
(value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) =>
|
|
526
541
|
String.fromCodePoint(parseInt(hex, 16)),
|
|
527
542
|
));
|
|
@@ -546,13 +561,13 @@ function deserializeComputedMemberExpression(pos) {
|
|
|
546
561
|
type: "MemberExpression",
|
|
547
562
|
object: null,
|
|
548
563
|
property: null,
|
|
549
|
-
optional: deserializeBool(pos +
|
|
564
|
+
optional: deserializeBool(pos + 12),
|
|
550
565
|
computed: null,
|
|
551
566
|
start: deserializeU32(pos),
|
|
552
567
|
end: deserializeU32(pos + 4),
|
|
553
568
|
};
|
|
554
|
-
node.object = deserializeExpression(pos +
|
|
555
|
-
node.property = deserializeExpression(pos +
|
|
569
|
+
node.object = deserializeExpression(pos + 16);
|
|
570
|
+
node.property = deserializeExpression(pos + 32);
|
|
556
571
|
node.computed = true;
|
|
557
572
|
return node;
|
|
558
573
|
}
|
|
@@ -562,13 +577,13 @@ function deserializeStaticMemberExpression(pos) {
|
|
|
562
577
|
type: "MemberExpression",
|
|
563
578
|
object: null,
|
|
564
579
|
property: null,
|
|
565
|
-
optional: deserializeBool(pos +
|
|
580
|
+
optional: deserializeBool(pos + 12),
|
|
566
581
|
computed: null,
|
|
567
582
|
start: deserializeU32(pos),
|
|
568
583
|
end: deserializeU32(pos + 4),
|
|
569
584
|
};
|
|
570
|
-
node.object = deserializeExpression(pos +
|
|
571
|
-
node.property = deserializeIdentifierName(pos +
|
|
585
|
+
node.object = deserializeExpression(pos + 16);
|
|
586
|
+
node.property = deserializeIdentifierName(pos + 32);
|
|
572
587
|
node.computed = false;
|
|
573
588
|
return node;
|
|
574
589
|
}
|
|
@@ -578,13 +593,13 @@ function deserializePrivateFieldExpression(pos) {
|
|
|
578
593
|
type: "MemberExpression",
|
|
579
594
|
object: null,
|
|
580
595
|
property: null,
|
|
581
|
-
optional: deserializeBool(pos +
|
|
596
|
+
optional: deserializeBool(pos + 12),
|
|
582
597
|
computed: null,
|
|
583
598
|
start: deserializeU32(pos),
|
|
584
599
|
end: deserializeU32(pos + 4),
|
|
585
600
|
};
|
|
586
|
-
node.object = deserializeExpression(pos +
|
|
587
|
-
node.property = deserializePrivateIdentifier(pos +
|
|
601
|
+
node.object = deserializeExpression(pos + 16);
|
|
602
|
+
node.property = deserializePrivateIdentifier(pos + 32);
|
|
588
603
|
node.computed = false;
|
|
589
604
|
return node;
|
|
590
605
|
}
|
|
@@ -595,13 +610,13 @@ function deserializeCallExpression(pos) {
|
|
|
595
610
|
callee: null,
|
|
596
611
|
typeArguments: null,
|
|
597
612
|
arguments: null,
|
|
598
|
-
optional: deserializeBool(pos +
|
|
613
|
+
optional: deserializeBool(pos + 12),
|
|
599
614
|
start: deserializeU32(pos),
|
|
600
615
|
end: deserializeU32(pos + 4),
|
|
601
616
|
};
|
|
602
|
-
node.callee = deserializeExpression(pos +
|
|
603
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
604
|
-
node.arguments = deserializeVecArgument(pos +
|
|
617
|
+
node.callee = deserializeExpression(pos + 16);
|
|
618
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
619
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
605
620
|
return node;
|
|
606
621
|
}
|
|
607
622
|
|
|
@@ -614,9 +629,9 @@ function deserializeNewExpression(pos) {
|
|
|
614
629
|
start: deserializeU32(pos),
|
|
615
630
|
end: deserializeU32(pos + 4),
|
|
616
631
|
};
|
|
617
|
-
node.callee = deserializeExpression(pos +
|
|
618
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
619
|
-
node.arguments = deserializeVecArgument(pos +
|
|
632
|
+
node.callee = deserializeExpression(pos + 16);
|
|
633
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
634
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
620
635
|
return node;
|
|
621
636
|
}
|
|
622
637
|
|
|
@@ -628,8 +643,8 @@ function deserializeMetaProperty(pos) {
|
|
|
628
643
|
start: deserializeU32(pos),
|
|
629
644
|
end: deserializeU32(pos + 4),
|
|
630
645
|
};
|
|
631
|
-
node.meta = deserializeIdentifierName(pos +
|
|
632
|
-
node.property = deserializeIdentifierName(pos +
|
|
646
|
+
node.meta = deserializeIdentifierName(pos + 16);
|
|
647
|
+
node.property = deserializeIdentifierName(pos + 48);
|
|
633
648
|
return node;
|
|
634
649
|
}
|
|
635
650
|
|
|
@@ -640,7 +655,7 @@ function deserializeSpreadElement(pos) {
|
|
|
640
655
|
start: deserializeU32(pos),
|
|
641
656
|
end: deserializeU32(pos + 4),
|
|
642
657
|
};
|
|
643
|
-
node.argument = deserializeExpression(pos +
|
|
658
|
+
node.argument = deserializeExpression(pos + 16);
|
|
644
659
|
return node;
|
|
645
660
|
}
|
|
646
661
|
|
|
@@ -742,26 +757,26 @@ function deserializeArgument(pos) {
|
|
|
742
757
|
function deserializeUpdateExpression(pos) {
|
|
743
758
|
let node = {
|
|
744
759
|
type: "UpdateExpression",
|
|
745
|
-
operator: deserializeUpdateOperator(pos +
|
|
746
|
-
prefix: deserializeBool(pos +
|
|
760
|
+
operator: deserializeUpdateOperator(pos + 12),
|
|
761
|
+
prefix: deserializeBool(pos + 13),
|
|
747
762
|
argument: null,
|
|
748
763
|
start: deserializeU32(pos),
|
|
749
764
|
end: deserializeU32(pos + 4),
|
|
750
765
|
};
|
|
751
|
-
node.argument = deserializeSimpleAssignmentTarget(pos +
|
|
766
|
+
node.argument = deserializeSimpleAssignmentTarget(pos + 16);
|
|
752
767
|
return node;
|
|
753
768
|
}
|
|
754
769
|
|
|
755
770
|
function deserializeUnaryExpression(pos) {
|
|
756
771
|
let node = {
|
|
757
772
|
type: "UnaryExpression",
|
|
758
|
-
operator: deserializeUnaryOperator(pos +
|
|
773
|
+
operator: deserializeUnaryOperator(pos + 12),
|
|
759
774
|
argument: null,
|
|
760
775
|
prefix: null,
|
|
761
776
|
start: deserializeU32(pos),
|
|
762
777
|
end: deserializeU32(pos + 4),
|
|
763
778
|
};
|
|
764
|
-
node.argument = deserializeExpression(pos +
|
|
779
|
+
node.argument = deserializeExpression(pos + 16);
|
|
765
780
|
node.prefix = true;
|
|
766
781
|
return node;
|
|
767
782
|
}
|
|
@@ -770,13 +785,13 @@ function deserializeBinaryExpression(pos) {
|
|
|
770
785
|
let node = {
|
|
771
786
|
type: "BinaryExpression",
|
|
772
787
|
left: null,
|
|
773
|
-
operator: deserializeBinaryOperator(pos +
|
|
788
|
+
operator: deserializeBinaryOperator(pos + 12),
|
|
774
789
|
right: null,
|
|
775
790
|
start: deserializeU32(pos),
|
|
776
791
|
end: deserializeU32(pos + 4),
|
|
777
792
|
};
|
|
778
|
-
node.left = deserializeExpression(pos +
|
|
779
|
-
node.right = deserializeExpression(pos +
|
|
793
|
+
node.left = deserializeExpression(pos + 16);
|
|
794
|
+
node.right = deserializeExpression(pos + 32);
|
|
780
795
|
return node;
|
|
781
796
|
}
|
|
782
797
|
|
|
@@ -789,9 +804,9 @@ function deserializePrivateInExpression(pos) {
|
|
|
789
804
|
start: deserializeU32(pos),
|
|
790
805
|
end: deserializeU32(pos + 4),
|
|
791
806
|
};
|
|
792
|
-
node.left = deserializePrivateIdentifier(pos +
|
|
807
|
+
node.left = deserializePrivateIdentifier(pos + 16);
|
|
793
808
|
node.operator = "in";
|
|
794
|
-
node.right = deserializeExpression(pos +
|
|
809
|
+
node.right = deserializeExpression(pos + 48);
|
|
795
810
|
return node;
|
|
796
811
|
}
|
|
797
812
|
|
|
@@ -799,13 +814,13 @@ function deserializeLogicalExpression(pos) {
|
|
|
799
814
|
let node = {
|
|
800
815
|
type: "LogicalExpression",
|
|
801
816
|
left: null,
|
|
802
|
-
operator: deserializeLogicalOperator(pos +
|
|
817
|
+
operator: deserializeLogicalOperator(pos + 12),
|
|
803
818
|
right: null,
|
|
804
819
|
start: deserializeU32(pos),
|
|
805
820
|
end: deserializeU32(pos + 4),
|
|
806
821
|
};
|
|
807
|
-
node.left = deserializeExpression(pos +
|
|
808
|
-
node.right = deserializeExpression(pos +
|
|
822
|
+
node.left = deserializeExpression(pos + 16);
|
|
823
|
+
node.right = deserializeExpression(pos + 32);
|
|
809
824
|
return node;
|
|
810
825
|
}
|
|
811
826
|
|
|
@@ -818,23 +833,23 @@ function deserializeConditionalExpression(pos) {
|
|
|
818
833
|
start: deserializeU32(pos),
|
|
819
834
|
end: deserializeU32(pos + 4),
|
|
820
835
|
};
|
|
821
|
-
node.test = deserializeExpression(pos +
|
|
822
|
-
node.consequent = deserializeExpression(pos +
|
|
823
|
-
node.alternate = deserializeExpression(pos +
|
|
836
|
+
node.test = deserializeExpression(pos + 16);
|
|
837
|
+
node.consequent = deserializeExpression(pos + 32);
|
|
838
|
+
node.alternate = deserializeExpression(pos + 48);
|
|
824
839
|
return node;
|
|
825
840
|
}
|
|
826
841
|
|
|
827
842
|
function deserializeAssignmentExpression(pos) {
|
|
828
843
|
let node = {
|
|
829
844
|
type: "AssignmentExpression",
|
|
830
|
-
operator: deserializeAssignmentOperator(pos +
|
|
845
|
+
operator: deserializeAssignmentOperator(pos + 12),
|
|
831
846
|
left: null,
|
|
832
847
|
right: null,
|
|
833
848
|
start: deserializeU32(pos),
|
|
834
849
|
end: deserializeU32(pos + 4),
|
|
835
850
|
};
|
|
836
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
837
|
-
node.right = deserializeExpression(pos +
|
|
851
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
852
|
+
node.right = deserializeExpression(pos + 32);
|
|
838
853
|
return node;
|
|
839
854
|
}
|
|
840
855
|
|
|
@@ -898,8 +913,8 @@ function deserializeArrayAssignmentTarget(pos) {
|
|
|
898
913
|
start: deserializeU32(pos),
|
|
899
914
|
end: deserializeU32(pos + 4),
|
|
900
915
|
},
|
|
901
|
-
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos +
|
|
902
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
916
|
+
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos + 16),
|
|
917
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
903
918
|
rest !== null && elements.push(rest);
|
|
904
919
|
node.decorators = [];
|
|
905
920
|
node.elements = elements;
|
|
@@ -917,8 +932,8 @@ function deserializeObjectAssignmentTarget(pos) {
|
|
|
917
932
|
start: deserializeU32(pos),
|
|
918
933
|
end: deserializeU32(pos + 4),
|
|
919
934
|
},
|
|
920
|
-
properties = deserializeVecAssignmentTargetProperty(pos +
|
|
921
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
935
|
+
properties = deserializeVecAssignmentTargetProperty(pos + 16),
|
|
936
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
922
937
|
rest !== null && properties.push(rest);
|
|
923
938
|
node.decorators = [];
|
|
924
939
|
node.properties = properties;
|
|
@@ -938,7 +953,7 @@ function deserializeAssignmentTargetRest(pos) {
|
|
|
938
953
|
end: deserializeU32(pos + 4),
|
|
939
954
|
};
|
|
940
955
|
node.decorators = [];
|
|
941
|
-
node.argument = deserializeAssignmentTarget(pos +
|
|
956
|
+
node.argument = deserializeAssignmentTarget(pos + 16);
|
|
942
957
|
node.optional = false;
|
|
943
958
|
return node;
|
|
944
959
|
}
|
|
@@ -984,8 +999,8 @@ function deserializeAssignmentTargetWithDefault(pos) {
|
|
|
984
999
|
end: deserializeU32(pos + 4),
|
|
985
1000
|
};
|
|
986
1001
|
node.decorators = [];
|
|
987
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
988
|
-
node.right = deserializeExpression(pos +
|
|
1002
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
1003
|
+
node.right = deserializeExpression(pos + 32);
|
|
989
1004
|
node.optional = false;
|
|
990
1005
|
return node;
|
|
991
1006
|
}
|
|
@@ -1016,7 +1031,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1016
1031
|
start,
|
|
1017
1032
|
end,
|
|
1018
1033
|
},
|
|
1019
|
-
key = deserializeIdentifierReference(pos +
|
|
1034
|
+
key = deserializeIdentifierReference(pos + 16),
|
|
1020
1035
|
value = {
|
|
1021
1036
|
type: "Identifier",
|
|
1022
1037
|
decorators: [],
|
|
@@ -1026,7 +1041,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1026
1041
|
start: key.start,
|
|
1027
1042
|
end: key.end,
|
|
1028
1043
|
},
|
|
1029
|
-
init = deserializeOptionExpression(pos +
|
|
1044
|
+
init = deserializeOptionExpression(pos + 48);
|
|
1030
1045
|
init !== null &&
|
|
1031
1046
|
(value = {
|
|
1032
1047
|
type: "AssignmentPattern",
|
|
@@ -1056,14 +1071,14 @@ function deserializeAssignmentTargetPropertyProperty(pos) {
|
|
|
1056
1071
|
value: null,
|
|
1057
1072
|
method: null,
|
|
1058
1073
|
shorthand: null,
|
|
1059
|
-
computed: deserializeBool(pos +
|
|
1074
|
+
computed: deserializeBool(pos + 12),
|
|
1060
1075
|
optional: null,
|
|
1061
1076
|
start: deserializeU32(pos),
|
|
1062
1077
|
end: deserializeU32(pos + 4),
|
|
1063
1078
|
};
|
|
1064
1079
|
node.kind = "init";
|
|
1065
|
-
node.key = deserializePropertyKey(pos +
|
|
1066
|
-
node.value = deserializeAssignmentTargetMaybeDefault(pos +
|
|
1080
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1081
|
+
node.value = deserializeAssignmentTargetMaybeDefault(pos + 32);
|
|
1067
1082
|
node.method = false;
|
|
1068
1083
|
node.shorthand = false;
|
|
1069
1084
|
node.optional = false;
|
|
@@ -1077,7 +1092,7 @@ function deserializeSequenceExpression(pos) {
|
|
|
1077
1092
|
start: deserializeU32(pos),
|
|
1078
1093
|
end: deserializeU32(pos + 4),
|
|
1079
1094
|
};
|
|
1080
|
-
node.expressions = deserializeVecExpression(pos +
|
|
1095
|
+
node.expressions = deserializeVecExpression(pos + 16);
|
|
1081
1096
|
return node;
|
|
1082
1097
|
}
|
|
1083
1098
|
|
|
@@ -1096,7 +1111,7 @@ function deserializeAwaitExpression(pos) {
|
|
|
1096
1111
|
start: deserializeU32(pos),
|
|
1097
1112
|
end: deserializeU32(pos + 4),
|
|
1098
1113
|
};
|
|
1099
|
-
node.argument = deserializeExpression(pos +
|
|
1114
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1100
1115
|
return node;
|
|
1101
1116
|
}
|
|
1102
1117
|
|
|
@@ -1107,7 +1122,7 @@ function deserializeChainExpression(pos) {
|
|
|
1107
1122
|
start: deserializeU32(pos),
|
|
1108
1123
|
end: deserializeU32(pos + 4),
|
|
1109
1124
|
};
|
|
1110
|
-
node.expression = deserializeChainElement(pos +
|
|
1125
|
+
node.expression = deserializeChainElement(pos + 16);
|
|
1111
1126
|
return node;
|
|
1112
1127
|
}
|
|
1113
1128
|
|
|
@@ -1136,7 +1151,7 @@ function deserializeParenthesizedExpression(pos) {
|
|
|
1136
1151
|
start: deserializeU32(pos),
|
|
1137
1152
|
end: deserializeU32(pos + 4),
|
|
1138
1153
|
};
|
|
1139
|
-
node.expression = deserializeExpression(pos +
|
|
1154
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1140
1155
|
return node;
|
|
1141
1156
|
}
|
|
1142
1157
|
|
|
@@ -1217,18 +1232,18 @@ function deserializeDirective(pos) {
|
|
|
1217
1232
|
let node = {
|
|
1218
1233
|
type: "ExpressionStatement",
|
|
1219
1234
|
expression: null,
|
|
1220
|
-
directive: deserializeStr(pos +
|
|
1235
|
+
directive: deserializeStr(pos + 64),
|
|
1221
1236
|
start: deserializeU32(pos),
|
|
1222
1237
|
end: deserializeU32(pos + 4),
|
|
1223
1238
|
};
|
|
1224
|
-
node.expression = deserializeStringLiteral(pos +
|
|
1239
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
1225
1240
|
return node;
|
|
1226
1241
|
}
|
|
1227
1242
|
|
|
1228
1243
|
function deserializeHashbang(pos) {
|
|
1229
1244
|
return {
|
|
1230
1245
|
type: "Hashbang",
|
|
1231
|
-
value: deserializeStr(pos +
|
|
1246
|
+
value: deserializeStr(pos + 16),
|
|
1232
1247
|
start: deserializeU32(pos),
|
|
1233
1248
|
end: deserializeU32(pos + 4),
|
|
1234
1249
|
};
|
|
@@ -1241,7 +1256,7 @@ function deserializeBlockStatement(pos) {
|
|
|
1241
1256
|
start: deserializeU32(pos),
|
|
1242
1257
|
end: deserializeU32(pos + 4),
|
|
1243
1258
|
};
|
|
1244
|
-
node.body = deserializeVecStatement(pos +
|
|
1259
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
1245
1260
|
return node;
|
|
1246
1261
|
}
|
|
1247
1262
|
|
|
@@ -1273,13 +1288,13 @@ function deserializeDeclaration(pos) {
|
|
|
1273
1288
|
function deserializeVariableDeclaration(pos) {
|
|
1274
1289
|
let node = {
|
|
1275
1290
|
type: "VariableDeclaration",
|
|
1276
|
-
kind: deserializeVariableDeclarationKind(pos +
|
|
1291
|
+
kind: deserializeVariableDeclarationKind(pos + 12),
|
|
1277
1292
|
declarations: null,
|
|
1278
|
-
declare: deserializeBool(pos +
|
|
1293
|
+
declare: deserializeBool(pos + 13),
|
|
1279
1294
|
start: deserializeU32(pos),
|
|
1280
1295
|
end: deserializeU32(pos + 4),
|
|
1281
1296
|
};
|
|
1282
|
-
node.declarations = deserializeVecVariableDeclarator(pos +
|
|
1297
|
+
node.declarations = deserializeVecVariableDeclarator(pos + 16);
|
|
1283
1298
|
return node;
|
|
1284
1299
|
}
|
|
1285
1300
|
|
|
@@ -1301,23 +1316,25 @@ function deserializeVariableDeclarationKind(pos) {
|
|
|
1301
1316
|
}
|
|
1302
1317
|
|
|
1303
1318
|
function deserializeVariableDeclarator(pos) {
|
|
1304
|
-
let
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1319
|
+
let node = {
|
|
1320
|
+
type: "VariableDeclarator",
|
|
1321
|
+
id: null,
|
|
1322
|
+
init: null,
|
|
1323
|
+
definite: deserializeBool(pos + 13),
|
|
1324
|
+
start: deserializeU32(pos),
|
|
1325
|
+
end: deserializeU32(pos + 4),
|
|
1326
|
+
},
|
|
1327
|
+
pattern = deserializeBindingPattern(pos + 16);
|
|
1313
1328
|
{
|
|
1314
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1329
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1330
|
+
if (typeAnnotation !== null) {
|
|
1331
|
+
pattern.typeAnnotation = typeAnnotation;
|
|
1332
|
+
pattern.end = typeAnnotation.end;
|
|
1333
|
+
}
|
|
1318
1334
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1335
|
+
node.id = pattern;
|
|
1336
|
+
node.init = deserializeOptionExpression(pos + 40);
|
|
1337
|
+
return node;
|
|
1321
1338
|
}
|
|
1322
1339
|
|
|
1323
1340
|
function deserializeEmptyStatement(pos) {
|
|
@@ -1336,7 +1353,7 @@ function deserializeExpressionStatement(pos) {
|
|
|
1336
1353
|
start: deserializeU32(pos),
|
|
1337
1354
|
end: deserializeU32(pos + 4),
|
|
1338
1355
|
};
|
|
1339
|
-
node.expression = deserializeExpression(pos +
|
|
1356
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1340
1357
|
return node;
|
|
1341
1358
|
}
|
|
1342
1359
|
|
|
@@ -1349,9 +1366,9 @@ function deserializeIfStatement(pos) {
|
|
|
1349
1366
|
start: deserializeU32(pos),
|
|
1350
1367
|
end: deserializeU32(pos + 4),
|
|
1351
1368
|
};
|
|
1352
|
-
node.test = deserializeExpression(pos +
|
|
1353
|
-
node.consequent = deserializeStatement(pos +
|
|
1354
|
-
node.alternate = deserializeOptionStatement(pos +
|
|
1369
|
+
node.test = deserializeExpression(pos + 16);
|
|
1370
|
+
node.consequent = deserializeStatement(pos + 32);
|
|
1371
|
+
node.alternate = deserializeOptionStatement(pos + 48);
|
|
1355
1372
|
return node;
|
|
1356
1373
|
}
|
|
1357
1374
|
|
|
@@ -1363,8 +1380,8 @@ function deserializeDoWhileStatement(pos) {
|
|
|
1363
1380
|
start: deserializeU32(pos),
|
|
1364
1381
|
end: deserializeU32(pos + 4),
|
|
1365
1382
|
};
|
|
1366
|
-
node.body = deserializeStatement(pos +
|
|
1367
|
-
node.test = deserializeExpression(pos +
|
|
1383
|
+
node.body = deserializeStatement(pos + 16);
|
|
1384
|
+
node.test = deserializeExpression(pos + 32);
|
|
1368
1385
|
return node;
|
|
1369
1386
|
}
|
|
1370
1387
|
|
|
@@ -1376,8 +1393,8 @@ function deserializeWhileStatement(pos) {
|
|
|
1376
1393
|
start: deserializeU32(pos),
|
|
1377
1394
|
end: deserializeU32(pos + 4),
|
|
1378
1395
|
};
|
|
1379
|
-
node.test = deserializeExpression(pos +
|
|
1380
|
-
node.body = deserializeStatement(pos +
|
|
1396
|
+
node.test = deserializeExpression(pos + 16);
|
|
1397
|
+
node.body = deserializeStatement(pos + 32);
|
|
1381
1398
|
return node;
|
|
1382
1399
|
}
|
|
1383
1400
|
|
|
@@ -1391,10 +1408,10 @@ function deserializeForStatement(pos) {
|
|
|
1391
1408
|
start: deserializeU32(pos),
|
|
1392
1409
|
end: deserializeU32(pos + 4),
|
|
1393
1410
|
};
|
|
1394
|
-
node.init = deserializeOptionForStatementInit(pos +
|
|
1395
|
-
node.test = deserializeOptionExpression(pos +
|
|
1396
|
-
node.update = deserializeOptionExpression(pos +
|
|
1397
|
-
node.body = deserializeStatement(pos +
|
|
1411
|
+
node.init = deserializeOptionForStatementInit(pos + 16);
|
|
1412
|
+
node.test = deserializeOptionExpression(pos + 32);
|
|
1413
|
+
node.update = deserializeOptionExpression(pos + 48);
|
|
1414
|
+
node.body = deserializeStatement(pos + 64);
|
|
1398
1415
|
return node;
|
|
1399
1416
|
}
|
|
1400
1417
|
|
|
@@ -1502,9 +1519,9 @@ function deserializeForInStatement(pos) {
|
|
|
1502
1519
|
start: deserializeU32(pos),
|
|
1503
1520
|
end: deserializeU32(pos + 4),
|
|
1504
1521
|
};
|
|
1505
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1506
|
-
node.right = deserializeExpression(pos +
|
|
1507
|
-
node.body = deserializeStatement(pos +
|
|
1522
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1523
|
+
node.right = deserializeExpression(pos + 32);
|
|
1524
|
+
node.body = deserializeStatement(pos + 48);
|
|
1508
1525
|
return node;
|
|
1509
1526
|
}
|
|
1510
1527
|
|
|
@@ -1547,9 +1564,9 @@ function deserializeForOfStatement(pos) {
|
|
|
1547
1564
|
start: deserializeU32(pos),
|
|
1548
1565
|
end: deserializeU32(pos + 4),
|
|
1549
1566
|
};
|
|
1550
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1551
|
-
node.right = deserializeExpression(pos +
|
|
1552
|
-
node.body = deserializeStatement(pos +
|
|
1567
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1568
|
+
node.right = deserializeExpression(pos + 32);
|
|
1569
|
+
node.body = deserializeStatement(pos + 48);
|
|
1553
1570
|
return node;
|
|
1554
1571
|
}
|
|
1555
1572
|
|
|
@@ -1560,7 +1577,7 @@ function deserializeContinueStatement(pos) {
|
|
|
1560
1577
|
start: deserializeU32(pos),
|
|
1561
1578
|
end: deserializeU32(pos + 4),
|
|
1562
1579
|
};
|
|
1563
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1580
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1564
1581
|
return node;
|
|
1565
1582
|
}
|
|
1566
1583
|
|
|
@@ -1571,7 +1588,7 @@ function deserializeBreakStatement(pos) {
|
|
|
1571
1588
|
start: deserializeU32(pos),
|
|
1572
1589
|
end: deserializeU32(pos + 4),
|
|
1573
1590
|
};
|
|
1574
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1591
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1575
1592
|
return node;
|
|
1576
1593
|
}
|
|
1577
1594
|
|
|
@@ -1582,7 +1599,7 @@ function deserializeReturnStatement(pos) {
|
|
|
1582
1599
|
start: deserializeU32(pos),
|
|
1583
1600
|
end: deserializeU32(pos + 4),
|
|
1584
1601
|
};
|
|
1585
|
-
node.argument = deserializeOptionExpression(pos +
|
|
1602
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
1586
1603
|
return node;
|
|
1587
1604
|
}
|
|
1588
1605
|
|
|
@@ -1594,8 +1611,8 @@ function deserializeWithStatement(pos) {
|
|
|
1594
1611
|
start: deserializeU32(pos),
|
|
1595
1612
|
end: deserializeU32(pos + 4),
|
|
1596
1613
|
};
|
|
1597
|
-
node.object = deserializeExpression(pos +
|
|
1598
|
-
node.body = deserializeStatement(pos +
|
|
1614
|
+
node.object = deserializeExpression(pos + 16);
|
|
1615
|
+
node.body = deserializeStatement(pos + 32);
|
|
1599
1616
|
return node;
|
|
1600
1617
|
}
|
|
1601
1618
|
|
|
@@ -1607,8 +1624,8 @@ function deserializeSwitchStatement(pos) {
|
|
|
1607
1624
|
start: deserializeU32(pos),
|
|
1608
1625
|
end: deserializeU32(pos + 4),
|
|
1609
1626
|
};
|
|
1610
|
-
node.discriminant = deserializeExpression(pos +
|
|
1611
|
-
node.cases = deserializeVecSwitchCase(pos +
|
|
1627
|
+
node.discriminant = deserializeExpression(pos + 16);
|
|
1628
|
+
node.cases = deserializeVecSwitchCase(pos + 32);
|
|
1612
1629
|
return node;
|
|
1613
1630
|
}
|
|
1614
1631
|
|
|
@@ -1620,8 +1637,8 @@ function deserializeSwitchCase(pos) {
|
|
|
1620
1637
|
start: deserializeU32(pos),
|
|
1621
1638
|
end: deserializeU32(pos + 4),
|
|
1622
1639
|
};
|
|
1623
|
-
node.test = deserializeOptionExpression(pos +
|
|
1624
|
-
node.consequent = deserializeVecStatement(pos +
|
|
1640
|
+
node.test = deserializeOptionExpression(pos + 16);
|
|
1641
|
+
node.consequent = deserializeVecStatement(pos + 32);
|
|
1625
1642
|
return node;
|
|
1626
1643
|
}
|
|
1627
1644
|
|
|
@@ -1633,8 +1650,8 @@ function deserializeLabeledStatement(pos) {
|
|
|
1633
1650
|
start: deserializeU32(pos),
|
|
1634
1651
|
end: deserializeU32(pos + 4),
|
|
1635
1652
|
};
|
|
1636
|
-
node.label = deserializeLabelIdentifier(pos +
|
|
1637
|
-
node.body = deserializeStatement(pos +
|
|
1653
|
+
node.label = deserializeLabelIdentifier(pos + 16);
|
|
1654
|
+
node.body = deserializeStatement(pos + 48);
|
|
1638
1655
|
return node;
|
|
1639
1656
|
}
|
|
1640
1657
|
|
|
@@ -1645,7 +1662,7 @@ function deserializeThrowStatement(pos) {
|
|
|
1645
1662
|
start: deserializeU32(pos),
|
|
1646
1663
|
end: deserializeU32(pos + 4),
|
|
1647
1664
|
};
|
|
1648
|
-
node.argument = deserializeExpression(pos +
|
|
1665
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1649
1666
|
return node;
|
|
1650
1667
|
}
|
|
1651
1668
|
|
|
@@ -1658,9 +1675,9 @@ function deserializeTryStatement(pos) {
|
|
|
1658
1675
|
start: deserializeU32(pos),
|
|
1659
1676
|
end: deserializeU32(pos + 4),
|
|
1660
1677
|
};
|
|
1661
|
-
node.block = deserializeBoxBlockStatement(pos +
|
|
1662
|
-
node.handler = deserializeOptionBoxCatchClause(pos +
|
|
1663
|
-
node.finalizer = deserializeOptionBoxBlockStatement(pos +
|
|
1678
|
+
node.block = deserializeBoxBlockStatement(pos + 16);
|
|
1679
|
+
node.handler = deserializeOptionBoxCatchClause(pos + 24);
|
|
1680
|
+
node.finalizer = deserializeOptionBoxBlockStatement(pos + 32);
|
|
1664
1681
|
return node;
|
|
1665
1682
|
}
|
|
1666
1683
|
|
|
@@ -1672,15 +1689,15 @@ function deserializeCatchClause(pos) {
|
|
|
1672
1689
|
start: deserializeU32(pos),
|
|
1673
1690
|
end: deserializeU32(pos + 4),
|
|
1674
1691
|
};
|
|
1675
|
-
node.param = deserializeOptionCatchParameter(pos +
|
|
1676
|
-
node.body = deserializeBoxBlockStatement(pos +
|
|
1692
|
+
node.param = deserializeOptionCatchParameter(pos + 16);
|
|
1693
|
+
node.body = deserializeBoxBlockStatement(pos + 56);
|
|
1677
1694
|
return node;
|
|
1678
1695
|
}
|
|
1679
1696
|
|
|
1680
1697
|
function deserializeCatchParameter(pos) {
|
|
1681
|
-
let pattern = deserializeBindingPattern(pos +
|
|
1698
|
+
let pattern = deserializeBindingPattern(pos + 16);
|
|
1682
1699
|
{
|
|
1683
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1700
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1684
1701
|
pattern.typeAnnotation = typeAnnotation;
|
|
1685
1702
|
typeAnnotation !== null && (pattern.end = typeAnnotation.end);
|
|
1686
1703
|
}
|
|
@@ -1722,8 +1739,8 @@ function deserializeAssignmentPattern(pos) {
|
|
|
1722
1739
|
end: deserializeU32(pos + 4),
|
|
1723
1740
|
};
|
|
1724
1741
|
node.decorators = [];
|
|
1725
|
-
node.left = deserializeBindingPattern(pos +
|
|
1726
|
-
node.right = deserializeExpression(pos +
|
|
1742
|
+
node.left = deserializeBindingPattern(pos + 16);
|
|
1743
|
+
node.right = deserializeExpression(pos + 32);
|
|
1727
1744
|
node.optional = false;
|
|
1728
1745
|
return node;
|
|
1729
1746
|
}
|
|
@@ -1738,8 +1755,8 @@ function deserializeObjectPattern(pos) {
|
|
|
1738
1755
|
start: deserializeU32(pos),
|
|
1739
1756
|
end: deserializeU32(pos + 4),
|
|
1740
1757
|
},
|
|
1741
|
-
properties = deserializeVecBindingProperty(pos +
|
|
1742
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1758
|
+
properties = deserializeVecBindingProperty(pos + 16),
|
|
1759
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1743
1760
|
rest !== null && properties.push(rest);
|
|
1744
1761
|
node.decorators = [];
|
|
1745
1762
|
node.properties = properties;
|
|
@@ -1754,15 +1771,15 @@ function deserializeBindingProperty(pos) {
|
|
|
1754
1771
|
key: null,
|
|
1755
1772
|
value: null,
|
|
1756
1773
|
method: null,
|
|
1757
|
-
shorthand: deserializeBool(pos +
|
|
1758
|
-
computed: deserializeBool(pos +
|
|
1774
|
+
shorthand: deserializeBool(pos + 12),
|
|
1775
|
+
computed: deserializeBool(pos + 13),
|
|
1759
1776
|
optional: null,
|
|
1760
1777
|
start: deserializeU32(pos),
|
|
1761
1778
|
end: deserializeU32(pos + 4),
|
|
1762
1779
|
};
|
|
1763
1780
|
node.kind = "init";
|
|
1764
|
-
node.key = deserializePropertyKey(pos +
|
|
1765
|
-
node.value = deserializeBindingPattern(pos +
|
|
1781
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1782
|
+
node.value = deserializeBindingPattern(pos + 32);
|
|
1766
1783
|
node.method = false;
|
|
1767
1784
|
node.optional = false;
|
|
1768
1785
|
return node;
|
|
@@ -1778,8 +1795,8 @@ function deserializeArrayPattern(pos) {
|
|
|
1778
1795
|
start: deserializeU32(pos),
|
|
1779
1796
|
end: deserializeU32(pos + 4),
|
|
1780
1797
|
},
|
|
1781
|
-
elements = deserializeVecOptionBindingPattern(pos +
|
|
1782
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1798
|
+
elements = deserializeVecOptionBindingPattern(pos + 16),
|
|
1799
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1783
1800
|
rest !== null && elements.push(rest);
|
|
1784
1801
|
node.decorators = [];
|
|
1785
1802
|
node.elements = elements;
|
|
@@ -1799,7 +1816,7 @@ function deserializeBindingRestElement(pos) {
|
|
|
1799
1816
|
end: deserializeU32(pos + 4),
|
|
1800
1817
|
};
|
|
1801
1818
|
node.decorators = [];
|
|
1802
|
-
node.argument = deserializeBindingPattern(pos +
|
|
1819
|
+
node.argument = deserializeBindingPattern(pos + 16);
|
|
1803
1820
|
node.optional = false;
|
|
1804
1821
|
return node;
|
|
1805
1822
|
}
|
|
@@ -1819,16 +1836,16 @@ function deserializeFunction(pos) {
|
|
|
1819
1836
|
start: deserializeU32(pos),
|
|
1820
1837
|
end: deserializeU32(pos + 4),
|
|
1821
1838
|
},
|
|
1822
|
-
params = deserializeBoxFormalParameters(pos +
|
|
1839
|
+
params = deserializeBoxFormalParameters(pos + 64);
|
|
1823
1840
|
{
|
|
1824
|
-
let thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
1841
|
+
let thisParam = deserializeOptionBoxTSThisParameter(pos + 56);
|
|
1825
1842
|
thisParam !== null && params.unshift(thisParam);
|
|
1826
1843
|
}
|
|
1827
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
1828
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
1844
|
+
node.id = deserializeOptionBindingIdentifier(pos + 16);
|
|
1845
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
1829
1846
|
node.params = params;
|
|
1830
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1831
|
-
node.body = deserializeOptionBoxFunctionBody(pos +
|
|
1847
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
1848
|
+
node.body = deserializeOptionBoxFunctionBody(pos + 80);
|
|
1832
1849
|
node.expression = false;
|
|
1833
1850
|
return node;
|
|
1834
1851
|
}
|
|
@@ -1849,9 +1866,9 @@ function deserializeFunctionType(pos) {
|
|
|
1849
1866
|
}
|
|
1850
1867
|
|
|
1851
1868
|
function deserializeFormalParameters(pos) {
|
|
1852
|
-
let params = deserializeVecFormalParameter(pos +
|
|
1853
|
-
if (uint32[(pos +
|
|
1854
|
-
pos = uint32[(pos +
|
|
1869
|
+
let params = deserializeVecFormalParameter(pos + 16);
|
|
1870
|
+
if (uint32[(pos + 40) >> 2] !== 0 && uint32[(pos + 44) >> 2] !== 0) {
|
|
1871
|
+
pos = uint32[(pos + 40) >> 2];
|
|
1855
1872
|
let end,
|
|
1856
1873
|
rest = {
|
|
1857
1874
|
type: "RestElement",
|
|
@@ -1860,11 +1877,11 @@ function deserializeFormalParameters(pos) {
|
|
|
1860
1877
|
optional: false,
|
|
1861
1878
|
typeAnnotation: null,
|
|
1862
1879
|
value: null,
|
|
1863
|
-
start: deserializeU32(pos +
|
|
1864
|
-
end: (end = deserializeU32(pos +
|
|
1880
|
+
start: deserializeU32(pos + 40),
|
|
1881
|
+
end: (end = deserializeU32(pos + 44)),
|
|
1865
1882
|
};
|
|
1866
|
-
rest.argument = deserializeBindingPattern(pos +
|
|
1867
|
-
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1883
|
+
rest.argument = deserializeBindingPattern(pos + 56);
|
|
1884
|
+
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
1868
1885
|
if (rest.typeAnnotation !== null) {
|
|
1869
1886
|
end = rest.typeAnnotation.end;
|
|
1870
1887
|
rest.end = end;
|
|
@@ -1876,13 +1893,13 @@ function deserializeFormalParameters(pos) {
|
|
|
1876
1893
|
|
|
1877
1894
|
function deserializeFormalParameter(pos) {
|
|
1878
1895
|
let param,
|
|
1879
|
-
hasInitializer = uint32[(pos +
|
|
1896
|
+
hasInitializer = uint32[(pos + 64) >> 2] !== 0 && uint32[(pos + 68) >> 2] !== 0;
|
|
1880
1897
|
{
|
|
1881
|
-
let accessibility = deserializeOptionTSAccessibility(pos +
|
|
1882
|
-
readonly = deserializeBool(pos +
|
|
1883
|
-
override = deserializeBool(pos +
|
|
1898
|
+
let accessibility = deserializeOptionTSAccessibility(pos + 13),
|
|
1899
|
+
readonly = deserializeBool(pos + 14),
|
|
1900
|
+
override = deserializeBool(pos + 15);
|
|
1884
1901
|
if (accessibility === null && !readonly && !override) {
|
|
1885
|
-
let optional = deserializeBool(pos +
|
|
1902
|
+
let optional = deserializeBool(pos + 12);
|
|
1886
1903
|
if (hasInitializer) {
|
|
1887
1904
|
param = {
|
|
1888
1905
|
type: "AssignmentPattern",
|
|
@@ -1894,19 +1911,19 @@ function deserializeFormalParameter(pos) {
|
|
|
1894
1911
|
start: deserializeU32(pos),
|
|
1895
1912
|
end: deserializeU32(pos + 4),
|
|
1896
1913
|
};
|
|
1897
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1898
|
-
param.left = deserializeBindingPattern(pos +
|
|
1914
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1915
|
+
param.left = deserializeBindingPattern(pos + 40);
|
|
1899
1916
|
param.left.decorators = [];
|
|
1900
1917
|
param.left.optional = false;
|
|
1901
|
-
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1918
|
+
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1902
1919
|
param.left.typeAnnotation = leftTypeAnnotation;
|
|
1903
1920
|
leftTypeAnnotation !== null && (param.left.end = leftTypeAnnotation.end);
|
|
1904
|
-
param.right = deserializeOptionBoxExpression(pos +
|
|
1921
|
+
param.right = deserializeOptionBoxExpression(pos + 64);
|
|
1905
1922
|
} else {
|
|
1906
|
-
param = deserializeBindingPattern(pos +
|
|
1907
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1923
|
+
param = deserializeBindingPattern(pos + 40);
|
|
1924
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1908
1925
|
param.optional = optional;
|
|
1909
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1926
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1910
1927
|
param.typeAnnotation = typeAnnotation;
|
|
1911
1928
|
typeAnnotation === null
|
|
1912
1929
|
? optional && (param.end = deserializeU32(pos + 4))
|
|
@@ -1924,10 +1941,10 @@ function deserializeFormalParameter(pos) {
|
|
|
1924
1941
|
start: deserializeU32(pos),
|
|
1925
1942
|
end: deserializeU32(pos + 4),
|
|
1926
1943
|
};
|
|
1927
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1944
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1928
1945
|
if (hasInitializer) {
|
|
1929
|
-
let pattern = deserializeBindingPattern(pos +
|
|
1930
|
-
initializer = deserializeOptionBoxExpression(pos +
|
|
1946
|
+
let pattern = deserializeBindingPattern(pos + 40),
|
|
1947
|
+
initializer = deserializeOptionBoxExpression(pos + 64),
|
|
1931
1948
|
assignParam = {
|
|
1932
1949
|
type: "AssignmentPattern",
|
|
1933
1950
|
decorators: [],
|
|
@@ -1941,17 +1958,17 @@ function deserializeFormalParameter(pos) {
|
|
|
1941
1958
|
assignParam.left = pattern;
|
|
1942
1959
|
pattern.decorators = [];
|
|
1943
1960
|
pattern.optional = false;
|
|
1944
|
-
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1961
|
+
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1945
1962
|
pattern.typeAnnotation = patternTypeAnnotation;
|
|
1946
1963
|
patternTypeAnnotation !== null && (pattern.end = patternTypeAnnotation.end);
|
|
1947
1964
|
assignParam.right = initializer;
|
|
1948
1965
|
param.parameter = assignParam;
|
|
1949
1966
|
} else {
|
|
1950
|
-
param.parameter = deserializeBindingPattern(pos +
|
|
1967
|
+
param.parameter = deserializeBindingPattern(pos + 40);
|
|
1951
1968
|
param.parameter.decorators = [];
|
|
1952
|
-
let paramOptional = deserializeBool(pos +
|
|
1969
|
+
let paramOptional = deserializeBool(pos + 12);
|
|
1953
1970
|
param.parameter.optional = paramOptional;
|
|
1954
|
-
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1971
|
+
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1955
1972
|
param.parameter.typeAnnotation = paramTypeAnnotation;
|
|
1956
1973
|
if (paramTypeAnnotation !== null) param.parameter.end = paramTypeAnnotation.end;
|
|
1957
1974
|
else if (paramOptional) {
|
|
@@ -1971,8 +1988,8 @@ function deserializeFunctionBody(pos) {
|
|
|
1971
1988
|
start: deserializeU32(pos),
|
|
1972
1989
|
end: deserializeU32(pos + 4),
|
|
1973
1990
|
},
|
|
1974
|
-
body = deserializeVecDirective(pos +
|
|
1975
|
-
body.push(...deserializeVecStatement(pos +
|
|
1991
|
+
body = deserializeVecDirective(pos + 16);
|
|
1992
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
1976
1993
|
node.body = body;
|
|
1977
1994
|
return node;
|
|
1978
1995
|
}
|
|
@@ -1992,11 +2009,11 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
1992
2009
|
start: deserializeU32(pos),
|
|
1993
2010
|
end: deserializeU32(pos + 4),
|
|
1994
2011
|
},
|
|
1995
|
-
body = deserializeBoxFunctionBody(pos +
|
|
2012
|
+
body = deserializeBoxFunctionBody(pos + 40);
|
|
1996
2013
|
expression === true && (body = body.body[0].expression);
|
|
1997
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
1998
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
1999
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2014
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
2015
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
2016
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
2000
2017
|
node.body = body;
|
|
2001
2018
|
node.generator = false;
|
|
2002
2019
|
return node;
|
|
@@ -2005,12 +2022,12 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
2005
2022
|
function deserializeYieldExpression(pos) {
|
|
2006
2023
|
let node = {
|
|
2007
2024
|
type: "YieldExpression",
|
|
2008
|
-
delegate: deserializeBool(pos +
|
|
2025
|
+
delegate: deserializeBool(pos + 12),
|
|
2009
2026
|
argument: null,
|
|
2010
2027
|
start: deserializeU32(pos),
|
|
2011
2028
|
end: deserializeU32(pos + 4),
|
|
2012
2029
|
};
|
|
2013
|
-
node.argument = deserializeOptionExpression(pos +
|
|
2030
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
2014
2031
|
return node;
|
|
2015
2032
|
}
|
|
2016
2033
|
|
|
@@ -2029,13 +2046,13 @@ function deserializeClass(pos) {
|
|
|
2029
2046
|
start: deserializeU32(pos),
|
|
2030
2047
|
end: deserializeU32(pos + 4),
|
|
2031
2048
|
};
|
|
2032
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2033
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
2034
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
2035
|
-
node.superClass = deserializeOptionExpression(pos +
|
|
2036
|
-
node.superTypeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
2037
|
-
node.implements = deserializeVecTSClassImplements(pos +
|
|
2038
|
-
node.body = deserializeBoxClassBody(pos +
|
|
2049
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2050
|
+
node.id = deserializeOptionBindingIdentifier(pos + 40);
|
|
2051
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 72);
|
|
2052
|
+
node.superClass = deserializeOptionExpression(pos + 80);
|
|
2053
|
+
node.superTypeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 96);
|
|
2054
|
+
node.implements = deserializeVecTSClassImplements(pos + 104);
|
|
2055
|
+
node.body = deserializeBoxClassBody(pos + 128);
|
|
2039
2056
|
return node;
|
|
2040
2057
|
}
|
|
2041
2058
|
|
|
@@ -2057,7 +2074,7 @@ function deserializeClassBody(pos) {
|
|
|
2057
2074
|
start: deserializeU32(pos),
|
|
2058
2075
|
end: deserializeU32(pos + 4),
|
|
2059
2076
|
};
|
|
2060
|
-
node.body = deserializeVecClassElement(pos +
|
|
2077
|
+
node.body = deserializeVecClassElement(pos + 16);
|
|
2061
2078
|
return node;
|
|
2062
2079
|
}
|
|
2063
2080
|
|
|
@@ -2080,22 +2097,22 @@ function deserializeClassElement(pos) {
|
|
|
2080
2097
|
|
|
2081
2098
|
function deserializeMethodDefinition(pos) {
|
|
2082
2099
|
let node = {
|
|
2083
|
-
type: deserializeMethodDefinitionType(pos +
|
|
2100
|
+
type: deserializeMethodDefinitionType(pos + 12),
|
|
2084
2101
|
decorators: null,
|
|
2085
2102
|
key: null,
|
|
2086
2103
|
value: null,
|
|
2087
|
-
kind: deserializeMethodDefinitionKind(pos +
|
|
2088
|
-
computed: deserializeBool(pos +
|
|
2089
|
-
static: deserializeBool(pos +
|
|
2104
|
+
kind: deserializeMethodDefinitionKind(pos + 13),
|
|
2105
|
+
computed: deserializeBool(pos + 14),
|
|
2106
|
+
static: deserializeBool(pos + 15),
|
|
2090
2107
|
override: deserializeBool(pos + 64),
|
|
2091
2108
|
optional: deserializeBool(pos + 65),
|
|
2092
2109
|
accessibility: deserializeOptionTSAccessibility(pos + 66),
|
|
2093
2110
|
start: deserializeU32(pos),
|
|
2094
2111
|
end: deserializeU32(pos + 4),
|
|
2095
2112
|
};
|
|
2096
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2097
|
-
node.key = deserializePropertyKey(pos +
|
|
2098
|
-
node.value = deserializeBoxFunction(pos +
|
|
2113
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2114
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2115
|
+
node.value = deserializeBoxFunction(pos + 56);
|
|
2099
2116
|
return node;
|
|
2100
2117
|
}
|
|
2101
2118
|
|
|
@@ -2112,14 +2129,14 @@ function deserializeMethodDefinitionType(pos) {
|
|
|
2112
2129
|
|
|
2113
2130
|
function deserializePropertyDefinition(pos) {
|
|
2114
2131
|
let node = {
|
|
2115
|
-
type: deserializePropertyDefinitionType(pos +
|
|
2132
|
+
type: deserializePropertyDefinitionType(pos + 12),
|
|
2116
2133
|
decorators: null,
|
|
2117
2134
|
key: null,
|
|
2118
2135
|
typeAnnotation: null,
|
|
2119
2136
|
value: null,
|
|
2120
|
-
computed: deserializeBool(pos +
|
|
2121
|
-
static: deserializeBool(pos +
|
|
2122
|
-
declare: deserializeBool(pos +
|
|
2137
|
+
computed: deserializeBool(pos + 13),
|
|
2138
|
+
static: deserializeBool(pos + 14),
|
|
2139
|
+
declare: deserializeBool(pos + 15),
|
|
2123
2140
|
override: deserializeBool(pos + 80),
|
|
2124
2141
|
optional: deserializeBool(pos + 81),
|
|
2125
2142
|
definite: deserializeBool(pos + 82),
|
|
@@ -2128,10 +2145,10 @@ function deserializePropertyDefinition(pos) {
|
|
|
2128
2145
|
start: deserializeU32(pos),
|
|
2129
2146
|
end: deserializeU32(pos + 4),
|
|
2130
2147
|
};
|
|
2131
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2132
|
-
node.key = deserializePropertyKey(pos +
|
|
2133
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2134
|
-
node.value = deserializeOptionExpression(pos +
|
|
2148
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2149
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2150
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2151
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2135
2152
|
return node;
|
|
2136
2153
|
}
|
|
2137
2154
|
|
|
@@ -2164,7 +2181,7 @@ function deserializeMethodDefinitionKind(pos) {
|
|
|
2164
2181
|
function deserializePrivateIdentifier(pos) {
|
|
2165
2182
|
return {
|
|
2166
2183
|
type: "PrivateIdentifier",
|
|
2167
|
-
name: deserializeStr(pos +
|
|
2184
|
+
name: deserializeStr(pos + 16),
|
|
2168
2185
|
start: deserializeU32(pos),
|
|
2169
2186
|
end: deserializeU32(pos + 4),
|
|
2170
2187
|
};
|
|
@@ -2177,7 +2194,7 @@ function deserializeStaticBlock(pos) {
|
|
|
2177
2194
|
start: deserializeU32(pos),
|
|
2178
2195
|
end: deserializeU32(pos + 4),
|
|
2179
2196
|
};
|
|
2180
|
-
node.body = deserializeVecStatement(pos +
|
|
2197
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
2181
2198
|
return node;
|
|
2182
2199
|
}
|
|
2183
2200
|
|
|
@@ -2194,14 +2211,14 @@ function deserializeAccessorPropertyType(pos) {
|
|
|
2194
2211
|
|
|
2195
2212
|
function deserializeAccessorProperty(pos) {
|
|
2196
2213
|
let node = {
|
|
2197
|
-
type: deserializeAccessorPropertyType(pos +
|
|
2214
|
+
type: deserializeAccessorPropertyType(pos + 12),
|
|
2198
2215
|
decorators: null,
|
|
2199
2216
|
key: null,
|
|
2200
2217
|
typeAnnotation: null,
|
|
2201
2218
|
value: null,
|
|
2202
|
-
computed: deserializeBool(pos +
|
|
2203
|
-
static: deserializeBool(pos +
|
|
2204
|
-
override: deserializeBool(pos +
|
|
2219
|
+
computed: deserializeBool(pos + 13),
|
|
2220
|
+
static: deserializeBool(pos + 14),
|
|
2221
|
+
override: deserializeBool(pos + 15),
|
|
2205
2222
|
definite: deserializeBool(pos + 80),
|
|
2206
2223
|
accessibility: deserializeOptionTSAccessibility(pos + 81),
|
|
2207
2224
|
declare: null,
|
|
@@ -2210,10 +2227,10 @@ function deserializeAccessorProperty(pos) {
|
|
|
2210
2227
|
start: deserializeU32(pos),
|
|
2211
2228
|
end: deserializeU32(pos + 4),
|
|
2212
2229
|
};
|
|
2213
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2214
|
-
node.key = deserializePropertyKey(pos +
|
|
2215
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2216
|
-
node.value = deserializeOptionExpression(pos +
|
|
2230
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2231
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2232
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2233
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2217
2234
|
node.declare = false;
|
|
2218
2235
|
node.optional = false;
|
|
2219
2236
|
node.readonly = false;
|
|
@@ -2225,12 +2242,12 @@ function deserializeImportExpression(pos) {
|
|
|
2225
2242
|
type: "ImportExpression",
|
|
2226
2243
|
source: null,
|
|
2227
2244
|
options: null,
|
|
2228
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2245
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2229
2246
|
start: deserializeU32(pos),
|
|
2230
2247
|
end: deserializeU32(pos + 4),
|
|
2231
2248
|
};
|
|
2232
|
-
node.source = deserializeExpression(pos +
|
|
2233
|
-
node.options = deserializeOptionExpression(pos +
|
|
2249
|
+
node.source = deserializeExpression(pos + 16);
|
|
2250
|
+
node.options = deserializeOptionExpression(pos + 32);
|
|
2234
2251
|
return node;
|
|
2235
2252
|
}
|
|
2236
2253
|
|
|
@@ -2239,17 +2256,17 @@ function deserializeImportDeclaration(pos) {
|
|
|
2239
2256
|
type: "ImportDeclaration",
|
|
2240
2257
|
specifiers: null,
|
|
2241
2258
|
source: null,
|
|
2242
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2259
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2243
2260
|
attributes: null,
|
|
2244
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2261
|
+
importKind: deserializeImportOrExportKind(pos + 13),
|
|
2245
2262
|
start: deserializeU32(pos),
|
|
2246
2263
|
end: deserializeU32(pos + 4),
|
|
2247
2264
|
},
|
|
2248
|
-
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos +
|
|
2265
|
+
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos + 16);
|
|
2249
2266
|
specifiers === null && (specifiers = []);
|
|
2250
|
-
let withClause = deserializeOptionBoxWithClause(pos +
|
|
2267
|
+
let withClause = deserializeOptionBoxWithClause(pos + 88);
|
|
2251
2268
|
node.specifiers = specifiers;
|
|
2252
|
-
node.source = deserializeStringLiteral(pos +
|
|
2269
|
+
node.source = deserializeStringLiteral(pos + 40);
|
|
2253
2270
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2254
2271
|
return node;
|
|
2255
2272
|
}
|
|
@@ -2283,12 +2300,12 @@ function deserializeImportSpecifier(pos) {
|
|
|
2283
2300
|
type: "ImportSpecifier",
|
|
2284
2301
|
imported: null,
|
|
2285
2302
|
local: null,
|
|
2286
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2303
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
2287
2304
|
start: deserializeU32(pos),
|
|
2288
2305
|
end: deserializeU32(pos + 4),
|
|
2289
2306
|
};
|
|
2290
|
-
node.imported = deserializeModuleExportName(pos +
|
|
2291
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2307
|
+
node.imported = deserializeModuleExportName(pos + 16);
|
|
2308
|
+
node.local = deserializeBindingIdentifier(pos + 72);
|
|
2292
2309
|
return node;
|
|
2293
2310
|
}
|
|
2294
2311
|
|
|
@@ -2299,7 +2316,7 @@ function deserializeImportDefaultSpecifier(pos) {
|
|
|
2299
2316
|
start: deserializeU32(pos),
|
|
2300
2317
|
end: deserializeU32(pos + 4),
|
|
2301
2318
|
};
|
|
2302
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2319
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2303
2320
|
return node;
|
|
2304
2321
|
}
|
|
2305
2322
|
|
|
@@ -2310,16 +2327,12 @@ function deserializeImportNamespaceSpecifier(pos) {
|
|
|
2310
2327
|
start: deserializeU32(pos),
|
|
2311
2328
|
end: deserializeU32(pos + 4),
|
|
2312
2329
|
};
|
|
2313
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2330
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2314
2331
|
return node;
|
|
2315
2332
|
}
|
|
2316
2333
|
|
|
2317
2334
|
function deserializeWithClause(pos) {
|
|
2318
|
-
return {
|
|
2319
|
-
attributes: deserializeVecImportAttribute(pos + 8),
|
|
2320
|
-
start: deserializeU32(pos),
|
|
2321
|
-
end: deserializeU32(pos + 4),
|
|
2322
|
-
};
|
|
2335
|
+
return { attributes: deserializeVecImportAttribute(pos + 16) };
|
|
2323
2336
|
}
|
|
2324
2337
|
|
|
2325
2338
|
function deserializeImportAttribute(pos) {
|
|
@@ -2330,8 +2343,8 @@ function deserializeImportAttribute(pos) {
|
|
|
2330
2343
|
start: deserializeU32(pos),
|
|
2331
2344
|
end: deserializeU32(pos + 4),
|
|
2332
2345
|
};
|
|
2333
|
-
node.key = deserializeImportAttributeKey(pos +
|
|
2334
|
-
node.value = deserializeStringLiteral(pos +
|
|
2346
|
+
node.key = deserializeImportAttributeKey(pos + 16);
|
|
2347
|
+
node.value = deserializeStringLiteral(pos + 72);
|
|
2335
2348
|
return node;
|
|
2336
2349
|
}
|
|
2337
2350
|
|
|
@@ -2352,15 +2365,15 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2352
2365
|
declaration: null,
|
|
2353
2366
|
specifiers: null,
|
|
2354
2367
|
source: null,
|
|
2355
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2368
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2356
2369
|
attributes: null,
|
|
2357
2370
|
start: deserializeU32(pos),
|
|
2358
2371
|
end: deserializeU32(pos + 4),
|
|
2359
2372
|
},
|
|
2360
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2361
|
-
node.declaration = deserializeOptionDeclaration(pos +
|
|
2362
|
-
node.specifiers = deserializeVecExportSpecifier(pos +
|
|
2363
|
-
node.source = deserializeOptionStringLiteral(pos +
|
|
2373
|
+
withClause = deserializeOptionBoxWithClause(pos + 104);
|
|
2374
|
+
node.declaration = deserializeOptionDeclaration(pos + 16);
|
|
2375
|
+
node.specifiers = deserializeVecExportSpecifier(pos + 32);
|
|
2376
|
+
node.source = deserializeOptionStringLiteral(pos + 56);
|
|
2364
2377
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2365
2378
|
return node;
|
|
2366
2379
|
}
|
|
@@ -2373,7 +2386,7 @@ function deserializeExportDefaultDeclaration(pos) {
|
|
|
2373
2386
|
start: deserializeU32(pos),
|
|
2374
2387
|
end: deserializeU32(pos + 4),
|
|
2375
2388
|
};
|
|
2376
|
-
node.declaration = deserializeExportDefaultDeclarationKind(pos +
|
|
2389
|
+
node.declaration = deserializeExportDefaultDeclarationKind(pos + 16);
|
|
2377
2390
|
node.exportKind = "value";
|
|
2378
2391
|
return node;
|
|
2379
2392
|
}
|
|
@@ -2384,13 +2397,13 @@ function deserializeExportAllDeclaration(pos) {
|
|
|
2384
2397
|
exported: null,
|
|
2385
2398
|
source: null,
|
|
2386
2399
|
attributes: null,
|
|
2387
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2400
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2388
2401
|
start: deserializeU32(pos),
|
|
2389
2402
|
end: deserializeU32(pos + 4),
|
|
2390
2403
|
},
|
|
2391
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2392
|
-
node.exported = deserializeOptionModuleExportName(pos +
|
|
2393
|
-
node.source = deserializeStringLiteral(pos +
|
|
2404
|
+
withClause = deserializeOptionBoxWithClause(pos + 120);
|
|
2405
|
+
node.exported = deserializeOptionModuleExportName(pos + 16);
|
|
2406
|
+
node.source = deserializeStringLiteral(pos + 72);
|
|
2394
2407
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2395
2408
|
return node;
|
|
2396
2409
|
}
|
|
@@ -2400,12 +2413,12 @@ function deserializeExportSpecifier(pos) {
|
|
|
2400
2413
|
type: "ExportSpecifier",
|
|
2401
2414
|
local: null,
|
|
2402
2415
|
exported: null,
|
|
2403
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2416
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2404
2417
|
start: deserializeU32(pos),
|
|
2405
2418
|
end: deserializeU32(pos + 4),
|
|
2406
2419
|
};
|
|
2407
|
-
node.local = deserializeModuleExportName(pos +
|
|
2408
|
-
node.exported = deserializeModuleExportName(pos +
|
|
2420
|
+
node.local = deserializeModuleExportName(pos + 16);
|
|
2421
|
+
node.exported = deserializeModuleExportName(pos + 72);
|
|
2409
2422
|
return node;
|
|
2410
2423
|
}
|
|
2411
2424
|
|
|
@@ -2529,8 +2542,8 @@ function deserializeV8IntrinsicExpression(pos) {
|
|
|
2529
2542
|
start: deserializeU32(pos),
|
|
2530
2543
|
end: deserializeU32(pos + 4),
|
|
2531
2544
|
};
|
|
2532
|
-
node.name = deserializeIdentifierName(pos +
|
|
2533
|
-
node.arguments = deserializeVecArgument(pos +
|
|
2545
|
+
node.name = deserializeIdentifierName(pos + 16);
|
|
2546
|
+
node.arguments = deserializeVecArgument(pos + 48);
|
|
2534
2547
|
return node;
|
|
2535
2548
|
}
|
|
2536
2549
|
|
|
@@ -2564,55 +2577,75 @@ function deserializeNullLiteral(pos) {
|
|
|
2564
2577
|
}
|
|
2565
2578
|
|
|
2566
2579
|
function deserializeNumericLiteral(pos) {
|
|
2580
|
+
let start = deserializeU32(pos),
|
|
2581
|
+
end = deserializeU32(pos + 4);
|
|
2567
2582
|
return {
|
|
2568
2583
|
type: "Literal",
|
|
2569
|
-
value: deserializeF64(pos +
|
|
2570
|
-
raw:
|
|
2571
|
-
|
|
2572
|
-
|
|
2584
|
+
value: deserializeF64(pos + 32),
|
|
2585
|
+
raw:
|
|
2586
|
+
uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
2587
|
+
? null
|
|
2588
|
+
: sourceText.slice(start, end),
|
|
2589
|
+
start,
|
|
2590
|
+
end,
|
|
2573
2591
|
};
|
|
2574
2592
|
}
|
|
2575
2593
|
|
|
2576
2594
|
function deserializeStringLiteral(pos) {
|
|
2577
|
-
let
|
|
2595
|
+
let start = deserializeU32(pos),
|
|
2596
|
+
end = deserializeU32(pos + 4),
|
|
2597
|
+
node = {
|
|
2578
2598
|
type: "Literal",
|
|
2579
2599
|
value: null,
|
|
2580
|
-
raw:
|
|
2581
|
-
|
|
2582
|
-
|
|
2600
|
+
raw:
|
|
2601
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2602
|
+
? null
|
|
2603
|
+
: sourceText.slice(start, end),
|
|
2604
|
+
start,
|
|
2605
|
+
end,
|
|
2583
2606
|
},
|
|
2584
|
-
value = deserializeStr(pos +
|
|
2585
|
-
deserializeBool(pos +
|
|
2607
|
+
value = deserializeStr(pos + 16);
|
|
2608
|
+
deserializeBool(pos + 12) &&
|
|
2586
2609
|
(value = value.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
2587
2610
|
node.value = value;
|
|
2588
2611
|
return node;
|
|
2589
2612
|
}
|
|
2590
2613
|
|
|
2591
2614
|
function deserializeBigIntLiteral(pos) {
|
|
2592
|
-
let
|
|
2615
|
+
let start = deserializeU32(pos),
|
|
2616
|
+
end = deserializeU32(pos + 4),
|
|
2617
|
+
node = {
|
|
2593
2618
|
type: "Literal",
|
|
2594
2619
|
value: null,
|
|
2595
|
-
raw:
|
|
2620
|
+
raw:
|
|
2621
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2622
|
+
? null
|
|
2623
|
+
: sourceText.slice(start, end),
|
|
2596
2624
|
bigint: null,
|
|
2597
|
-
start
|
|
2598
|
-
end
|
|
2625
|
+
start,
|
|
2626
|
+
end,
|
|
2599
2627
|
},
|
|
2600
|
-
bigint = deserializeStr(pos +
|
|
2628
|
+
bigint = deserializeStr(pos + 16);
|
|
2601
2629
|
node.value = BigInt(bigint);
|
|
2602
2630
|
node.bigint = bigint;
|
|
2603
2631
|
return node;
|
|
2604
2632
|
}
|
|
2605
2633
|
|
|
2606
2634
|
function deserializeRegExpLiteral(pos) {
|
|
2607
|
-
let
|
|
2635
|
+
let start = deserializeU32(pos),
|
|
2636
|
+
end = deserializeU32(pos + 4),
|
|
2637
|
+
node = {
|
|
2608
2638
|
type: "Literal",
|
|
2609
2639
|
value: null,
|
|
2610
|
-
raw:
|
|
2640
|
+
raw:
|
|
2641
|
+
uint32[(pos + 48) >> 2] === 0 && uint32[(pos + 52) >> 2] === 0
|
|
2642
|
+
? null
|
|
2643
|
+
: sourceText.slice(start, end),
|
|
2611
2644
|
regex: null,
|
|
2612
|
-
start
|
|
2613
|
-
end
|
|
2645
|
+
start,
|
|
2646
|
+
end,
|
|
2614
2647
|
},
|
|
2615
|
-
regex = deserializeRegExp(pos +
|
|
2648
|
+
regex = deserializeRegExp(pos + 16),
|
|
2616
2649
|
value = null;
|
|
2617
2650
|
try {
|
|
2618
2651
|
value = new RegExp(regex.pattern, regex.flags);
|
|
@@ -2653,11 +2686,11 @@ function deserializeJSXElement(pos) {
|
|
|
2653
2686
|
start: deserializeU32(pos),
|
|
2654
2687
|
end: deserializeU32(pos + 4),
|
|
2655
2688
|
},
|
|
2656
|
-
closingElement = deserializeOptionBoxJSXClosingElement(pos +
|
|
2657
|
-
openingElement = deserializeBoxJSXOpeningElement(pos +
|
|
2689
|
+
closingElement = deserializeOptionBoxJSXClosingElement(pos + 48),
|
|
2690
|
+
openingElement = deserializeBoxJSXOpeningElement(pos + 16);
|
|
2658
2691
|
closingElement === null && (openingElement.selfClosing = true);
|
|
2659
2692
|
node.openingElement = openingElement;
|
|
2660
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2693
|
+
node.children = deserializeVecJSXChild(pos + 24);
|
|
2661
2694
|
node.closingElement = closingElement;
|
|
2662
2695
|
return node;
|
|
2663
2696
|
}
|
|
@@ -2672,9 +2705,9 @@ function deserializeJSXOpeningElement(pos) {
|
|
|
2672
2705
|
start: deserializeU32(pos),
|
|
2673
2706
|
end: deserializeU32(pos + 4),
|
|
2674
2707
|
};
|
|
2675
|
-
node.name = deserializeJSXElementName(pos +
|
|
2676
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
2677
|
-
node.attributes = deserializeVecJSXAttributeItem(pos +
|
|
2708
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2709
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
2710
|
+
node.attributes = deserializeVecJSXAttributeItem(pos + 40);
|
|
2678
2711
|
node.selfClosing = false;
|
|
2679
2712
|
return node;
|
|
2680
2713
|
}
|
|
@@ -2686,7 +2719,7 @@ function deserializeJSXClosingElement(pos) {
|
|
|
2686
2719
|
start: deserializeU32(pos),
|
|
2687
2720
|
end: deserializeU32(pos + 4),
|
|
2688
2721
|
};
|
|
2689
|
-
node.name = deserializeJSXElementName(pos +
|
|
2722
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2690
2723
|
return node;
|
|
2691
2724
|
}
|
|
2692
2725
|
|
|
@@ -2699,9 +2732,9 @@ function deserializeJSXFragment(pos) {
|
|
|
2699
2732
|
start: deserializeU32(pos),
|
|
2700
2733
|
end: deserializeU32(pos + 4),
|
|
2701
2734
|
};
|
|
2702
|
-
node.openingFragment = deserializeJSXOpeningFragment(pos +
|
|
2703
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2704
|
-
node.closingFragment = deserializeJSXClosingFragment(pos +
|
|
2735
|
+
node.openingFragment = deserializeJSXOpeningFragment(pos + 16);
|
|
2736
|
+
node.children = deserializeVecJSXChild(pos + 32);
|
|
2737
|
+
node.closingFragment = deserializeJSXClosingFragment(pos + 56);
|
|
2705
2738
|
return node;
|
|
2706
2739
|
}
|
|
2707
2740
|
|
|
@@ -2758,8 +2791,8 @@ function deserializeJSXNamespacedName(pos) {
|
|
|
2758
2791
|
start: deserializeU32(pos),
|
|
2759
2792
|
end: deserializeU32(pos + 4),
|
|
2760
2793
|
};
|
|
2761
|
-
node.namespace = deserializeJSXIdentifier(pos +
|
|
2762
|
-
node.name = deserializeJSXIdentifier(pos +
|
|
2794
|
+
node.namespace = deserializeJSXIdentifier(pos + 16);
|
|
2795
|
+
node.name = deserializeJSXIdentifier(pos + 48);
|
|
2763
2796
|
return node;
|
|
2764
2797
|
}
|
|
2765
2798
|
|
|
@@ -2771,8 +2804,8 @@ function deserializeJSXMemberExpression(pos) {
|
|
|
2771
2804
|
start: deserializeU32(pos),
|
|
2772
2805
|
end: deserializeU32(pos + 4),
|
|
2773
2806
|
};
|
|
2774
|
-
node.object = deserializeJSXMemberExpressionObject(pos +
|
|
2775
|
-
node.property = deserializeJSXIdentifier(pos +
|
|
2807
|
+
node.object = deserializeJSXMemberExpressionObject(pos + 16);
|
|
2808
|
+
node.property = deserializeJSXIdentifier(pos + 32);
|
|
2776
2809
|
return node;
|
|
2777
2810
|
}
|
|
2778
2811
|
|
|
@@ -2808,7 +2841,7 @@ function deserializeJSXExpressionContainer(pos) {
|
|
|
2808
2841
|
start: deserializeU32(pos),
|
|
2809
2842
|
end: deserializeU32(pos + 4),
|
|
2810
2843
|
};
|
|
2811
|
-
node.expression = deserializeJSXExpression(pos +
|
|
2844
|
+
node.expression = deserializeJSXExpression(pos + 16);
|
|
2812
2845
|
return node;
|
|
2813
2846
|
}
|
|
2814
2847
|
|
|
@@ -2934,8 +2967,8 @@ function deserializeJSXAttribute(pos) {
|
|
|
2934
2967
|
start: deserializeU32(pos),
|
|
2935
2968
|
end: deserializeU32(pos + 4),
|
|
2936
2969
|
};
|
|
2937
|
-
node.name = deserializeJSXAttributeName(pos +
|
|
2938
|
-
node.value = deserializeOptionJSXAttributeValue(pos +
|
|
2970
|
+
node.name = deserializeJSXAttributeName(pos + 16);
|
|
2971
|
+
node.value = deserializeOptionJSXAttributeValue(pos + 32);
|
|
2939
2972
|
return node;
|
|
2940
2973
|
}
|
|
2941
2974
|
|
|
@@ -2946,7 +2979,7 @@ function deserializeJSXSpreadAttribute(pos) {
|
|
|
2946
2979
|
start: deserializeU32(pos),
|
|
2947
2980
|
end: deserializeU32(pos + 4),
|
|
2948
2981
|
};
|
|
2949
|
-
node.argument = deserializeExpression(pos +
|
|
2982
|
+
node.argument = deserializeExpression(pos + 16);
|
|
2950
2983
|
return node;
|
|
2951
2984
|
}
|
|
2952
2985
|
|
|
@@ -2979,7 +3012,7 @@ function deserializeJSXAttributeValue(pos) {
|
|
|
2979
3012
|
function deserializeJSXIdentifier(pos) {
|
|
2980
3013
|
return {
|
|
2981
3014
|
type: "JSXIdentifier",
|
|
2982
|
-
name: deserializeStr(pos +
|
|
3015
|
+
name: deserializeStr(pos + 16),
|
|
2983
3016
|
start: deserializeU32(pos),
|
|
2984
3017
|
end: deserializeU32(pos + 4),
|
|
2985
3018
|
};
|
|
@@ -3009,17 +3042,22 @@ function deserializeJSXSpreadChild(pos) {
|
|
|
3009
3042
|
start: deserializeU32(pos),
|
|
3010
3043
|
end: deserializeU32(pos + 4),
|
|
3011
3044
|
};
|
|
3012
|
-
node.expression = deserializeExpression(pos +
|
|
3045
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3013
3046
|
return node;
|
|
3014
3047
|
}
|
|
3015
3048
|
|
|
3016
3049
|
function deserializeJSXText(pos) {
|
|
3050
|
+
let start = deserializeU32(pos),
|
|
3051
|
+
end = deserializeU32(pos + 4);
|
|
3017
3052
|
return {
|
|
3018
3053
|
type: "JSXText",
|
|
3019
|
-
value: deserializeStr(pos +
|
|
3020
|
-
raw:
|
|
3021
|
-
|
|
3022
|
-
|
|
3054
|
+
value: deserializeStr(pos + 16),
|
|
3055
|
+
raw:
|
|
3056
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
3057
|
+
? null
|
|
3058
|
+
: sourceText.slice(start, end),
|
|
3059
|
+
start,
|
|
3060
|
+
end,
|
|
3023
3061
|
};
|
|
3024
3062
|
}
|
|
3025
3063
|
|
|
@@ -3036,7 +3074,7 @@ function deserializeTSThisParameter(pos) {
|
|
|
3036
3074
|
node.decorators = [];
|
|
3037
3075
|
node.name = "this";
|
|
3038
3076
|
node.optional = false;
|
|
3039
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3077
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
|
|
3040
3078
|
return node;
|
|
3041
3079
|
}
|
|
3042
3080
|
|
|
@@ -3045,13 +3083,13 @@ function deserializeTSEnumDeclaration(pos) {
|
|
|
3045
3083
|
type: "TSEnumDeclaration",
|
|
3046
3084
|
id: null,
|
|
3047
3085
|
body: null,
|
|
3048
|
-
const: deserializeBool(pos +
|
|
3049
|
-
declare: deserializeBool(pos +
|
|
3086
|
+
const: deserializeBool(pos + 12),
|
|
3087
|
+
declare: deserializeBool(pos + 13),
|
|
3050
3088
|
start: deserializeU32(pos),
|
|
3051
3089
|
end: deserializeU32(pos + 4),
|
|
3052
3090
|
};
|
|
3053
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3054
|
-
node.body = deserializeTSEnumBody(pos +
|
|
3091
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3092
|
+
node.body = deserializeTSEnumBody(pos + 48);
|
|
3055
3093
|
return node;
|
|
3056
3094
|
}
|
|
3057
3095
|
|
|
@@ -3062,7 +3100,7 @@ function deserializeTSEnumBody(pos) {
|
|
|
3062
3100
|
start: deserializeU32(pos),
|
|
3063
3101
|
end: deserializeU32(pos + 4),
|
|
3064
3102
|
};
|
|
3065
|
-
node.members = deserializeVecTSEnumMember(pos +
|
|
3103
|
+
node.members = deserializeVecTSEnumMember(pos + 16);
|
|
3066
3104
|
return node;
|
|
3067
3105
|
}
|
|
3068
3106
|
|
|
@@ -3075,9 +3113,9 @@ function deserializeTSEnumMember(pos) {
|
|
|
3075
3113
|
start: deserializeU32(pos),
|
|
3076
3114
|
end: deserializeU32(pos + 4),
|
|
3077
3115
|
};
|
|
3078
|
-
node.id = deserializeTSEnumMemberName(pos +
|
|
3079
|
-
node.initializer = deserializeOptionExpression(pos +
|
|
3080
|
-
node.computed = deserializeU8(pos +
|
|
3116
|
+
node.id = deserializeTSEnumMemberName(pos + 16);
|
|
3117
|
+
node.initializer = deserializeOptionExpression(pos + 32);
|
|
3118
|
+
node.computed = deserializeU8(pos + 16) > 1;
|
|
3081
3119
|
return node;
|
|
3082
3120
|
}
|
|
3083
3121
|
|
|
@@ -3103,7 +3141,7 @@ function deserializeTSTypeAnnotation(pos) {
|
|
|
3103
3141
|
start: deserializeU32(pos),
|
|
3104
3142
|
end: deserializeU32(pos + 4),
|
|
3105
3143
|
};
|
|
3106
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3144
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3107
3145
|
return node;
|
|
3108
3146
|
}
|
|
3109
3147
|
|
|
@@ -3114,7 +3152,7 @@ function deserializeTSLiteralType(pos) {
|
|
|
3114
3152
|
start: deserializeU32(pos),
|
|
3115
3153
|
end: deserializeU32(pos + 4),
|
|
3116
3154
|
};
|
|
3117
|
-
node.literal = deserializeTSLiteral(pos +
|
|
3155
|
+
node.literal = deserializeTSLiteral(pos + 16);
|
|
3118
3156
|
return node;
|
|
3119
3157
|
}
|
|
3120
3158
|
|
|
@@ -3228,10 +3266,10 @@ function deserializeTSConditionalType(pos) {
|
|
|
3228
3266
|
start: deserializeU32(pos),
|
|
3229
3267
|
end: deserializeU32(pos + 4),
|
|
3230
3268
|
};
|
|
3231
|
-
node.checkType = deserializeTSType(pos +
|
|
3232
|
-
node.extendsType = deserializeTSType(pos +
|
|
3233
|
-
node.trueType = deserializeTSType(pos +
|
|
3234
|
-
node.falseType = deserializeTSType(pos +
|
|
3269
|
+
node.checkType = deserializeTSType(pos + 16);
|
|
3270
|
+
node.extendsType = deserializeTSType(pos + 32);
|
|
3271
|
+
node.trueType = deserializeTSType(pos + 48);
|
|
3272
|
+
node.falseType = deserializeTSType(pos + 64);
|
|
3235
3273
|
return node;
|
|
3236
3274
|
}
|
|
3237
3275
|
|
|
@@ -3242,7 +3280,7 @@ function deserializeTSUnionType(pos) {
|
|
|
3242
3280
|
start: deserializeU32(pos),
|
|
3243
3281
|
end: deserializeU32(pos + 4),
|
|
3244
3282
|
};
|
|
3245
|
-
node.types = deserializeVecTSType(pos +
|
|
3283
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3246
3284
|
return node;
|
|
3247
3285
|
}
|
|
3248
3286
|
|
|
@@ -3253,7 +3291,7 @@ function deserializeTSIntersectionType(pos) {
|
|
|
3253
3291
|
start: deserializeU32(pos),
|
|
3254
3292
|
end: deserializeU32(pos + 4),
|
|
3255
3293
|
};
|
|
3256
|
-
node.types = deserializeVecTSType(pos +
|
|
3294
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3257
3295
|
return node;
|
|
3258
3296
|
}
|
|
3259
3297
|
|
|
@@ -3265,19 +3303,19 @@ function deserializeTSParenthesizedType(pos) {
|
|
|
3265
3303
|
start: deserializeU32(pos),
|
|
3266
3304
|
end: deserializeU32(pos + 4),
|
|
3267
3305
|
};
|
|
3268
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3306
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3269
3307
|
return node;
|
|
3270
3308
|
}
|
|
3271
3309
|
|
|
3272
3310
|
function deserializeTSTypeOperator(pos) {
|
|
3273
3311
|
let node = {
|
|
3274
3312
|
type: "TSTypeOperator",
|
|
3275
|
-
operator: deserializeTSTypeOperatorOperator(pos +
|
|
3313
|
+
operator: deserializeTSTypeOperatorOperator(pos + 12),
|
|
3276
3314
|
typeAnnotation: null,
|
|
3277
3315
|
start: deserializeU32(pos),
|
|
3278
3316
|
end: deserializeU32(pos + 4),
|
|
3279
3317
|
};
|
|
3280
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3318
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3281
3319
|
return node;
|
|
3282
3320
|
}
|
|
3283
3321
|
|
|
@@ -3301,7 +3339,7 @@ function deserializeTSArrayType(pos) {
|
|
|
3301
3339
|
start: deserializeU32(pos),
|
|
3302
3340
|
end: deserializeU32(pos + 4),
|
|
3303
3341
|
};
|
|
3304
|
-
node.elementType = deserializeTSType(pos +
|
|
3342
|
+
node.elementType = deserializeTSType(pos + 16);
|
|
3305
3343
|
return node;
|
|
3306
3344
|
}
|
|
3307
3345
|
|
|
@@ -3313,8 +3351,8 @@ function deserializeTSIndexedAccessType(pos) {
|
|
|
3313
3351
|
start: deserializeU32(pos),
|
|
3314
3352
|
end: deserializeU32(pos + 4),
|
|
3315
3353
|
};
|
|
3316
|
-
node.objectType = deserializeTSType(pos +
|
|
3317
|
-
node.indexType = deserializeTSType(pos +
|
|
3354
|
+
node.objectType = deserializeTSType(pos + 16);
|
|
3355
|
+
node.indexType = deserializeTSType(pos + 32);
|
|
3318
3356
|
return node;
|
|
3319
3357
|
}
|
|
3320
3358
|
|
|
@@ -3325,7 +3363,7 @@ function deserializeTSTupleType(pos) {
|
|
|
3325
3363
|
start: deserializeU32(pos),
|
|
3326
3364
|
end: deserializeU32(pos + 4),
|
|
3327
3365
|
};
|
|
3328
|
-
node.elementTypes = deserializeVecTSTupleElement(pos +
|
|
3366
|
+
node.elementTypes = deserializeVecTSTupleElement(pos + 16);
|
|
3329
3367
|
return node;
|
|
3330
3368
|
}
|
|
3331
3369
|
|
|
@@ -3334,12 +3372,12 @@ function deserializeTSNamedTupleMember(pos) {
|
|
|
3334
3372
|
type: "TSNamedTupleMember",
|
|
3335
3373
|
label: null,
|
|
3336
3374
|
elementType: null,
|
|
3337
|
-
optional: deserializeBool(pos +
|
|
3375
|
+
optional: deserializeBool(pos + 12),
|
|
3338
3376
|
start: deserializeU32(pos),
|
|
3339
3377
|
end: deserializeU32(pos + 4),
|
|
3340
3378
|
};
|
|
3341
|
-
node.label = deserializeIdentifierName(pos +
|
|
3342
|
-
node.elementType = deserializeTSTupleElement(pos +
|
|
3379
|
+
node.label = deserializeIdentifierName(pos + 16);
|
|
3380
|
+
node.elementType = deserializeTSTupleElement(pos + 48);
|
|
3343
3381
|
return node;
|
|
3344
3382
|
}
|
|
3345
3383
|
|
|
@@ -3350,7 +3388,7 @@ function deserializeTSOptionalType(pos) {
|
|
|
3350
3388
|
start: deserializeU32(pos),
|
|
3351
3389
|
end: deserializeU32(pos + 4),
|
|
3352
3390
|
};
|
|
3353
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3391
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3354
3392
|
return node;
|
|
3355
3393
|
}
|
|
3356
3394
|
|
|
@@ -3361,7 +3399,7 @@ function deserializeTSRestType(pos) {
|
|
|
3361
3399
|
start: deserializeU32(pos),
|
|
3362
3400
|
end: deserializeU32(pos + 4),
|
|
3363
3401
|
};
|
|
3364
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3402
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3365
3403
|
return node;
|
|
3366
3404
|
}
|
|
3367
3405
|
|
|
@@ -3570,8 +3608,8 @@ function deserializeTSTypeReference(pos) {
|
|
|
3570
3608
|
start: deserializeU32(pos),
|
|
3571
3609
|
end: deserializeU32(pos + 4),
|
|
3572
3610
|
};
|
|
3573
|
-
node.typeName = deserializeTSTypeName(pos +
|
|
3574
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3611
|
+
node.typeName = deserializeTSTypeName(pos + 16);
|
|
3612
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3575
3613
|
return node;
|
|
3576
3614
|
}
|
|
3577
3615
|
|
|
@@ -3596,8 +3634,8 @@ function deserializeTSQualifiedName(pos) {
|
|
|
3596
3634
|
start: deserializeU32(pos),
|
|
3597
3635
|
end: deserializeU32(pos + 4),
|
|
3598
3636
|
};
|
|
3599
|
-
node.left = deserializeTSTypeName(pos +
|
|
3600
|
-
node.right = deserializeIdentifierName(pos +
|
|
3637
|
+
node.left = deserializeTSTypeName(pos + 16);
|
|
3638
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
3601
3639
|
return node;
|
|
3602
3640
|
}
|
|
3603
3641
|
|
|
@@ -3608,7 +3646,7 @@ function deserializeTSTypeParameterInstantiation(pos) {
|
|
|
3608
3646
|
start: deserializeU32(pos),
|
|
3609
3647
|
end: deserializeU32(pos + 4),
|
|
3610
3648
|
};
|
|
3611
|
-
node.params = deserializeVecTSType(pos +
|
|
3649
|
+
node.params = deserializeVecTSType(pos + 16);
|
|
3612
3650
|
return node;
|
|
3613
3651
|
}
|
|
3614
3652
|
|
|
@@ -3618,15 +3656,15 @@ function deserializeTSTypeParameter(pos) {
|
|
|
3618
3656
|
name: null,
|
|
3619
3657
|
constraint: null,
|
|
3620
3658
|
default: null,
|
|
3621
|
-
in: deserializeBool(pos +
|
|
3622
|
-
out: deserializeBool(pos +
|
|
3623
|
-
const: deserializeBool(pos +
|
|
3659
|
+
in: deserializeBool(pos + 12),
|
|
3660
|
+
out: deserializeBool(pos + 13),
|
|
3661
|
+
const: deserializeBool(pos + 14),
|
|
3624
3662
|
start: deserializeU32(pos),
|
|
3625
3663
|
end: deserializeU32(pos + 4),
|
|
3626
3664
|
};
|
|
3627
|
-
node.name = deserializeBindingIdentifier(pos +
|
|
3628
|
-
node.constraint = deserializeOptionTSType(pos +
|
|
3629
|
-
node.default = deserializeOptionTSType(pos +
|
|
3665
|
+
node.name = deserializeBindingIdentifier(pos + 16);
|
|
3666
|
+
node.constraint = deserializeOptionTSType(pos + 48);
|
|
3667
|
+
node.default = deserializeOptionTSType(pos + 64);
|
|
3630
3668
|
return node;
|
|
3631
3669
|
}
|
|
3632
3670
|
|
|
@@ -3637,7 +3675,7 @@ function deserializeTSTypeParameterDeclaration(pos) {
|
|
|
3637
3675
|
start: deserializeU32(pos),
|
|
3638
3676
|
end: deserializeU32(pos + 4),
|
|
3639
3677
|
};
|
|
3640
|
-
node.params = deserializeVecTSTypeParameter(pos +
|
|
3678
|
+
node.params = deserializeVecTSTypeParameter(pos + 16);
|
|
3641
3679
|
return node;
|
|
3642
3680
|
}
|
|
3643
3681
|
|
|
@@ -3651,9 +3689,9 @@ function deserializeTSTypeAliasDeclaration(pos) {
|
|
|
3651
3689
|
start: deserializeU32(pos),
|
|
3652
3690
|
end: deserializeU32(pos + 4),
|
|
3653
3691
|
};
|
|
3654
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3655
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3656
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3692
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3693
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3694
|
+
node.typeAnnotation = deserializeTSType(pos + 56);
|
|
3657
3695
|
return node;
|
|
3658
3696
|
}
|
|
3659
3697
|
|
|
@@ -3678,7 +3716,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
3678
3716
|
start: deserializeU32(pos),
|
|
3679
3717
|
end: deserializeU32(pos + 4),
|
|
3680
3718
|
},
|
|
3681
|
-
expression = deserializeTSTypeName(pos +
|
|
3719
|
+
expression = deserializeTSTypeName(pos + 16);
|
|
3682
3720
|
if (expression.type === "TSQualifiedName") {
|
|
3683
3721
|
let object = expression.left,
|
|
3684
3722
|
{ right } = expression,
|
|
@@ -3706,7 +3744,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
3706
3744
|
}
|
|
3707
3745
|
}
|
|
3708
3746
|
node.expression = expression;
|
|
3709
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3747
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3710
3748
|
return node;
|
|
3711
3749
|
}
|
|
3712
3750
|
|
|
@@ -3721,10 +3759,10 @@ function deserializeTSInterfaceDeclaration(pos) {
|
|
|
3721
3759
|
start: deserializeU32(pos),
|
|
3722
3760
|
end: deserializeU32(pos + 4),
|
|
3723
3761
|
};
|
|
3724
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3725
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3726
|
-
node.extends = deserializeVecTSInterfaceHeritage(pos +
|
|
3727
|
-
node.body = deserializeBoxTSInterfaceBody(pos +
|
|
3762
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3763
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3764
|
+
node.extends = deserializeVecTSInterfaceHeritage(pos + 56);
|
|
3765
|
+
node.body = deserializeBoxTSInterfaceBody(pos + 80);
|
|
3728
3766
|
return node;
|
|
3729
3767
|
}
|
|
3730
3768
|
|
|
@@ -3735,16 +3773,16 @@ function deserializeTSInterfaceBody(pos) {
|
|
|
3735
3773
|
start: deserializeU32(pos),
|
|
3736
3774
|
end: deserializeU32(pos + 4),
|
|
3737
3775
|
};
|
|
3738
|
-
node.body = deserializeVecTSSignature(pos +
|
|
3776
|
+
node.body = deserializeVecTSSignature(pos + 16);
|
|
3739
3777
|
return node;
|
|
3740
3778
|
}
|
|
3741
3779
|
|
|
3742
3780
|
function deserializeTSPropertySignature(pos) {
|
|
3743
3781
|
let node = {
|
|
3744
3782
|
type: "TSPropertySignature",
|
|
3745
|
-
computed: deserializeBool(pos +
|
|
3746
|
-
optional: deserializeBool(pos +
|
|
3747
|
-
readonly: deserializeBool(pos +
|
|
3783
|
+
computed: deserializeBool(pos + 12),
|
|
3784
|
+
optional: deserializeBool(pos + 13),
|
|
3785
|
+
readonly: deserializeBool(pos + 14),
|
|
3748
3786
|
key: null,
|
|
3749
3787
|
typeAnnotation: null,
|
|
3750
3788
|
accessibility: null,
|
|
@@ -3752,8 +3790,8 @@ function deserializeTSPropertySignature(pos) {
|
|
|
3752
3790
|
start: deserializeU32(pos),
|
|
3753
3791
|
end: deserializeU32(pos + 4),
|
|
3754
3792
|
};
|
|
3755
|
-
node.key = deserializePropertyKey(pos +
|
|
3756
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3793
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
3794
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3757
3795
|
node.static = false;
|
|
3758
3796
|
return node;
|
|
3759
3797
|
}
|
|
@@ -3780,14 +3818,14 @@ function deserializeTSIndexSignature(pos) {
|
|
|
3780
3818
|
type: "TSIndexSignature",
|
|
3781
3819
|
parameters: null,
|
|
3782
3820
|
typeAnnotation: null,
|
|
3783
|
-
readonly: deserializeBool(pos +
|
|
3784
|
-
static: deserializeBool(pos +
|
|
3821
|
+
readonly: deserializeBool(pos + 12),
|
|
3822
|
+
static: deserializeBool(pos + 13),
|
|
3785
3823
|
accessibility: null,
|
|
3786
3824
|
start: deserializeU32(pos),
|
|
3787
3825
|
end: deserializeU32(pos + 4),
|
|
3788
3826
|
};
|
|
3789
|
-
node.parameters = deserializeVecTSIndexSignatureName(pos +
|
|
3790
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
3827
|
+
node.parameters = deserializeVecTSIndexSignatureName(pos + 16);
|
|
3828
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
3791
3829
|
return node;
|
|
3792
3830
|
}
|
|
3793
3831
|
|
|
@@ -3800,12 +3838,12 @@ function deserializeTSCallSignatureDeclaration(pos) {
|
|
|
3800
3838
|
start: deserializeU32(pos),
|
|
3801
3839
|
end: deserializeU32(pos + 4),
|
|
3802
3840
|
},
|
|
3803
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3804
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3841
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
3842
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
3805
3843
|
thisParam !== null && params.unshift(thisParam);
|
|
3806
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3844
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
3807
3845
|
node.params = params;
|
|
3808
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3846
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
3809
3847
|
return node;
|
|
3810
3848
|
}
|
|
3811
3849
|
|
|
@@ -3838,13 +3876,13 @@ function deserializeTSMethodSignature(pos) {
|
|
|
3838
3876
|
start: deserializeU32(pos),
|
|
3839
3877
|
end: deserializeU32(pos + 4),
|
|
3840
3878
|
},
|
|
3841
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3842
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3879
|
+
params = deserializeBoxFormalParameters(pos + 48),
|
|
3880
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 40);
|
|
3843
3881
|
thisParam !== null && params.unshift(thisParam);
|
|
3844
|
-
node.key = deserializePropertyKey(pos +
|
|
3845
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3882
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
3883
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 32);
|
|
3846
3884
|
node.params = params;
|
|
3847
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3885
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
3848
3886
|
node.readonly = false;
|
|
3849
3887
|
node.static = false;
|
|
3850
3888
|
return node;
|
|
@@ -3859,9 +3897,9 @@ function deserializeTSConstructSignatureDeclaration(pos) {
|
|
|
3859
3897
|
start: deserializeU32(pos),
|
|
3860
3898
|
end: deserializeU32(pos + 4),
|
|
3861
3899
|
};
|
|
3862
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3863
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
3864
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3900
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
3901
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
3902
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3865
3903
|
return node;
|
|
3866
3904
|
}
|
|
3867
3905
|
|
|
@@ -3869,7 +3907,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
3869
3907
|
let node = {
|
|
3870
3908
|
type: "Identifier",
|
|
3871
3909
|
decorators: null,
|
|
3872
|
-
name: deserializeStr(pos +
|
|
3910
|
+
name: deserializeStr(pos + 16),
|
|
3873
3911
|
optional: null,
|
|
3874
3912
|
typeAnnotation: null,
|
|
3875
3913
|
start: deserializeU32(pos),
|
|
@@ -3877,7 +3915,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
3877
3915
|
};
|
|
3878
3916
|
node.decorators = [];
|
|
3879
3917
|
node.optional = false;
|
|
3880
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
3918
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
3881
3919
|
return node;
|
|
3882
3920
|
}
|
|
3883
3921
|
|
|
@@ -3889,8 +3927,8 @@ function deserializeTSInterfaceHeritage(pos) {
|
|
|
3889
3927
|
start: deserializeU32(pos),
|
|
3890
3928
|
end: deserializeU32(pos + 4),
|
|
3891
3929
|
};
|
|
3892
|
-
node.expression = deserializeExpression(pos +
|
|
3893
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3930
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3931
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3894
3932
|
return node;
|
|
3895
3933
|
}
|
|
3896
3934
|
|
|
@@ -3898,13 +3936,13 @@ function deserializeTSTypePredicate(pos) {
|
|
|
3898
3936
|
let node = {
|
|
3899
3937
|
type: "TSTypePredicate",
|
|
3900
3938
|
parameterName: null,
|
|
3901
|
-
asserts: deserializeBool(pos +
|
|
3939
|
+
asserts: deserializeBool(pos + 12),
|
|
3902
3940
|
typeAnnotation: null,
|
|
3903
3941
|
start: deserializeU32(pos),
|
|
3904
3942
|
end: deserializeU32(pos + 4),
|
|
3905
3943
|
};
|
|
3906
|
-
node.parameterName = deserializeTSTypePredicateName(pos +
|
|
3907
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3944
|
+
node.parameterName = deserializeTSTypePredicateName(pos + 16);
|
|
3945
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
3908
3946
|
return node;
|
|
3909
3947
|
}
|
|
3910
3948
|
|
|
@@ -3925,7 +3963,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3925
3963
|
end = deserializeU32(pos + 4),
|
|
3926
3964
|
declare = deserializeBool(pos + 89),
|
|
3927
3965
|
node,
|
|
3928
|
-
body = deserializeOptionTSModuleDeclarationBody(pos +
|
|
3966
|
+
body = deserializeOptionTSModuleDeclarationBody(pos + 72);
|
|
3929
3967
|
if (body === null) {
|
|
3930
3968
|
node = {
|
|
3931
3969
|
type: "TSModuleDeclaration",
|
|
@@ -3936,7 +3974,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3936
3974
|
start,
|
|
3937
3975
|
end,
|
|
3938
3976
|
};
|
|
3939
|
-
node.id = deserializeTSModuleDeclarationName(pos +
|
|
3977
|
+
node.id = deserializeTSModuleDeclarationName(pos + 16);
|
|
3940
3978
|
} else {
|
|
3941
3979
|
node = {
|
|
3942
3980
|
type: "TSModuleDeclaration",
|
|
@@ -3948,7 +3986,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3948
3986
|
start,
|
|
3949
3987
|
end,
|
|
3950
3988
|
};
|
|
3951
|
-
let id = deserializeTSModuleDeclarationName(pos +
|
|
3989
|
+
let id = deserializeTSModuleDeclarationName(pos + 16);
|
|
3952
3990
|
if (body.type === "TSModuleBlock") node.id = id;
|
|
3953
3991
|
else {
|
|
3954
3992
|
let innerId = body.id;
|
|
@@ -4038,10 +4076,10 @@ function deserializeTSGlobalDeclaration(pos) {
|
|
|
4038
4076
|
name: "global",
|
|
4039
4077
|
optional: false,
|
|
4040
4078
|
typeAnnotation: null,
|
|
4041
|
-
start: deserializeU32(pos +
|
|
4042
|
-
end: deserializeU32(pos +
|
|
4079
|
+
start: deserializeU32(pos + 16),
|
|
4080
|
+
end: deserializeU32(pos + 20),
|
|
4043
4081
|
};
|
|
4044
|
-
node.body = deserializeTSModuleBlock(pos +
|
|
4082
|
+
node.body = deserializeTSModuleBlock(pos + 24);
|
|
4045
4083
|
node.kind = "global";
|
|
4046
4084
|
node.global = true;
|
|
4047
4085
|
return node;
|
|
@@ -4054,8 +4092,8 @@ function deserializeTSModuleBlock(pos) {
|
|
|
4054
4092
|
start: deserializeU32(pos),
|
|
4055
4093
|
end: deserializeU32(pos + 4),
|
|
4056
4094
|
},
|
|
4057
|
-
body = deserializeVecDirective(pos +
|
|
4058
|
-
body.push(...deserializeVecStatement(pos +
|
|
4095
|
+
body = deserializeVecDirective(pos + 16);
|
|
4096
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
4059
4097
|
node.body = body;
|
|
4060
4098
|
return node;
|
|
4061
4099
|
}
|
|
@@ -4067,7 +4105,7 @@ function deserializeTSTypeLiteral(pos) {
|
|
|
4067
4105
|
start: deserializeU32(pos),
|
|
4068
4106
|
end: deserializeU32(pos + 4),
|
|
4069
4107
|
};
|
|
4070
|
-
node.members = deserializeVecTSSignature(pos +
|
|
4108
|
+
node.members = deserializeVecTSSignature(pos + 16);
|
|
4071
4109
|
return node;
|
|
4072
4110
|
}
|
|
4073
4111
|
|
|
@@ -4078,7 +4116,7 @@ function deserializeTSInferType(pos) {
|
|
|
4078
4116
|
start: deserializeU32(pos),
|
|
4079
4117
|
end: deserializeU32(pos + 4),
|
|
4080
4118
|
};
|
|
4081
|
-
node.typeParameter = deserializeBoxTSTypeParameter(pos +
|
|
4119
|
+
node.typeParameter = deserializeBoxTSTypeParameter(pos + 16);
|
|
4082
4120
|
return node;
|
|
4083
4121
|
}
|
|
4084
4122
|
|
|
@@ -4090,8 +4128,8 @@ function deserializeTSTypeQuery(pos) {
|
|
|
4090
4128
|
start: deserializeU32(pos),
|
|
4091
4129
|
end: deserializeU32(pos + 4),
|
|
4092
4130
|
};
|
|
4093
|
-
node.exprName = deserializeTSTypeQueryExprName(pos +
|
|
4094
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4131
|
+
node.exprName = deserializeTSTypeQueryExprName(pos + 16);
|
|
4132
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4095
4133
|
return node;
|
|
4096
4134
|
}
|
|
4097
4135
|
|
|
@@ -4120,10 +4158,10 @@ function deserializeTSImportType(pos) {
|
|
|
4120
4158
|
start: deserializeU32(pos),
|
|
4121
4159
|
end: deserializeU32(pos + 4),
|
|
4122
4160
|
};
|
|
4123
|
-
node.source = deserializeStringLiteral(pos +
|
|
4124
|
-
node.options = deserializeOptionBoxObjectExpression(pos +
|
|
4125
|
-
node.qualifier = deserializeOptionTSImportTypeQualifier(pos +
|
|
4126
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4161
|
+
node.source = deserializeStringLiteral(pos + 16);
|
|
4162
|
+
node.options = deserializeOptionBoxObjectExpression(pos + 64);
|
|
4163
|
+
node.qualifier = deserializeOptionTSImportTypeQualifier(pos + 72);
|
|
4164
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 88);
|
|
4127
4165
|
return node;
|
|
4128
4166
|
}
|
|
4129
4167
|
|
|
@@ -4146,8 +4184,8 @@ function deserializeTSImportTypeQualifiedName(pos) {
|
|
|
4146
4184
|
start: deserializeU32(pos),
|
|
4147
4185
|
end: deserializeU32(pos + 4),
|
|
4148
4186
|
};
|
|
4149
|
-
node.left = deserializeTSImportTypeQualifier(pos +
|
|
4150
|
-
node.right = deserializeIdentifierName(pos +
|
|
4187
|
+
node.left = deserializeTSImportTypeQualifier(pos + 16);
|
|
4188
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
4151
4189
|
return node;
|
|
4152
4190
|
}
|
|
4153
4191
|
|
|
@@ -4160,12 +4198,12 @@ function deserializeTSFunctionType(pos) {
|
|
|
4160
4198
|
start: deserializeU32(pos),
|
|
4161
4199
|
end: deserializeU32(pos + 4),
|
|
4162
4200
|
},
|
|
4163
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4164
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4201
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
4202
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
4165
4203
|
thisParam !== null && params.unshift(thisParam);
|
|
4166
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4204
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4167
4205
|
node.params = params;
|
|
4168
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4206
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
4169
4207
|
return node;
|
|
4170
4208
|
}
|
|
4171
4209
|
|
|
@@ -4179,9 +4217,9 @@ function deserializeTSConstructorType(pos) {
|
|
|
4179
4217
|
start: deserializeU32(pos),
|
|
4180
4218
|
end: deserializeU32(pos + 4),
|
|
4181
4219
|
};
|
|
4182
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4183
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
4184
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4220
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4221
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4222
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4185
4223
|
return node;
|
|
4186
4224
|
}
|
|
4187
4225
|
|
|
@@ -4199,10 +4237,10 @@ function deserializeTSMappedType(pos) {
|
|
|
4199
4237
|
},
|
|
4200
4238
|
optional = deserializeOptionTSMappedTypeModifierOperator(pos + 96);
|
|
4201
4239
|
optional === null && (optional = false);
|
|
4202
|
-
node.key = deserializeBindingIdentifier(pos +
|
|
4203
|
-
node.constraint = deserializeTSType(pos +
|
|
4204
|
-
node.nameType = deserializeOptionTSType(pos +
|
|
4205
|
-
node.typeAnnotation = deserializeOptionTSType(pos +
|
|
4240
|
+
node.key = deserializeBindingIdentifier(pos + 16);
|
|
4241
|
+
node.constraint = deserializeTSType(pos + 48);
|
|
4242
|
+
node.nameType = deserializeOptionTSType(pos + 64);
|
|
4243
|
+
node.typeAnnotation = deserializeOptionTSType(pos + 80);
|
|
4206
4244
|
node.optional = optional;
|
|
4207
4245
|
return node;
|
|
4208
4246
|
}
|
|
@@ -4228,8 +4266,8 @@ function deserializeTSTemplateLiteralType(pos) {
|
|
|
4228
4266
|
start: deserializeU32(pos),
|
|
4229
4267
|
end: deserializeU32(pos + 4),
|
|
4230
4268
|
};
|
|
4231
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
4232
|
-
node.types = deserializeVecTSType(pos +
|
|
4269
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
4270
|
+
node.types = deserializeVecTSType(pos + 40);
|
|
4233
4271
|
return node;
|
|
4234
4272
|
}
|
|
4235
4273
|
|
|
@@ -4241,8 +4279,8 @@ function deserializeTSAsExpression(pos) {
|
|
|
4241
4279
|
start: deserializeU32(pos),
|
|
4242
4280
|
end: deserializeU32(pos + 4),
|
|
4243
4281
|
};
|
|
4244
|
-
node.expression = deserializeExpression(pos +
|
|
4245
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4282
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4283
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4246
4284
|
return node;
|
|
4247
4285
|
}
|
|
4248
4286
|
|
|
@@ -4254,8 +4292,8 @@ function deserializeTSSatisfiesExpression(pos) {
|
|
|
4254
4292
|
start: deserializeU32(pos),
|
|
4255
4293
|
end: deserializeU32(pos + 4),
|
|
4256
4294
|
};
|
|
4257
|
-
node.expression = deserializeExpression(pos +
|
|
4258
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4295
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4296
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4259
4297
|
return node;
|
|
4260
4298
|
}
|
|
4261
4299
|
|
|
@@ -4267,8 +4305,8 @@ function deserializeTSTypeAssertion(pos) {
|
|
|
4267
4305
|
start: deserializeU32(pos),
|
|
4268
4306
|
end: deserializeU32(pos + 4),
|
|
4269
4307
|
};
|
|
4270
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4271
|
-
node.expression = deserializeExpression(pos +
|
|
4308
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4309
|
+
node.expression = deserializeExpression(pos + 32);
|
|
4272
4310
|
return node;
|
|
4273
4311
|
}
|
|
4274
4312
|
|
|
@@ -4277,12 +4315,12 @@ function deserializeTSImportEqualsDeclaration(pos) {
|
|
|
4277
4315
|
type: "TSImportEqualsDeclaration",
|
|
4278
4316
|
id: null,
|
|
4279
4317
|
moduleReference: null,
|
|
4280
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
4318
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
4281
4319
|
start: deserializeU32(pos),
|
|
4282
4320
|
end: deserializeU32(pos + 4),
|
|
4283
4321
|
};
|
|
4284
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4285
|
-
node.moduleReference = deserializeTSModuleReference(pos +
|
|
4322
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4323
|
+
node.moduleReference = deserializeTSModuleReference(pos + 48);
|
|
4286
4324
|
return node;
|
|
4287
4325
|
}
|
|
4288
4326
|
|
|
@@ -4306,7 +4344,7 @@ function deserializeTSExternalModuleReference(pos) {
|
|
|
4306
4344
|
start: deserializeU32(pos),
|
|
4307
4345
|
end: deserializeU32(pos + 4),
|
|
4308
4346
|
};
|
|
4309
|
-
node.expression = deserializeStringLiteral(pos +
|
|
4347
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
4310
4348
|
return node;
|
|
4311
4349
|
}
|
|
4312
4350
|
|
|
@@ -4317,7 +4355,7 @@ function deserializeTSNonNullExpression(pos) {
|
|
|
4317
4355
|
start: deserializeU32(pos),
|
|
4318
4356
|
end: deserializeU32(pos + 4),
|
|
4319
4357
|
};
|
|
4320
|
-
node.expression = deserializeExpression(pos +
|
|
4358
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4321
4359
|
return node;
|
|
4322
4360
|
}
|
|
4323
4361
|
|
|
@@ -4328,7 +4366,7 @@ function deserializeDecorator(pos) {
|
|
|
4328
4366
|
start: deserializeU32(pos),
|
|
4329
4367
|
end: deserializeU32(pos + 4),
|
|
4330
4368
|
};
|
|
4331
|
-
node.expression = deserializeExpression(pos +
|
|
4369
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4332
4370
|
return node;
|
|
4333
4371
|
}
|
|
4334
4372
|
|
|
@@ -4339,7 +4377,7 @@ function deserializeTSExportAssignment(pos) {
|
|
|
4339
4377
|
start: deserializeU32(pos),
|
|
4340
4378
|
end: deserializeU32(pos + 4),
|
|
4341
4379
|
};
|
|
4342
|
-
node.expression = deserializeExpression(pos +
|
|
4380
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4343
4381
|
return node;
|
|
4344
4382
|
}
|
|
4345
4383
|
|
|
@@ -4350,7 +4388,7 @@ function deserializeTSNamespaceExportDeclaration(pos) {
|
|
|
4350
4388
|
start: deserializeU32(pos),
|
|
4351
4389
|
end: deserializeU32(pos + 4),
|
|
4352
4390
|
};
|
|
4353
|
-
node.id = deserializeIdentifierName(pos +
|
|
4391
|
+
node.id = deserializeIdentifierName(pos + 16);
|
|
4354
4392
|
return node;
|
|
4355
4393
|
}
|
|
4356
4394
|
|
|
@@ -4362,8 +4400,8 @@ function deserializeTSInstantiationExpression(pos) {
|
|
|
4362
4400
|
start: deserializeU32(pos),
|
|
4363
4401
|
end: deserializeU32(pos + 4),
|
|
4364
4402
|
};
|
|
4365
|
-
node.expression = deserializeExpression(pos +
|
|
4366
|
-
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos +
|
|
4403
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4404
|
+
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos + 32);
|
|
4367
4405
|
return node;
|
|
4368
4406
|
}
|
|
4369
4407
|
|
|
@@ -4382,11 +4420,11 @@ function deserializeJSDocNullableType(pos) {
|
|
|
4382
4420
|
let node = {
|
|
4383
4421
|
type: "TSJSDocNullableType",
|
|
4384
4422
|
typeAnnotation: null,
|
|
4385
|
-
postfix: deserializeBool(pos +
|
|
4423
|
+
postfix: deserializeBool(pos + 12),
|
|
4386
4424
|
start: deserializeU32(pos),
|
|
4387
4425
|
end: deserializeU32(pos + 4),
|
|
4388
4426
|
};
|
|
4389
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4427
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4390
4428
|
return node;
|
|
4391
4429
|
}
|
|
4392
4430
|
|
|
@@ -4394,11 +4432,11 @@ function deserializeJSDocNonNullableType(pos) {
|
|
|
4394
4432
|
let node = {
|
|
4395
4433
|
type: "TSJSDocNonNullableType",
|
|
4396
4434
|
typeAnnotation: null,
|
|
4397
|
-
postfix: deserializeBool(pos +
|
|
4435
|
+
postfix: deserializeBool(pos + 12),
|
|
4398
4436
|
start: deserializeU32(pos),
|
|
4399
4437
|
end: deserializeU32(pos + 4),
|
|
4400
4438
|
};
|
|
4401
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4439
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4402
4440
|
return node;
|
|
4403
4441
|
}
|
|
4404
4442
|
|
|
@@ -4435,6 +4473,26 @@ function deserializeComment(pos) {
|
|
|
4435
4473
|
};
|
|
4436
4474
|
}
|
|
4437
4475
|
|
|
4476
|
+
function deserializeModuleKind(pos) {
|
|
4477
|
+
switch (uint8[pos]) {
|
|
4478
|
+
case 0:
|
|
4479
|
+
return "script";
|
|
4480
|
+
case 1:
|
|
4481
|
+
return "module";
|
|
4482
|
+
case 3:
|
|
4483
|
+
return "commonjs";
|
|
4484
|
+
default:
|
|
4485
|
+
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
4486
|
+
}
|
|
4487
|
+
}
|
|
4488
|
+
|
|
4489
|
+
function deserializeSpan(pos) {
|
|
4490
|
+
return {
|
|
4491
|
+
start: deserializeU32(pos),
|
|
4492
|
+
end: deserializeU32(pos + 4),
|
|
4493
|
+
};
|
|
4494
|
+
}
|
|
4495
|
+
|
|
4438
4496
|
function deserializeNameSpan(pos) {
|
|
4439
4497
|
return {
|
|
4440
4498
|
value: deserializeStr(pos + 8),
|
|
@@ -4732,26 +4790,6 @@ function deserializeUpdateOperator(pos) {
|
|
|
4732
4790
|
}
|
|
4733
4791
|
}
|
|
4734
4792
|
|
|
4735
|
-
function deserializeSpan(pos) {
|
|
4736
|
-
return {
|
|
4737
|
-
start: deserializeU32(pos),
|
|
4738
|
-
end: deserializeU32(pos + 4),
|
|
4739
|
-
};
|
|
4740
|
-
}
|
|
4741
|
-
|
|
4742
|
-
function deserializeModuleKind(pos) {
|
|
4743
|
-
switch (uint8[pos]) {
|
|
4744
|
-
case 0:
|
|
4745
|
-
return "script";
|
|
4746
|
-
case 1:
|
|
4747
|
-
return "module";
|
|
4748
|
-
case 3:
|
|
4749
|
-
return "commonjs";
|
|
4750
|
-
default:
|
|
4751
|
-
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
4752
|
-
}
|
|
4753
|
-
}
|
|
4754
|
-
|
|
4755
4793
|
function deserializeRawTransferData(pos) {
|
|
4756
4794
|
return {
|
|
4757
4795
|
program: deserializeProgram(pos),
|
|
@@ -4819,36 +4857,32 @@ function deserializeStaticExport(pos) {
|
|
|
4819
4857
|
};
|
|
4820
4858
|
}
|
|
4821
4859
|
|
|
4822
|
-
function deserializeU32(pos) {
|
|
4823
|
-
return uint32[pos >> 2];
|
|
4824
|
-
}
|
|
4825
|
-
|
|
4826
|
-
function deserializeU8(pos) {
|
|
4827
|
-
return uint8[pos];
|
|
4828
|
-
}
|
|
4829
|
-
|
|
4830
4860
|
function deserializeStr(pos) {
|
|
4831
4861
|
let pos32 = pos >> 2,
|
|
4832
4862
|
len = uint32[pos32 + 2];
|
|
4833
4863
|
if (len === 0) return "";
|
|
4834
4864
|
pos = uint32[pos32];
|
|
4835
|
-
if (sourceIsAscii && pos < sourceEndPos) return sourceText.substr(pos, len);
|
|
4836
|
-
// Longer strings use `TextDecoder`
|
|
4837
|
-
// TODO: Find best switch-over point
|
|
4838
4865
|
let end = pos + len;
|
|
4839
|
-
if (
|
|
4840
|
-
//
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4866
|
+
if (end <= firstNonAsciiPos) return sourceTextLatin.substr(pos, len);
|
|
4867
|
+
// Use `utf8Slice` for strings longer than 64 bytes
|
|
4868
|
+
if (len > 64) return utf8Slice.call(uint8, pos, end);
|
|
4869
|
+
if (pos < sourceEndPos) {
|
|
4870
|
+
// Check if all bytes are ASCII, use `utf8Slice` if not
|
|
4871
|
+
for (let i = pos; i < end; i++) if (uint8[i] >= 128) return utf8Slice.call(uint8, pos, end);
|
|
4872
|
+
// String is all ASCII, so slice from `sourceTextLatin`
|
|
4873
|
+
return sourceTextLatin.substr(pos, len);
|
|
4874
|
+
}
|
|
4875
|
+
// String is not in source region - use `fromCharCode.apply` with a temp array of correct length.
|
|
4876
|
+
// Copy bytes into temp array.
|
|
4877
|
+
// If any byte is non-ASCII, use `utf8Slice`.
|
|
4878
|
+
let arr = stringDecodeArrays[len];
|
|
4879
|
+
for (let i = 0; i < len; i++) {
|
|
4880
|
+
let b = uint8[pos + i];
|
|
4881
|
+
if (b >= 128) return utf8Slice.call(uint8, pos, end);
|
|
4882
|
+
arr[i] = b;
|
|
4883
|
+
}
|
|
4884
|
+
// Call `fromCharCode` with temp array
|
|
4885
|
+
return fromCharCode.apply(null, arr);
|
|
4852
4886
|
}
|
|
4853
4887
|
|
|
4854
4888
|
function deserializeVecComment(pos) {
|
|
@@ -4864,8 +4898,9 @@ function deserializeVecComment(pos) {
|
|
|
4864
4898
|
}
|
|
4865
4899
|
|
|
4866
4900
|
function deserializeOptionHashbang(pos) {
|
|
4867
|
-
|
|
4868
|
-
|
|
4901
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
4902
|
+
? null
|
|
4903
|
+
: deserializeHashbang(pos);
|
|
4869
4904
|
}
|
|
4870
4905
|
|
|
4871
4906
|
function deserializeVecDirective(pos) {
|
|
@@ -5125,13 +5160,13 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
|
|
|
5125
5160
|
}
|
|
5126
5161
|
|
|
5127
5162
|
function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
|
|
5128
|
-
|
|
5129
|
-
|
|
5163
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5164
|
+
? null
|
|
5165
|
+
: deserializeBoxTSTypeParameterInstantiation(pos);
|
|
5130
5166
|
}
|
|
5131
5167
|
|
|
5132
5168
|
function deserializeOptionStr(pos) {
|
|
5133
|
-
|
|
5134
|
-
return deserializeStr(pos);
|
|
5169
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0 ? null : deserializeStr(pos);
|
|
5135
5170
|
}
|
|
5136
5171
|
|
|
5137
5172
|
function deserializeBoxComputedMemberExpression(pos) {
|
|
@@ -5167,8 +5202,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
|
|
|
5167
5202
|
}
|
|
5168
5203
|
|
|
5169
5204
|
function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
5170
|
-
|
|
5171
|
-
return deserializeAssignmentTargetMaybeDefault(pos);
|
|
5205
|
+
return uint8[pos] === 51 ? null : deserializeAssignmentTargetMaybeDefault(pos);
|
|
5172
5206
|
}
|
|
5173
5207
|
|
|
5174
5208
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
@@ -5188,8 +5222,9 @@ function deserializeBoxAssignmentTargetRest(pos) {
|
|
|
5188
5222
|
}
|
|
5189
5223
|
|
|
5190
5224
|
function deserializeOptionBoxAssignmentTargetRest(pos) {
|
|
5191
|
-
|
|
5192
|
-
|
|
5225
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5226
|
+
? null
|
|
5227
|
+
: deserializeBoxAssignmentTargetRest(pos);
|
|
5193
5228
|
}
|
|
5194
5229
|
|
|
5195
5230
|
function deserializeVecAssignmentTargetProperty(pos) {
|
|
@@ -5217,8 +5252,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
|
|
|
5217
5252
|
}
|
|
5218
5253
|
|
|
5219
5254
|
function deserializeOptionExpression(pos) {
|
|
5220
|
-
|
|
5221
|
-
return deserializeExpression(pos);
|
|
5255
|
+
return uint8[pos] === 51 ? null : deserializeExpression(pos);
|
|
5222
5256
|
}
|
|
5223
5257
|
|
|
5224
5258
|
function deserializeBoxBlockStatement(pos) {
|
|
@@ -5338,23 +5372,23 @@ function deserializeBoxTSTypeAnnotation(pos) {
|
|
|
5338
5372
|
}
|
|
5339
5373
|
|
|
5340
5374
|
function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
5341
|
-
|
|
5342
|
-
|
|
5375
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5376
|
+
? null
|
|
5377
|
+
: deserializeBoxTSTypeAnnotation(pos);
|
|
5343
5378
|
}
|
|
5344
5379
|
|
|
5345
5380
|
function deserializeOptionStatement(pos) {
|
|
5346
|
-
|
|
5347
|
-
return deserializeStatement(pos);
|
|
5381
|
+
return uint8[pos] === 70 ? null : deserializeStatement(pos);
|
|
5348
5382
|
}
|
|
5349
5383
|
|
|
5350
5384
|
function deserializeOptionForStatementInit(pos) {
|
|
5351
|
-
|
|
5352
|
-
return deserializeForStatementInit(pos);
|
|
5385
|
+
return uint8[pos] === 65 ? null : deserializeForStatementInit(pos);
|
|
5353
5386
|
}
|
|
5354
5387
|
|
|
5355
5388
|
function deserializeOptionLabelIdentifier(pos) {
|
|
5356
|
-
|
|
5357
|
-
|
|
5389
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5390
|
+
? null
|
|
5391
|
+
: deserializeLabelIdentifier(pos);
|
|
5358
5392
|
}
|
|
5359
5393
|
|
|
5360
5394
|
function deserializeVecSwitchCase(pos) {
|
|
@@ -5374,18 +5408,19 @@ function deserializeBoxCatchClause(pos) {
|
|
|
5374
5408
|
}
|
|
5375
5409
|
|
|
5376
5410
|
function deserializeOptionBoxCatchClause(pos) {
|
|
5377
|
-
|
|
5378
|
-
|
|
5411
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5412
|
+
? null
|
|
5413
|
+
: deserializeBoxCatchClause(pos);
|
|
5379
5414
|
}
|
|
5380
5415
|
|
|
5381
5416
|
function deserializeOptionBoxBlockStatement(pos) {
|
|
5382
|
-
|
|
5383
|
-
|
|
5417
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5418
|
+
? null
|
|
5419
|
+
: deserializeBoxBlockStatement(pos);
|
|
5384
5420
|
}
|
|
5385
5421
|
|
|
5386
5422
|
function deserializeOptionCatchParameter(pos) {
|
|
5387
|
-
|
|
5388
|
-
return deserializeCatchParameter(pos);
|
|
5423
|
+
return uint8[pos + 16] === 4 ? null : deserializeCatchParameter(pos);
|
|
5389
5424
|
}
|
|
5390
5425
|
|
|
5391
5426
|
function deserializeBoxBindingIdentifier(pos) {
|
|
@@ -5421,13 +5456,13 @@ function deserializeBoxBindingRestElement(pos) {
|
|
|
5421
5456
|
}
|
|
5422
5457
|
|
|
5423
5458
|
function deserializeOptionBoxBindingRestElement(pos) {
|
|
5424
|
-
|
|
5425
|
-
|
|
5459
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5460
|
+
? null
|
|
5461
|
+
: deserializeBoxBindingRestElement(pos);
|
|
5426
5462
|
}
|
|
5427
5463
|
|
|
5428
5464
|
function deserializeOptionBindingPattern(pos) {
|
|
5429
|
-
|
|
5430
|
-
return deserializeBindingPattern(pos);
|
|
5465
|
+
return uint8[pos] === 4 ? null : deserializeBindingPattern(pos);
|
|
5431
5466
|
}
|
|
5432
5467
|
|
|
5433
5468
|
function deserializeVecOptionBindingPattern(pos) {
|
|
@@ -5443,8 +5478,9 @@ function deserializeVecOptionBindingPattern(pos) {
|
|
|
5443
5478
|
}
|
|
5444
5479
|
|
|
5445
5480
|
function deserializeOptionBindingIdentifier(pos) {
|
|
5446
|
-
|
|
5447
|
-
|
|
5481
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5482
|
+
? null
|
|
5483
|
+
: deserializeBindingIdentifier(pos);
|
|
5448
5484
|
}
|
|
5449
5485
|
|
|
5450
5486
|
function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
@@ -5452,8 +5488,9 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
|
5452
5488
|
}
|
|
5453
5489
|
|
|
5454
5490
|
function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
|
|
5455
|
-
|
|
5456
|
-
|
|
5491
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5492
|
+
? null
|
|
5493
|
+
: deserializeBoxTSTypeParameterDeclaration(pos);
|
|
5457
5494
|
}
|
|
5458
5495
|
|
|
5459
5496
|
function deserializeBoxTSThisParameter(pos) {
|
|
@@ -5461,8 +5498,9 @@ function deserializeBoxTSThisParameter(pos) {
|
|
|
5461
5498
|
}
|
|
5462
5499
|
|
|
5463
5500
|
function deserializeOptionBoxTSThisParameter(pos) {
|
|
5464
|
-
|
|
5465
|
-
|
|
5501
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5502
|
+
? null
|
|
5503
|
+
: deserializeBoxTSThisParameter(pos);
|
|
5466
5504
|
}
|
|
5467
5505
|
|
|
5468
5506
|
function deserializeBoxFormalParameters(pos) {
|
|
@@ -5474,8 +5512,9 @@ function deserializeBoxFunctionBody(pos) {
|
|
|
5474
5512
|
}
|
|
5475
5513
|
|
|
5476
5514
|
function deserializeOptionBoxFunctionBody(pos) {
|
|
5477
|
-
|
|
5478
|
-
|
|
5515
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5516
|
+
? null
|
|
5517
|
+
: deserializeBoxFunctionBody(pos);
|
|
5479
5518
|
}
|
|
5480
5519
|
|
|
5481
5520
|
function deserializeVecFormalParameter(pos) {
|
|
@@ -5507,13 +5546,13 @@ function deserializeBoxExpression(pos) {
|
|
|
5507
5546
|
}
|
|
5508
5547
|
|
|
5509
5548
|
function deserializeOptionBoxExpression(pos) {
|
|
5510
|
-
|
|
5511
|
-
|
|
5549
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5550
|
+
? null
|
|
5551
|
+
: deserializeBoxExpression(pos);
|
|
5512
5552
|
}
|
|
5513
5553
|
|
|
5514
5554
|
function deserializeOptionTSAccessibility(pos) {
|
|
5515
|
-
|
|
5516
|
-
return deserializeTSAccessibility(pos);
|
|
5555
|
+
return uint8[pos] === 3 ? null : deserializeTSAccessibility(pos);
|
|
5517
5556
|
}
|
|
5518
5557
|
|
|
5519
5558
|
function deserializeVecTSClassImplements(pos) {
|
|
@@ -5589,8 +5628,7 @@ function deserializeBoxTSNamespaceExportDeclaration(pos) {
|
|
|
5589
5628
|
}
|
|
5590
5629
|
|
|
5591
5630
|
function deserializeOptionImportPhase(pos) {
|
|
5592
|
-
|
|
5593
|
-
return deserializeImportPhase(pos);
|
|
5631
|
+
return uint8[pos] === 2 ? null : deserializeImportPhase(pos);
|
|
5594
5632
|
}
|
|
5595
5633
|
|
|
5596
5634
|
function deserializeVecImportDeclarationSpecifier(pos) {
|
|
@@ -5606,8 +5644,9 @@ function deserializeVecImportDeclarationSpecifier(pos) {
|
|
|
5606
5644
|
}
|
|
5607
5645
|
|
|
5608
5646
|
function deserializeOptionVecImportDeclarationSpecifier(pos) {
|
|
5609
|
-
|
|
5610
|
-
|
|
5647
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5648
|
+
? null
|
|
5649
|
+
: deserializeVecImportDeclarationSpecifier(pos);
|
|
5611
5650
|
}
|
|
5612
5651
|
|
|
5613
5652
|
function deserializeBoxWithClause(pos) {
|
|
@@ -5615,8 +5654,9 @@ function deserializeBoxWithClause(pos) {
|
|
|
5615
5654
|
}
|
|
5616
5655
|
|
|
5617
5656
|
function deserializeOptionBoxWithClause(pos) {
|
|
5618
|
-
|
|
5619
|
-
|
|
5657
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5658
|
+
? null
|
|
5659
|
+
: deserializeBoxWithClause(pos);
|
|
5620
5660
|
}
|
|
5621
5661
|
|
|
5622
5662
|
function deserializeBoxImportSpecifier(pos) {
|
|
@@ -5644,8 +5684,7 @@ function deserializeVecImportAttribute(pos) {
|
|
|
5644
5684
|
}
|
|
5645
5685
|
|
|
5646
5686
|
function deserializeOptionDeclaration(pos) {
|
|
5647
|
-
|
|
5648
|
-
return deserializeDeclaration(pos);
|
|
5687
|
+
return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
|
|
5649
5688
|
}
|
|
5650
5689
|
|
|
5651
5690
|
function deserializeVecExportSpecifier(pos) {
|
|
@@ -5661,19 +5700,21 @@ function deserializeVecExportSpecifier(pos) {
|
|
|
5661
5700
|
}
|
|
5662
5701
|
|
|
5663
5702
|
function deserializeOptionStringLiteral(pos) {
|
|
5664
|
-
|
|
5665
|
-
return deserializeStringLiteral(pos);
|
|
5703
|
+
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
5666
5704
|
}
|
|
5667
5705
|
|
|
5668
5706
|
function deserializeOptionModuleExportName(pos) {
|
|
5669
|
-
|
|
5670
|
-
return deserializeModuleExportName(pos);
|
|
5707
|
+
return uint8[pos] === 3 ? null : deserializeModuleExportName(pos);
|
|
5671
5708
|
}
|
|
5672
5709
|
|
|
5673
5710
|
function deserializeF64(pos) {
|
|
5674
5711
|
return float64[pos >> 3];
|
|
5675
5712
|
}
|
|
5676
5713
|
|
|
5714
|
+
function deserializeU8(pos) {
|
|
5715
|
+
return uint8[pos];
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5677
5718
|
function deserializeBoxJSXOpeningElement(pos) {
|
|
5678
5719
|
return deserializeJSXOpeningElement(uint32[pos >> 2]);
|
|
5679
5720
|
}
|
|
@@ -5695,8 +5736,9 @@ function deserializeBoxJSXClosingElement(pos) {
|
|
|
5695
5736
|
}
|
|
5696
5737
|
|
|
5697
5738
|
function deserializeOptionBoxJSXClosingElement(pos) {
|
|
5698
|
-
|
|
5699
|
-
|
|
5739
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5740
|
+
? null
|
|
5741
|
+
: deserializeBoxJSXClosingElement(pos);
|
|
5700
5742
|
}
|
|
5701
5743
|
|
|
5702
5744
|
function deserializeVecJSXAttributeItem(pos) {
|
|
@@ -5732,8 +5774,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
|
|
|
5732
5774
|
}
|
|
5733
5775
|
|
|
5734
5776
|
function deserializeOptionJSXAttributeValue(pos) {
|
|
5735
|
-
|
|
5736
|
-
return deserializeJSXAttributeValue(pos);
|
|
5777
|
+
return uint8[pos] === 4 ? null : deserializeJSXAttributeValue(pos);
|
|
5737
5778
|
}
|
|
5738
5779
|
|
|
5739
5780
|
function deserializeBoxJSXExpressionContainer(pos) {
|
|
@@ -5945,8 +5986,7 @@ function deserializeBoxTSQualifiedName(pos) {
|
|
|
5945
5986
|
}
|
|
5946
5987
|
|
|
5947
5988
|
function deserializeOptionTSType(pos) {
|
|
5948
|
-
|
|
5949
|
-
return deserializeTSType(pos);
|
|
5989
|
+
return uint8[pos] === 38 ? null : deserializeTSType(pos);
|
|
5950
5990
|
}
|
|
5951
5991
|
|
|
5952
5992
|
function deserializeVecTSTypeParameter(pos) {
|
|
@@ -6018,8 +6058,7 @@ function deserializeVecTSIndexSignatureName(pos) {
|
|
|
6018
6058
|
}
|
|
6019
6059
|
|
|
6020
6060
|
function deserializeOptionTSModuleDeclarationBody(pos) {
|
|
6021
|
-
|
|
6022
|
-
return deserializeTSModuleDeclarationBody(pos);
|
|
6061
|
+
return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
|
|
6023
6062
|
}
|
|
6024
6063
|
|
|
6025
6064
|
function deserializeBoxTSModuleBlock(pos) {
|
|
@@ -6031,13 +6070,13 @@ function deserializeBoxTSTypeParameter(pos) {
|
|
|
6031
6070
|
}
|
|
6032
6071
|
|
|
6033
6072
|
function deserializeOptionBoxObjectExpression(pos) {
|
|
6034
|
-
|
|
6035
|
-
|
|
6073
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6074
|
+
? null
|
|
6075
|
+
: deserializeBoxObjectExpression(pos);
|
|
6036
6076
|
}
|
|
6037
6077
|
|
|
6038
6078
|
function deserializeOptionTSImportTypeQualifier(pos) {
|
|
6039
|
-
|
|
6040
|
-
return deserializeTSImportTypeQualifier(pos);
|
|
6079
|
+
return uint8[pos] === 2 ? null : deserializeTSImportTypeQualifier(pos);
|
|
6041
6080
|
}
|
|
6042
6081
|
|
|
6043
6082
|
function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
@@ -6045,17 +6084,21 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
|
6045
6084
|
}
|
|
6046
6085
|
|
|
6047
6086
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
6048
|
-
|
|
6049
|
-
return deserializeTSMappedTypeModifierOperator(pos);
|
|
6087
|
+
return uint8[pos] === 3 ? null : deserializeTSMappedTypeModifierOperator(pos);
|
|
6050
6088
|
}
|
|
6051
6089
|
|
|
6052
6090
|
function deserializeBoxTSExternalModuleReference(pos) {
|
|
6053
6091
|
return deserializeTSExternalModuleReference(uint32[pos >> 2]);
|
|
6054
6092
|
}
|
|
6055
6093
|
|
|
6094
|
+
function deserializeU32(pos) {
|
|
6095
|
+
return uint32[pos >> 2];
|
|
6096
|
+
}
|
|
6097
|
+
|
|
6056
6098
|
function deserializeOptionNameSpan(pos) {
|
|
6057
|
-
|
|
6058
|
-
|
|
6099
|
+
return uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0
|
|
6100
|
+
? null
|
|
6101
|
+
: deserializeNameSpan(pos);
|
|
6059
6102
|
}
|
|
6060
6103
|
|
|
6061
6104
|
function deserializeVecError(pos) {
|