oxc-parser 0.121.0 → 0.123.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 +25 -25
- package/src-js/bindings.js +52 -52
- package/src-js/generated/constants.js +12 -4
- package/src-js/generated/deserialize/js.js +391 -395
- package/src-js/generated/deserialize/js_range.js +400 -404
- package/src-js/generated/deserialize/ts.js +446 -448
- package/src-js/generated/deserialize/ts_range.js +447 -452
- package/src-js/generated/lazy/constructors.js +462 -474
- package/src-js/generated/lazy/walk.js +285 -285
|
@@ -38,9 +38,9 @@ function deserializeProgram(pos) {
|
|
|
38
38
|
start: 0,
|
|
39
39
|
end,
|
|
40
40
|
};
|
|
41
|
-
program.hashbang = deserializeOptionHashbang(pos +
|
|
42
|
-
let body = (program.body = deserializeVecDirective(pos +
|
|
43
|
-
body.push(...deserializeVecStatement(pos +
|
|
41
|
+
program.hashbang = deserializeOptionHashbang(pos + 56);
|
|
42
|
+
let body = (program.body = deserializeVecDirective(pos + 88));
|
|
43
|
+
body.push(...deserializeVecStatement(pos + 112));
|
|
44
44
|
{
|
|
45
45
|
let start;
|
|
46
46
|
if (body.length > 0) {
|
|
@@ -160,7 +160,7 @@ function deserializeIdentifierName(pos) {
|
|
|
160
160
|
let node = {
|
|
161
161
|
type: "Identifier",
|
|
162
162
|
decorators: null,
|
|
163
|
-
name: deserializeStr(pos +
|
|
163
|
+
name: deserializeStr(pos + 16),
|
|
164
164
|
optional: null,
|
|
165
165
|
typeAnnotation: null,
|
|
166
166
|
start: deserializeU32(pos),
|
|
@@ -175,7 +175,7 @@ function deserializeIdentifierReference(pos) {
|
|
|
175
175
|
let node = {
|
|
176
176
|
type: "Identifier",
|
|
177
177
|
decorators: null,
|
|
178
|
-
name: deserializeStr(pos +
|
|
178
|
+
name: deserializeStr(pos + 16),
|
|
179
179
|
optional: null,
|
|
180
180
|
typeAnnotation: null,
|
|
181
181
|
start: deserializeU32(pos),
|
|
@@ -190,7 +190,7 @@ function deserializeBindingIdentifier(pos) {
|
|
|
190
190
|
let node = {
|
|
191
191
|
type: "Identifier",
|
|
192
192
|
decorators: null,
|
|
193
|
-
name: deserializeStr(pos +
|
|
193
|
+
name: deserializeStr(pos + 16),
|
|
194
194
|
optional: null,
|
|
195
195
|
typeAnnotation: null,
|
|
196
196
|
start: deserializeU32(pos),
|
|
@@ -205,7 +205,7 @@ function deserializeLabelIdentifier(pos) {
|
|
|
205
205
|
let node = {
|
|
206
206
|
type: "Identifier",
|
|
207
207
|
decorators: null,
|
|
208
|
-
name: deserializeStr(pos +
|
|
208
|
+
name: deserializeStr(pos + 16),
|
|
209
209
|
optional: null,
|
|
210
210
|
typeAnnotation: null,
|
|
211
211
|
start: deserializeU32(pos),
|
|
@@ -231,7 +231,7 @@ function deserializeArrayExpression(pos) {
|
|
|
231
231
|
start: deserializeU32(pos),
|
|
232
232
|
end: deserializeU32(pos + 4),
|
|
233
233
|
};
|
|
234
|
-
node.elements = deserializeVecArrayExpressionElement(pos +
|
|
234
|
+
node.elements = deserializeVecArrayExpressionElement(pos + 16);
|
|
235
235
|
return node;
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -343,7 +343,7 @@ function deserializeObjectExpression(pos) {
|
|
|
343
343
|
start: deserializeU32(pos),
|
|
344
344
|
end: deserializeU32(pos + 4),
|
|
345
345
|
};
|
|
346
|
-
node.properties = deserializeVecObjectPropertyKind(pos +
|
|
346
|
+
node.properties = deserializeVecObjectPropertyKind(pos + 16);
|
|
347
347
|
return node;
|
|
348
348
|
}
|
|
349
349
|
|
|
@@ -361,18 +361,18 @@ function deserializeObjectPropertyKind(pos) {
|
|
|
361
361
|
function deserializeObjectProperty(pos) {
|
|
362
362
|
let node = {
|
|
363
363
|
type: "Property",
|
|
364
|
-
kind: deserializePropertyKind(pos +
|
|
364
|
+
kind: deserializePropertyKind(pos + 12),
|
|
365
365
|
key: null,
|
|
366
366
|
value: null,
|
|
367
|
-
method: deserializeBool(pos +
|
|
368
|
-
shorthand: deserializeBool(pos +
|
|
369
|
-
computed: deserializeBool(pos +
|
|
367
|
+
method: deserializeBool(pos + 13),
|
|
368
|
+
shorthand: deserializeBool(pos + 14),
|
|
369
|
+
computed: deserializeBool(pos + 15),
|
|
370
370
|
optional: null,
|
|
371
371
|
start: deserializeU32(pos),
|
|
372
372
|
end: deserializeU32(pos + 4),
|
|
373
373
|
};
|
|
374
|
-
node.key = deserializePropertyKey(pos +
|
|
375
|
-
node.value = deserializeExpression(pos +
|
|
374
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
375
|
+
node.value = deserializeExpression(pos + 32);
|
|
376
376
|
node.optional = false;
|
|
377
377
|
return node;
|
|
378
378
|
}
|
|
@@ -495,8 +495,8 @@ function deserializeTemplateLiteral(pos) {
|
|
|
495
495
|
start: deserializeU32(pos),
|
|
496
496
|
end: deserializeU32(pos + 4),
|
|
497
497
|
};
|
|
498
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
499
|
-
node.expressions = deserializeVecExpression(pos +
|
|
498
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
499
|
+
node.expressions = deserializeVecExpression(pos + 40);
|
|
500
500
|
return node;
|
|
501
501
|
}
|
|
502
502
|
|
|
@@ -509,19 +509,19 @@ function deserializeTaggedTemplateExpression(pos) {
|
|
|
509
509
|
start: deserializeU32(pos),
|
|
510
510
|
end: deserializeU32(pos + 4),
|
|
511
511
|
};
|
|
512
|
-
node.tag = deserializeExpression(pos +
|
|
513
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
514
|
-
node.quasi = deserializeTemplateLiteral(pos +
|
|
512
|
+
node.tag = deserializeExpression(pos + 16);
|
|
513
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
514
|
+
node.quasi = deserializeTemplateLiteral(pos + 40);
|
|
515
515
|
return node;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
function deserializeTemplateElement(pos) {
|
|
519
|
-
let tail = deserializeBool(pos +
|
|
519
|
+
let tail = deserializeBool(pos + 12),
|
|
520
520
|
start = deserializeU32(pos) - 1,
|
|
521
521
|
end = deserializeU32(pos + 4) + 2 - tail,
|
|
522
|
-
value = deserializeTemplateElementValue(pos +
|
|
522
|
+
value = deserializeTemplateElementValue(pos + 16);
|
|
523
523
|
value.cooked !== null &&
|
|
524
|
-
deserializeBool(pos +
|
|
524
|
+
deserializeBool(pos + 13) &&
|
|
525
525
|
(value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) =>
|
|
526
526
|
String.fromCodePoint(parseInt(hex, 16)),
|
|
527
527
|
));
|
|
@@ -546,13 +546,13 @@ function deserializeComputedMemberExpression(pos) {
|
|
|
546
546
|
type: "MemberExpression",
|
|
547
547
|
object: null,
|
|
548
548
|
property: null,
|
|
549
|
-
optional: deserializeBool(pos +
|
|
549
|
+
optional: deserializeBool(pos + 12),
|
|
550
550
|
computed: null,
|
|
551
551
|
start: deserializeU32(pos),
|
|
552
552
|
end: deserializeU32(pos + 4),
|
|
553
553
|
};
|
|
554
|
-
node.object = deserializeExpression(pos +
|
|
555
|
-
node.property = deserializeExpression(pos +
|
|
554
|
+
node.object = deserializeExpression(pos + 16);
|
|
555
|
+
node.property = deserializeExpression(pos + 32);
|
|
556
556
|
node.computed = true;
|
|
557
557
|
return node;
|
|
558
558
|
}
|
|
@@ -562,13 +562,13 @@ function deserializeStaticMemberExpression(pos) {
|
|
|
562
562
|
type: "MemberExpression",
|
|
563
563
|
object: null,
|
|
564
564
|
property: null,
|
|
565
|
-
optional: deserializeBool(pos +
|
|
565
|
+
optional: deserializeBool(pos + 12),
|
|
566
566
|
computed: null,
|
|
567
567
|
start: deserializeU32(pos),
|
|
568
568
|
end: deserializeU32(pos + 4),
|
|
569
569
|
};
|
|
570
|
-
node.object = deserializeExpression(pos +
|
|
571
|
-
node.property = deserializeIdentifierName(pos +
|
|
570
|
+
node.object = deserializeExpression(pos + 16);
|
|
571
|
+
node.property = deserializeIdentifierName(pos + 32);
|
|
572
572
|
node.computed = false;
|
|
573
573
|
return node;
|
|
574
574
|
}
|
|
@@ -578,13 +578,13 @@ function deserializePrivateFieldExpression(pos) {
|
|
|
578
578
|
type: "MemberExpression",
|
|
579
579
|
object: null,
|
|
580
580
|
property: null,
|
|
581
|
-
optional: deserializeBool(pos +
|
|
581
|
+
optional: deserializeBool(pos + 12),
|
|
582
582
|
computed: null,
|
|
583
583
|
start: deserializeU32(pos),
|
|
584
584
|
end: deserializeU32(pos + 4),
|
|
585
585
|
};
|
|
586
|
-
node.object = deserializeExpression(pos +
|
|
587
|
-
node.property = deserializePrivateIdentifier(pos +
|
|
586
|
+
node.object = deserializeExpression(pos + 16);
|
|
587
|
+
node.property = deserializePrivateIdentifier(pos + 32);
|
|
588
588
|
node.computed = false;
|
|
589
589
|
return node;
|
|
590
590
|
}
|
|
@@ -595,13 +595,13 @@ function deserializeCallExpression(pos) {
|
|
|
595
595
|
callee: null,
|
|
596
596
|
typeArguments: null,
|
|
597
597
|
arguments: null,
|
|
598
|
-
optional: deserializeBool(pos +
|
|
598
|
+
optional: deserializeBool(pos + 12),
|
|
599
599
|
start: deserializeU32(pos),
|
|
600
600
|
end: deserializeU32(pos + 4),
|
|
601
601
|
};
|
|
602
|
-
node.callee = deserializeExpression(pos +
|
|
603
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
604
|
-
node.arguments = deserializeVecArgument(pos +
|
|
602
|
+
node.callee = deserializeExpression(pos + 16);
|
|
603
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
604
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
605
605
|
return node;
|
|
606
606
|
}
|
|
607
607
|
|
|
@@ -614,9 +614,9 @@ function deserializeNewExpression(pos) {
|
|
|
614
614
|
start: deserializeU32(pos),
|
|
615
615
|
end: deserializeU32(pos + 4),
|
|
616
616
|
};
|
|
617
|
-
node.callee = deserializeExpression(pos +
|
|
618
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
619
|
-
node.arguments = deserializeVecArgument(pos +
|
|
617
|
+
node.callee = deserializeExpression(pos + 16);
|
|
618
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
619
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
620
620
|
return node;
|
|
621
621
|
}
|
|
622
622
|
|
|
@@ -628,8 +628,8 @@ function deserializeMetaProperty(pos) {
|
|
|
628
628
|
start: deserializeU32(pos),
|
|
629
629
|
end: deserializeU32(pos + 4),
|
|
630
630
|
};
|
|
631
|
-
node.meta = deserializeIdentifierName(pos +
|
|
632
|
-
node.property = deserializeIdentifierName(pos +
|
|
631
|
+
node.meta = deserializeIdentifierName(pos + 16);
|
|
632
|
+
node.property = deserializeIdentifierName(pos + 48);
|
|
633
633
|
return node;
|
|
634
634
|
}
|
|
635
635
|
|
|
@@ -640,7 +640,7 @@ function deserializeSpreadElement(pos) {
|
|
|
640
640
|
start: deserializeU32(pos),
|
|
641
641
|
end: deserializeU32(pos + 4),
|
|
642
642
|
};
|
|
643
|
-
node.argument = deserializeExpression(pos +
|
|
643
|
+
node.argument = deserializeExpression(pos + 16);
|
|
644
644
|
return node;
|
|
645
645
|
}
|
|
646
646
|
|
|
@@ -742,26 +742,26 @@ function deserializeArgument(pos) {
|
|
|
742
742
|
function deserializeUpdateExpression(pos) {
|
|
743
743
|
let node = {
|
|
744
744
|
type: "UpdateExpression",
|
|
745
|
-
operator: deserializeUpdateOperator(pos +
|
|
746
|
-
prefix: deserializeBool(pos +
|
|
745
|
+
operator: deserializeUpdateOperator(pos + 12),
|
|
746
|
+
prefix: deserializeBool(pos + 13),
|
|
747
747
|
argument: null,
|
|
748
748
|
start: deserializeU32(pos),
|
|
749
749
|
end: deserializeU32(pos + 4),
|
|
750
750
|
};
|
|
751
|
-
node.argument = deserializeSimpleAssignmentTarget(pos +
|
|
751
|
+
node.argument = deserializeSimpleAssignmentTarget(pos + 16);
|
|
752
752
|
return node;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
function deserializeUnaryExpression(pos) {
|
|
756
756
|
let node = {
|
|
757
757
|
type: "UnaryExpression",
|
|
758
|
-
operator: deserializeUnaryOperator(pos +
|
|
758
|
+
operator: deserializeUnaryOperator(pos + 12),
|
|
759
759
|
argument: null,
|
|
760
760
|
prefix: null,
|
|
761
761
|
start: deserializeU32(pos),
|
|
762
762
|
end: deserializeU32(pos + 4),
|
|
763
763
|
};
|
|
764
|
-
node.argument = deserializeExpression(pos +
|
|
764
|
+
node.argument = deserializeExpression(pos + 16);
|
|
765
765
|
node.prefix = true;
|
|
766
766
|
return node;
|
|
767
767
|
}
|
|
@@ -770,13 +770,13 @@ function deserializeBinaryExpression(pos) {
|
|
|
770
770
|
let node = {
|
|
771
771
|
type: "BinaryExpression",
|
|
772
772
|
left: null,
|
|
773
|
-
operator: deserializeBinaryOperator(pos +
|
|
773
|
+
operator: deserializeBinaryOperator(pos + 12),
|
|
774
774
|
right: null,
|
|
775
775
|
start: deserializeU32(pos),
|
|
776
776
|
end: deserializeU32(pos + 4),
|
|
777
777
|
};
|
|
778
|
-
node.left = deserializeExpression(pos +
|
|
779
|
-
node.right = deserializeExpression(pos +
|
|
778
|
+
node.left = deserializeExpression(pos + 16);
|
|
779
|
+
node.right = deserializeExpression(pos + 32);
|
|
780
780
|
return node;
|
|
781
781
|
}
|
|
782
782
|
|
|
@@ -789,9 +789,9 @@ function deserializePrivateInExpression(pos) {
|
|
|
789
789
|
start: deserializeU32(pos),
|
|
790
790
|
end: deserializeU32(pos + 4),
|
|
791
791
|
};
|
|
792
|
-
node.left = deserializePrivateIdentifier(pos +
|
|
792
|
+
node.left = deserializePrivateIdentifier(pos + 16);
|
|
793
793
|
node.operator = "in";
|
|
794
|
-
node.right = deserializeExpression(pos +
|
|
794
|
+
node.right = deserializeExpression(pos + 48);
|
|
795
795
|
return node;
|
|
796
796
|
}
|
|
797
797
|
|
|
@@ -799,13 +799,13 @@ function deserializeLogicalExpression(pos) {
|
|
|
799
799
|
let node = {
|
|
800
800
|
type: "LogicalExpression",
|
|
801
801
|
left: null,
|
|
802
|
-
operator: deserializeLogicalOperator(pos +
|
|
802
|
+
operator: deserializeLogicalOperator(pos + 12),
|
|
803
803
|
right: null,
|
|
804
804
|
start: deserializeU32(pos),
|
|
805
805
|
end: deserializeU32(pos + 4),
|
|
806
806
|
};
|
|
807
|
-
node.left = deserializeExpression(pos +
|
|
808
|
-
node.right = deserializeExpression(pos +
|
|
807
|
+
node.left = deserializeExpression(pos + 16);
|
|
808
|
+
node.right = deserializeExpression(pos + 32);
|
|
809
809
|
return node;
|
|
810
810
|
}
|
|
811
811
|
|
|
@@ -818,23 +818,23 @@ function deserializeConditionalExpression(pos) {
|
|
|
818
818
|
start: deserializeU32(pos),
|
|
819
819
|
end: deserializeU32(pos + 4),
|
|
820
820
|
};
|
|
821
|
-
node.test = deserializeExpression(pos +
|
|
822
|
-
node.consequent = deserializeExpression(pos +
|
|
823
|
-
node.alternate = deserializeExpression(pos +
|
|
821
|
+
node.test = deserializeExpression(pos + 16);
|
|
822
|
+
node.consequent = deserializeExpression(pos + 32);
|
|
823
|
+
node.alternate = deserializeExpression(pos + 48);
|
|
824
824
|
return node;
|
|
825
825
|
}
|
|
826
826
|
|
|
827
827
|
function deserializeAssignmentExpression(pos) {
|
|
828
828
|
let node = {
|
|
829
829
|
type: "AssignmentExpression",
|
|
830
|
-
operator: deserializeAssignmentOperator(pos +
|
|
830
|
+
operator: deserializeAssignmentOperator(pos + 12),
|
|
831
831
|
left: null,
|
|
832
832
|
right: null,
|
|
833
833
|
start: deserializeU32(pos),
|
|
834
834
|
end: deserializeU32(pos + 4),
|
|
835
835
|
};
|
|
836
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
837
|
-
node.right = deserializeExpression(pos +
|
|
836
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
837
|
+
node.right = deserializeExpression(pos + 32);
|
|
838
838
|
return node;
|
|
839
839
|
}
|
|
840
840
|
|
|
@@ -898,8 +898,8 @@ function deserializeArrayAssignmentTarget(pos) {
|
|
|
898
898
|
start: deserializeU32(pos),
|
|
899
899
|
end: deserializeU32(pos + 4),
|
|
900
900
|
},
|
|
901
|
-
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos +
|
|
902
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
901
|
+
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos + 16),
|
|
902
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
903
903
|
rest !== null && elements.push(rest);
|
|
904
904
|
node.decorators = [];
|
|
905
905
|
node.elements = elements;
|
|
@@ -917,8 +917,8 @@ function deserializeObjectAssignmentTarget(pos) {
|
|
|
917
917
|
start: deserializeU32(pos),
|
|
918
918
|
end: deserializeU32(pos + 4),
|
|
919
919
|
},
|
|
920
|
-
properties = deserializeVecAssignmentTargetProperty(pos +
|
|
921
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
920
|
+
properties = deserializeVecAssignmentTargetProperty(pos + 16),
|
|
921
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
922
922
|
rest !== null && properties.push(rest);
|
|
923
923
|
node.decorators = [];
|
|
924
924
|
node.properties = properties;
|
|
@@ -938,7 +938,7 @@ function deserializeAssignmentTargetRest(pos) {
|
|
|
938
938
|
end: deserializeU32(pos + 4),
|
|
939
939
|
};
|
|
940
940
|
node.decorators = [];
|
|
941
|
-
node.argument = deserializeAssignmentTarget(pos +
|
|
941
|
+
node.argument = deserializeAssignmentTarget(pos + 16);
|
|
942
942
|
node.optional = false;
|
|
943
943
|
return node;
|
|
944
944
|
}
|
|
@@ -984,8 +984,8 @@ function deserializeAssignmentTargetWithDefault(pos) {
|
|
|
984
984
|
end: deserializeU32(pos + 4),
|
|
985
985
|
};
|
|
986
986
|
node.decorators = [];
|
|
987
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
988
|
-
node.right = deserializeExpression(pos +
|
|
987
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
988
|
+
node.right = deserializeExpression(pos + 32);
|
|
989
989
|
node.optional = false;
|
|
990
990
|
return node;
|
|
991
991
|
}
|
|
@@ -1016,7 +1016,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1016
1016
|
start,
|
|
1017
1017
|
end,
|
|
1018
1018
|
},
|
|
1019
|
-
key = deserializeIdentifierReference(pos +
|
|
1019
|
+
key = deserializeIdentifierReference(pos + 16),
|
|
1020
1020
|
value = {
|
|
1021
1021
|
type: "Identifier",
|
|
1022
1022
|
decorators: [],
|
|
@@ -1026,7 +1026,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1026
1026
|
start: key.start,
|
|
1027
1027
|
end: key.end,
|
|
1028
1028
|
},
|
|
1029
|
-
init = deserializeOptionExpression(pos +
|
|
1029
|
+
init = deserializeOptionExpression(pos + 48);
|
|
1030
1030
|
init !== null &&
|
|
1031
1031
|
(value = {
|
|
1032
1032
|
type: "AssignmentPattern",
|
|
@@ -1056,14 +1056,14 @@ function deserializeAssignmentTargetPropertyProperty(pos) {
|
|
|
1056
1056
|
value: null,
|
|
1057
1057
|
method: null,
|
|
1058
1058
|
shorthand: null,
|
|
1059
|
-
computed: deserializeBool(pos +
|
|
1059
|
+
computed: deserializeBool(pos + 12),
|
|
1060
1060
|
optional: null,
|
|
1061
1061
|
start: deserializeU32(pos),
|
|
1062
1062
|
end: deserializeU32(pos + 4),
|
|
1063
1063
|
};
|
|
1064
1064
|
node.kind = "init";
|
|
1065
|
-
node.key = deserializePropertyKey(pos +
|
|
1066
|
-
node.value = deserializeAssignmentTargetMaybeDefault(pos +
|
|
1065
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1066
|
+
node.value = deserializeAssignmentTargetMaybeDefault(pos + 32);
|
|
1067
1067
|
node.method = false;
|
|
1068
1068
|
node.shorthand = false;
|
|
1069
1069
|
node.optional = false;
|
|
@@ -1077,7 +1077,7 @@ function deserializeSequenceExpression(pos) {
|
|
|
1077
1077
|
start: deserializeU32(pos),
|
|
1078
1078
|
end: deserializeU32(pos + 4),
|
|
1079
1079
|
};
|
|
1080
|
-
node.expressions = deserializeVecExpression(pos +
|
|
1080
|
+
node.expressions = deserializeVecExpression(pos + 16);
|
|
1081
1081
|
return node;
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
@@ -1096,7 +1096,7 @@ function deserializeAwaitExpression(pos) {
|
|
|
1096
1096
|
start: deserializeU32(pos),
|
|
1097
1097
|
end: deserializeU32(pos + 4),
|
|
1098
1098
|
};
|
|
1099
|
-
node.argument = deserializeExpression(pos +
|
|
1099
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1100
1100
|
return node;
|
|
1101
1101
|
}
|
|
1102
1102
|
|
|
@@ -1107,7 +1107,7 @@ function deserializeChainExpression(pos) {
|
|
|
1107
1107
|
start: deserializeU32(pos),
|
|
1108
1108
|
end: deserializeU32(pos + 4),
|
|
1109
1109
|
};
|
|
1110
|
-
node.expression = deserializeChainElement(pos +
|
|
1110
|
+
node.expression = deserializeChainElement(pos + 16);
|
|
1111
1111
|
return node;
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
@@ -1136,7 +1136,7 @@ function deserializeParenthesizedExpression(pos) {
|
|
|
1136
1136
|
start: deserializeU32(pos),
|
|
1137
1137
|
end: deserializeU32(pos + 4),
|
|
1138
1138
|
};
|
|
1139
|
-
node.expression = deserializeExpression(pos +
|
|
1139
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1140
1140
|
return node;
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
@@ -1217,18 +1217,18 @@ function deserializeDirective(pos) {
|
|
|
1217
1217
|
let node = {
|
|
1218
1218
|
type: "ExpressionStatement",
|
|
1219
1219
|
expression: null,
|
|
1220
|
-
directive: deserializeStr(pos +
|
|
1220
|
+
directive: deserializeStr(pos + 64),
|
|
1221
1221
|
start: deserializeU32(pos),
|
|
1222
1222
|
end: deserializeU32(pos + 4),
|
|
1223
1223
|
};
|
|
1224
|
-
node.expression = deserializeStringLiteral(pos +
|
|
1224
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
1225
1225
|
return node;
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
function deserializeHashbang(pos) {
|
|
1229
1229
|
return {
|
|
1230
1230
|
type: "Hashbang",
|
|
1231
|
-
value: deserializeStr(pos +
|
|
1231
|
+
value: deserializeStr(pos + 16),
|
|
1232
1232
|
start: deserializeU32(pos),
|
|
1233
1233
|
end: deserializeU32(pos + 4),
|
|
1234
1234
|
};
|
|
@@ -1241,7 +1241,7 @@ function deserializeBlockStatement(pos) {
|
|
|
1241
1241
|
start: deserializeU32(pos),
|
|
1242
1242
|
end: deserializeU32(pos + 4),
|
|
1243
1243
|
};
|
|
1244
|
-
node.body = deserializeVecStatement(pos +
|
|
1244
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
1245
1245
|
return node;
|
|
1246
1246
|
}
|
|
1247
1247
|
|
|
@@ -1273,13 +1273,13 @@ function deserializeDeclaration(pos) {
|
|
|
1273
1273
|
function deserializeVariableDeclaration(pos) {
|
|
1274
1274
|
let node = {
|
|
1275
1275
|
type: "VariableDeclaration",
|
|
1276
|
-
kind: deserializeVariableDeclarationKind(pos +
|
|
1276
|
+
kind: deserializeVariableDeclarationKind(pos + 12),
|
|
1277
1277
|
declarations: null,
|
|
1278
|
-
declare: deserializeBool(pos +
|
|
1278
|
+
declare: deserializeBool(pos + 13),
|
|
1279
1279
|
start: deserializeU32(pos),
|
|
1280
1280
|
end: deserializeU32(pos + 4),
|
|
1281
1281
|
};
|
|
1282
|
-
node.declarations = deserializeVecVariableDeclarator(pos +
|
|
1282
|
+
node.declarations = deserializeVecVariableDeclarator(pos + 16);
|
|
1283
1283
|
return node;
|
|
1284
1284
|
}
|
|
1285
1285
|
|
|
@@ -1301,23 +1301,25 @@ function deserializeVariableDeclarationKind(pos) {
|
|
|
1301
1301
|
}
|
|
1302
1302
|
|
|
1303
1303
|
function deserializeVariableDeclarator(pos) {
|
|
1304
|
-
let
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1304
|
+
let node = {
|
|
1305
|
+
type: "VariableDeclarator",
|
|
1306
|
+
id: null,
|
|
1307
|
+
init: null,
|
|
1308
|
+
definite: deserializeBool(pos + 13),
|
|
1309
|
+
start: deserializeU32(pos),
|
|
1310
|
+
end: deserializeU32(pos + 4),
|
|
1311
|
+
},
|
|
1312
|
+
pattern = deserializeBindingPattern(pos + 16);
|
|
1313
1313
|
{
|
|
1314
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1314
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1315
|
+
if (typeAnnotation !== null) {
|
|
1316
|
+
pattern.typeAnnotation = typeAnnotation;
|
|
1317
|
+
pattern.end = typeAnnotation.end;
|
|
1318
|
+
}
|
|
1318
1319
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1320
|
+
node.id = pattern;
|
|
1321
|
+
node.init = deserializeOptionExpression(pos + 40);
|
|
1322
|
+
return node;
|
|
1321
1323
|
}
|
|
1322
1324
|
|
|
1323
1325
|
function deserializeEmptyStatement(pos) {
|
|
@@ -1336,7 +1338,7 @@ function deserializeExpressionStatement(pos) {
|
|
|
1336
1338
|
start: deserializeU32(pos),
|
|
1337
1339
|
end: deserializeU32(pos + 4),
|
|
1338
1340
|
};
|
|
1339
|
-
node.expression = deserializeExpression(pos +
|
|
1341
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1340
1342
|
return node;
|
|
1341
1343
|
}
|
|
1342
1344
|
|
|
@@ -1349,9 +1351,9 @@ function deserializeIfStatement(pos) {
|
|
|
1349
1351
|
start: deserializeU32(pos),
|
|
1350
1352
|
end: deserializeU32(pos + 4),
|
|
1351
1353
|
};
|
|
1352
|
-
node.test = deserializeExpression(pos +
|
|
1353
|
-
node.consequent = deserializeStatement(pos +
|
|
1354
|
-
node.alternate = deserializeOptionStatement(pos +
|
|
1354
|
+
node.test = deserializeExpression(pos + 16);
|
|
1355
|
+
node.consequent = deserializeStatement(pos + 32);
|
|
1356
|
+
node.alternate = deserializeOptionStatement(pos + 48);
|
|
1355
1357
|
return node;
|
|
1356
1358
|
}
|
|
1357
1359
|
|
|
@@ -1363,8 +1365,8 @@ function deserializeDoWhileStatement(pos) {
|
|
|
1363
1365
|
start: deserializeU32(pos),
|
|
1364
1366
|
end: deserializeU32(pos + 4),
|
|
1365
1367
|
};
|
|
1366
|
-
node.body = deserializeStatement(pos +
|
|
1367
|
-
node.test = deserializeExpression(pos +
|
|
1368
|
+
node.body = deserializeStatement(pos + 16);
|
|
1369
|
+
node.test = deserializeExpression(pos + 32);
|
|
1368
1370
|
return node;
|
|
1369
1371
|
}
|
|
1370
1372
|
|
|
@@ -1376,8 +1378,8 @@ function deserializeWhileStatement(pos) {
|
|
|
1376
1378
|
start: deserializeU32(pos),
|
|
1377
1379
|
end: deserializeU32(pos + 4),
|
|
1378
1380
|
};
|
|
1379
|
-
node.test = deserializeExpression(pos +
|
|
1380
|
-
node.body = deserializeStatement(pos +
|
|
1381
|
+
node.test = deserializeExpression(pos + 16);
|
|
1382
|
+
node.body = deserializeStatement(pos + 32);
|
|
1381
1383
|
return node;
|
|
1382
1384
|
}
|
|
1383
1385
|
|
|
@@ -1391,10 +1393,10 @@ function deserializeForStatement(pos) {
|
|
|
1391
1393
|
start: deserializeU32(pos),
|
|
1392
1394
|
end: deserializeU32(pos + 4),
|
|
1393
1395
|
};
|
|
1394
|
-
node.init = deserializeOptionForStatementInit(pos +
|
|
1395
|
-
node.test = deserializeOptionExpression(pos +
|
|
1396
|
-
node.update = deserializeOptionExpression(pos +
|
|
1397
|
-
node.body = deserializeStatement(pos +
|
|
1396
|
+
node.init = deserializeOptionForStatementInit(pos + 16);
|
|
1397
|
+
node.test = deserializeOptionExpression(pos + 32);
|
|
1398
|
+
node.update = deserializeOptionExpression(pos + 48);
|
|
1399
|
+
node.body = deserializeStatement(pos + 64);
|
|
1398
1400
|
return node;
|
|
1399
1401
|
}
|
|
1400
1402
|
|
|
@@ -1502,9 +1504,9 @@ function deserializeForInStatement(pos) {
|
|
|
1502
1504
|
start: deserializeU32(pos),
|
|
1503
1505
|
end: deserializeU32(pos + 4),
|
|
1504
1506
|
};
|
|
1505
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1506
|
-
node.right = deserializeExpression(pos +
|
|
1507
|
-
node.body = deserializeStatement(pos +
|
|
1507
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1508
|
+
node.right = deserializeExpression(pos + 32);
|
|
1509
|
+
node.body = deserializeStatement(pos + 48);
|
|
1508
1510
|
return node;
|
|
1509
1511
|
}
|
|
1510
1512
|
|
|
@@ -1547,9 +1549,9 @@ function deserializeForOfStatement(pos) {
|
|
|
1547
1549
|
start: deserializeU32(pos),
|
|
1548
1550
|
end: deserializeU32(pos + 4),
|
|
1549
1551
|
};
|
|
1550
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1551
|
-
node.right = deserializeExpression(pos +
|
|
1552
|
-
node.body = deserializeStatement(pos +
|
|
1552
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1553
|
+
node.right = deserializeExpression(pos + 32);
|
|
1554
|
+
node.body = deserializeStatement(pos + 48);
|
|
1553
1555
|
return node;
|
|
1554
1556
|
}
|
|
1555
1557
|
|
|
@@ -1560,7 +1562,7 @@ function deserializeContinueStatement(pos) {
|
|
|
1560
1562
|
start: deserializeU32(pos),
|
|
1561
1563
|
end: deserializeU32(pos + 4),
|
|
1562
1564
|
};
|
|
1563
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1565
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1564
1566
|
return node;
|
|
1565
1567
|
}
|
|
1566
1568
|
|
|
@@ -1571,7 +1573,7 @@ function deserializeBreakStatement(pos) {
|
|
|
1571
1573
|
start: deserializeU32(pos),
|
|
1572
1574
|
end: deserializeU32(pos + 4),
|
|
1573
1575
|
};
|
|
1574
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1576
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1575
1577
|
return node;
|
|
1576
1578
|
}
|
|
1577
1579
|
|
|
@@ -1582,7 +1584,7 @@ function deserializeReturnStatement(pos) {
|
|
|
1582
1584
|
start: deserializeU32(pos),
|
|
1583
1585
|
end: deserializeU32(pos + 4),
|
|
1584
1586
|
};
|
|
1585
|
-
node.argument = deserializeOptionExpression(pos +
|
|
1587
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
1586
1588
|
return node;
|
|
1587
1589
|
}
|
|
1588
1590
|
|
|
@@ -1594,8 +1596,8 @@ function deserializeWithStatement(pos) {
|
|
|
1594
1596
|
start: deserializeU32(pos),
|
|
1595
1597
|
end: deserializeU32(pos + 4),
|
|
1596
1598
|
};
|
|
1597
|
-
node.object = deserializeExpression(pos +
|
|
1598
|
-
node.body = deserializeStatement(pos +
|
|
1599
|
+
node.object = deserializeExpression(pos + 16);
|
|
1600
|
+
node.body = deserializeStatement(pos + 32);
|
|
1599
1601
|
return node;
|
|
1600
1602
|
}
|
|
1601
1603
|
|
|
@@ -1607,8 +1609,8 @@ function deserializeSwitchStatement(pos) {
|
|
|
1607
1609
|
start: deserializeU32(pos),
|
|
1608
1610
|
end: deserializeU32(pos + 4),
|
|
1609
1611
|
};
|
|
1610
|
-
node.discriminant = deserializeExpression(pos +
|
|
1611
|
-
node.cases = deserializeVecSwitchCase(pos +
|
|
1612
|
+
node.discriminant = deserializeExpression(pos + 16);
|
|
1613
|
+
node.cases = deserializeVecSwitchCase(pos + 32);
|
|
1612
1614
|
return node;
|
|
1613
1615
|
}
|
|
1614
1616
|
|
|
@@ -1620,8 +1622,8 @@ function deserializeSwitchCase(pos) {
|
|
|
1620
1622
|
start: deserializeU32(pos),
|
|
1621
1623
|
end: deserializeU32(pos + 4),
|
|
1622
1624
|
};
|
|
1623
|
-
node.test = deserializeOptionExpression(pos +
|
|
1624
|
-
node.consequent = deserializeVecStatement(pos +
|
|
1625
|
+
node.test = deserializeOptionExpression(pos + 16);
|
|
1626
|
+
node.consequent = deserializeVecStatement(pos + 32);
|
|
1625
1627
|
return node;
|
|
1626
1628
|
}
|
|
1627
1629
|
|
|
@@ -1633,8 +1635,8 @@ function deserializeLabeledStatement(pos) {
|
|
|
1633
1635
|
start: deserializeU32(pos),
|
|
1634
1636
|
end: deserializeU32(pos + 4),
|
|
1635
1637
|
};
|
|
1636
|
-
node.label = deserializeLabelIdentifier(pos +
|
|
1637
|
-
node.body = deserializeStatement(pos +
|
|
1638
|
+
node.label = deserializeLabelIdentifier(pos + 16);
|
|
1639
|
+
node.body = deserializeStatement(pos + 48);
|
|
1638
1640
|
return node;
|
|
1639
1641
|
}
|
|
1640
1642
|
|
|
@@ -1645,7 +1647,7 @@ function deserializeThrowStatement(pos) {
|
|
|
1645
1647
|
start: deserializeU32(pos),
|
|
1646
1648
|
end: deserializeU32(pos + 4),
|
|
1647
1649
|
};
|
|
1648
|
-
node.argument = deserializeExpression(pos +
|
|
1650
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1649
1651
|
return node;
|
|
1650
1652
|
}
|
|
1651
1653
|
|
|
@@ -1658,9 +1660,9 @@ function deserializeTryStatement(pos) {
|
|
|
1658
1660
|
start: deserializeU32(pos),
|
|
1659
1661
|
end: deserializeU32(pos + 4),
|
|
1660
1662
|
};
|
|
1661
|
-
node.block = deserializeBoxBlockStatement(pos +
|
|
1662
|
-
node.handler = deserializeOptionBoxCatchClause(pos +
|
|
1663
|
-
node.finalizer = deserializeOptionBoxBlockStatement(pos +
|
|
1663
|
+
node.block = deserializeBoxBlockStatement(pos + 16);
|
|
1664
|
+
node.handler = deserializeOptionBoxCatchClause(pos + 24);
|
|
1665
|
+
node.finalizer = deserializeOptionBoxBlockStatement(pos + 32);
|
|
1664
1666
|
return node;
|
|
1665
1667
|
}
|
|
1666
1668
|
|
|
@@ -1672,15 +1674,15 @@ function deserializeCatchClause(pos) {
|
|
|
1672
1674
|
start: deserializeU32(pos),
|
|
1673
1675
|
end: deserializeU32(pos + 4),
|
|
1674
1676
|
};
|
|
1675
|
-
node.param = deserializeOptionCatchParameter(pos +
|
|
1676
|
-
node.body = deserializeBoxBlockStatement(pos +
|
|
1677
|
+
node.param = deserializeOptionCatchParameter(pos + 16);
|
|
1678
|
+
node.body = deserializeBoxBlockStatement(pos + 56);
|
|
1677
1679
|
return node;
|
|
1678
1680
|
}
|
|
1679
1681
|
|
|
1680
1682
|
function deserializeCatchParameter(pos) {
|
|
1681
|
-
let pattern = deserializeBindingPattern(pos +
|
|
1683
|
+
let pattern = deserializeBindingPattern(pos + 16);
|
|
1682
1684
|
{
|
|
1683
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1685
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
1684
1686
|
pattern.typeAnnotation = typeAnnotation;
|
|
1685
1687
|
typeAnnotation !== null && (pattern.end = typeAnnotation.end);
|
|
1686
1688
|
}
|
|
@@ -1722,8 +1724,8 @@ function deserializeAssignmentPattern(pos) {
|
|
|
1722
1724
|
end: deserializeU32(pos + 4),
|
|
1723
1725
|
};
|
|
1724
1726
|
node.decorators = [];
|
|
1725
|
-
node.left = deserializeBindingPattern(pos +
|
|
1726
|
-
node.right = deserializeExpression(pos +
|
|
1727
|
+
node.left = deserializeBindingPattern(pos + 16);
|
|
1728
|
+
node.right = deserializeExpression(pos + 32);
|
|
1727
1729
|
node.optional = false;
|
|
1728
1730
|
return node;
|
|
1729
1731
|
}
|
|
@@ -1738,8 +1740,8 @@ function deserializeObjectPattern(pos) {
|
|
|
1738
1740
|
start: deserializeU32(pos),
|
|
1739
1741
|
end: deserializeU32(pos + 4),
|
|
1740
1742
|
},
|
|
1741
|
-
properties = deserializeVecBindingProperty(pos +
|
|
1742
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1743
|
+
properties = deserializeVecBindingProperty(pos + 16),
|
|
1744
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1743
1745
|
rest !== null && properties.push(rest);
|
|
1744
1746
|
node.decorators = [];
|
|
1745
1747
|
node.properties = properties;
|
|
@@ -1754,15 +1756,15 @@ function deserializeBindingProperty(pos) {
|
|
|
1754
1756
|
key: null,
|
|
1755
1757
|
value: null,
|
|
1756
1758
|
method: null,
|
|
1757
|
-
shorthand: deserializeBool(pos +
|
|
1758
|
-
computed: deserializeBool(pos +
|
|
1759
|
+
shorthand: deserializeBool(pos + 12),
|
|
1760
|
+
computed: deserializeBool(pos + 13),
|
|
1759
1761
|
optional: null,
|
|
1760
1762
|
start: deserializeU32(pos),
|
|
1761
1763
|
end: deserializeU32(pos + 4),
|
|
1762
1764
|
};
|
|
1763
1765
|
node.kind = "init";
|
|
1764
|
-
node.key = deserializePropertyKey(pos +
|
|
1765
|
-
node.value = deserializeBindingPattern(pos +
|
|
1766
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1767
|
+
node.value = deserializeBindingPattern(pos + 32);
|
|
1766
1768
|
node.method = false;
|
|
1767
1769
|
node.optional = false;
|
|
1768
1770
|
return node;
|
|
@@ -1778,8 +1780,8 @@ function deserializeArrayPattern(pos) {
|
|
|
1778
1780
|
start: deserializeU32(pos),
|
|
1779
1781
|
end: deserializeU32(pos + 4),
|
|
1780
1782
|
},
|
|
1781
|
-
elements = deserializeVecOptionBindingPattern(pos +
|
|
1782
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1783
|
+
elements = deserializeVecOptionBindingPattern(pos + 16),
|
|
1784
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1783
1785
|
rest !== null && elements.push(rest);
|
|
1784
1786
|
node.decorators = [];
|
|
1785
1787
|
node.elements = elements;
|
|
@@ -1799,7 +1801,7 @@ function deserializeBindingRestElement(pos) {
|
|
|
1799
1801
|
end: deserializeU32(pos + 4),
|
|
1800
1802
|
};
|
|
1801
1803
|
node.decorators = [];
|
|
1802
|
-
node.argument = deserializeBindingPattern(pos +
|
|
1804
|
+
node.argument = deserializeBindingPattern(pos + 16);
|
|
1803
1805
|
node.optional = false;
|
|
1804
1806
|
return node;
|
|
1805
1807
|
}
|
|
@@ -1819,16 +1821,16 @@ function deserializeFunction(pos) {
|
|
|
1819
1821
|
start: deserializeU32(pos),
|
|
1820
1822
|
end: deserializeU32(pos + 4),
|
|
1821
1823
|
},
|
|
1822
|
-
params = deserializeBoxFormalParameters(pos +
|
|
1824
|
+
params = deserializeBoxFormalParameters(pos + 64);
|
|
1823
1825
|
{
|
|
1824
|
-
let thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
1826
|
+
let thisParam = deserializeOptionBoxTSThisParameter(pos + 56);
|
|
1825
1827
|
thisParam !== null && params.unshift(thisParam);
|
|
1826
1828
|
}
|
|
1827
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
1828
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
1829
|
+
node.id = deserializeOptionBindingIdentifier(pos + 16);
|
|
1830
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
1829
1831
|
node.params = params;
|
|
1830
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1831
|
-
node.body = deserializeOptionBoxFunctionBody(pos +
|
|
1832
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
1833
|
+
node.body = deserializeOptionBoxFunctionBody(pos + 80);
|
|
1832
1834
|
node.expression = false;
|
|
1833
1835
|
return node;
|
|
1834
1836
|
}
|
|
@@ -1849,9 +1851,9 @@ function deserializeFunctionType(pos) {
|
|
|
1849
1851
|
}
|
|
1850
1852
|
|
|
1851
1853
|
function deserializeFormalParameters(pos) {
|
|
1852
|
-
let params = deserializeVecFormalParameter(pos +
|
|
1853
|
-
if (uint32[(pos +
|
|
1854
|
-
pos = uint32[(pos +
|
|
1854
|
+
let params = deserializeVecFormalParameter(pos + 16);
|
|
1855
|
+
if (uint32[(pos + 40) >> 2] !== 0 && uint32[(pos + 44) >> 2] !== 0) {
|
|
1856
|
+
pos = uint32[(pos + 40) >> 2];
|
|
1855
1857
|
let end,
|
|
1856
1858
|
rest = {
|
|
1857
1859
|
type: "RestElement",
|
|
@@ -1860,11 +1862,11 @@ function deserializeFormalParameters(pos) {
|
|
|
1860
1862
|
optional: false,
|
|
1861
1863
|
typeAnnotation: null,
|
|
1862
1864
|
value: null,
|
|
1863
|
-
start: deserializeU32(pos +
|
|
1864
|
-
end: (end = deserializeU32(pos +
|
|
1865
|
+
start: deserializeU32(pos + 40),
|
|
1866
|
+
end: (end = deserializeU32(pos + 44)),
|
|
1865
1867
|
};
|
|
1866
|
-
rest.argument = deserializeBindingPattern(pos +
|
|
1867
|
-
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1868
|
+
rest.argument = deserializeBindingPattern(pos + 56);
|
|
1869
|
+
rest.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 72);
|
|
1868
1870
|
if (rest.typeAnnotation !== null) {
|
|
1869
1871
|
end = rest.typeAnnotation.end;
|
|
1870
1872
|
rest.end = end;
|
|
@@ -1876,13 +1878,13 @@ function deserializeFormalParameters(pos) {
|
|
|
1876
1878
|
|
|
1877
1879
|
function deserializeFormalParameter(pos) {
|
|
1878
1880
|
let param,
|
|
1879
|
-
hasInitializer = uint32[(pos +
|
|
1881
|
+
hasInitializer = uint32[(pos + 64) >> 2] !== 0 && uint32[(pos + 68) >> 2] !== 0;
|
|
1880
1882
|
{
|
|
1881
|
-
let accessibility = deserializeOptionTSAccessibility(pos +
|
|
1882
|
-
readonly = deserializeBool(pos +
|
|
1883
|
-
override = deserializeBool(pos +
|
|
1883
|
+
let accessibility = deserializeOptionTSAccessibility(pos + 13),
|
|
1884
|
+
readonly = deserializeBool(pos + 14),
|
|
1885
|
+
override = deserializeBool(pos + 15);
|
|
1884
1886
|
if (accessibility === null && !readonly && !override) {
|
|
1885
|
-
let optional = deserializeBool(pos +
|
|
1887
|
+
let optional = deserializeBool(pos + 12);
|
|
1886
1888
|
if (hasInitializer) {
|
|
1887
1889
|
param = {
|
|
1888
1890
|
type: "AssignmentPattern",
|
|
@@ -1894,19 +1896,19 @@ function deserializeFormalParameter(pos) {
|
|
|
1894
1896
|
start: deserializeU32(pos),
|
|
1895
1897
|
end: deserializeU32(pos + 4),
|
|
1896
1898
|
};
|
|
1897
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1898
|
-
param.left = deserializeBindingPattern(pos +
|
|
1899
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1900
|
+
param.left = deserializeBindingPattern(pos + 40);
|
|
1899
1901
|
param.left.decorators = [];
|
|
1900
1902
|
param.left.optional = false;
|
|
1901
|
-
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1903
|
+
let leftTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1902
1904
|
param.left.typeAnnotation = leftTypeAnnotation;
|
|
1903
1905
|
leftTypeAnnotation !== null && (param.left.end = leftTypeAnnotation.end);
|
|
1904
|
-
param.right = deserializeOptionBoxExpression(pos +
|
|
1906
|
+
param.right = deserializeOptionBoxExpression(pos + 64);
|
|
1905
1907
|
} else {
|
|
1906
|
-
param = deserializeBindingPattern(pos +
|
|
1907
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1908
|
+
param = deserializeBindingPattern(pos + 40);
|
|
1909
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1908
1910
|
param.optional = optional;
|
|
1909
|
-
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1911
|
+
let typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1910
1912
|
param.typeAnnotation = typeAnnotation;
|
|
1911
1913
|
typeAnnotation === null
|
|
1912
1914
|
? optional && (param.end = deserializeU32(pos + 4))
|
|
@@ -1924,10 +1926,10 @@ function deserializeFormalParameter(pos) {
|
|
|
1924
1926
|
start: deserializeU32(pos),
|
|
1925
1927
|
end: deserializeU32(pos + 4),
|
|
1926
1928
|
};
|
|
1927
|
-
param.decorators = deserializeVecDecorator(pos +
|
|
1929
|
+
param.decorators = deserializeVecDecorator(pos + 16);
|
|
1928
1930
|
if (hasInitializer) {
|
|
1929
|
-
let pattern = deserializeBindingPattern(pos +
|
|
1930
|
-
initializer = deserializeOptionBoxExpression(pos +
|
|
1931
|
+
let pattern = deserializeBindingPattern(pos + 40),
|
|
1932
|
+
initializer = deserializeOptionBoxExpression(pos + 64),
|
|
1931
1933
|
assignParam = {
|
|
1932
1934
|
type: "AssignmentPattern",
|
|
1933
1935
|
decorators: [],
|
|
@@ -1941,17 +1943,17 @@ function deserializeFormalParameter(pos) {
|
|
|
1941
1943
|
assignParam.left = pattern;
|
|
1942
1944
|
pattern.decorators = [];
|
|
1943
1945
|
pattern.optional = false;
|
|
1944
|
-
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1946
|
+
let patternTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1945
1947
|
pattern.typeAnnotation = patternTypeAnnotation;
|
|
1946
1948
|
patternTypeAnnotation !== null && (pattern.end = patternTypeAnnotation.end);
|
|
1947
1949
|
assignParam.right = initializer;
|
|
1948
1950
|
param.parameter = assignParam;
|
|
1949
1951
|
} else {
|
|
1950
|
-
param.parameter = deserializeBindingPattern(pos +
|
|
1952
|
+
param.parameter = deserializeBindingPattern(pos + 40);
|
|
1951
1953
|
param.parameter.decorators = [];
|
|
1952
|
-
let paramOptional = deserializeBool(pos +
|
|
1954
|
+
let paramOptional = deserializeBool(pos + 12);
|
|
1953
1955
|
param.parameter.optional = paramOptional;
|
|
1954
|
-
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1956
|
+
let paramTypeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
1955
1957
|
param.parameter.typeAnnotation = paramTypeAnnotation;
|
|
1956
1958
|
if (paramTypeAnnotation !== null) param.parameter.end = paramTypeAnnotation.end;
|
|
1957
1959
|
else if (paramOptional) {
|
|
@@ -1971,8 +1973,8 @@ function deserializeFunctionBody(pos) {
|
|
|
1971
1973
|
start: deserializeU32(pos),
|
|
1972
1974
|
end: deserializeU32(pos + 4),
|
|
1973
1975
|
},
|
|
1974
|
-
body = deserializeVecDirective(pos +
|
|
1975
|
-
body.push(...deserializeVecStatement(pos +
|
|
1976
|
+
body = deserializeVecDirective(pos + 16);
|
|
1977
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
1976
1978
|
node.body = body;
|
|
1977
1979
|
return node;
|
|
1978
1980
|
}
|
|
@@ -1992,11 +1994,11 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
1992
1994
|
start: deserializeU32(pos),
|
|
1993
1995
|
end: deserializeU32(pos + 4),
|
|
1994
1996
|
},
|
|
1995
|
-
body = deserializeBoxFunctionBody(pos +
|
|
1997
|
+
body = deserializeBoxFunctionBody(pos + 40);
|
|
1996
1998
|
expression === true && (body = body.body[0].expression);
|
|
1997
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
1998
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
1999
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
1999
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
2000
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
2001
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
2000
2002
|
node.body = body;
|
|
2001
2003
|
node.generator = false;
|
|
2002
2004
|
return node;
|
|
@@ -2005,12 +2007,12 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
2005
2007
|
function deserializeYieldExpression(pos) {
|
|
2006
2008
|
let node = {
|
|
2007
2009
|
type: "YieldExpression",
|
|
2008
|
-
delegate: deserializeBool(pos +
|
|
2010
|
+
delegate: deserializeBool(pos + 12),
|
|
2009
2011
|
argument: null,
|
|
2010
2012
|
start: deserializeU32(pos),
|
|
2011
2013
|
end: deserializeU32(pos + 4),
|
|
2012
2014
|
};
|
|
2013
|
-
node.argument = deserializeOptionExpression(pos +
|
|
2015
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
2014
2016
|
return node;
|
|
2015
2017
|
}
|
|
2016
2018
|
|
|
@@ -2029,13 +2031,13 @@ function deserializeClass(pos) {
|
|
|
2029
2031
|
start: deserializeU32(pos),
|
|
2030
2032
|
end: deserializeU32(pos + 4),
|
|
2031
2033
|
};
|
|
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 +
|
|
2034
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2035
|
+
node.id = deserializeOptionBindingIdentifier(pos + 40);
|
|
2036
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 72);
|
|
2037
|
+
node.superClass = deserializeOptionExpression(pos + 80);
|
|
2038
|
+
node.superTypeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 96);
|
|
2039
|
+
node.implements = deserializeVecTSClassImplements(pos + 104);
|
|
2040
|
+
node.body = deserializeBoxClassBody(pos + 128);
|
|
2039
2041
|
return node;
|
|
2040
2042
|
}
|
|
2041
2043
|
|
|
@@ -2057,7 +2059,7 @@ function deserializeClassBody(pos) {
|
|
|
2057
2059
|
start: deserializeU32(pos),
|
|
2058
2060
|
end: deserializeU32(pos + 4),
|
|
2059
2061
|
};
|
|
2060
|
-
node.body = deserializeVecClassElement(pos +
|
|
2062
|
+
node.body = deserializeVecClassElement(pos + 16);
|
|
2061
2063
|
return node;
|
|
2062
2064
|
}
|
|
2063
2065
|
|
|
@@ -2080,22 +2082,22 @@ function deserializeClassElement(pos) {
|
|
|
2080
2082
|
|
|
2081
2083
|
function deserializeMethodDefinition(pos) {
|
|
2082
2084
|
let node = {
|
|
2083
|
-
type: deserializeMethodDefinitionType(pos +
|
|
2085
|
+
type: deserializeMethodDefinitionType(pos + 12),
|
|
2084
2086
|
decorators: null,
|
|
2085
2087
|
key: null,
|
|
2086
2088
|
value: null,
|
|
2087
|
-
kind: deserializeMethodDefinitionKind(pos +
|
|
2088
|
-
computed: deserializeBool(pos +
|
|
2089
|
-
static: deserializeBool(pos +
|
|
2089
|
+
kind: deserializeMethodDefinitionKind(pos + 13),
|
|
2090
|
+
computed: deserializeBool(pos + 14),
|
|
2091
|
+
static: deserializeBool(pos + 15),
|
|
2090
2092
|
override: deserializeBool(pos + 64),
|
|
2091
2093
|
optional: deserializeBool(pos + 65),
|
|
2092
2094
|
accessibility: deserializeOptionTSAccessibility(pos + 66),
|
|
2093
2095
|
start: deserializeU32(pos),
|
|
2094
2096
|
end: deserializeU32(pos + 4),
|
|
2095
2097
|
};
|
|
2096
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2097
|
-
node.key = deserializePropertyKey(pos +
|
|
2098
|
-
node.value = deserializeBoxFunction(pos +
|
|
2098
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2099
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2100
|
+
node.value = deserializeBoxFunction(pos + 56);
|
|
2099
2101
|
return node;
|
|
2100
2102
|
}
|
|
2101
2103
|
|
|
@@ -2112,14 +2114,14 @@ function deserializeMethodDefinitionType(pos) {
|
|
|
2112
2114
|
|
|
2113
2115
|
function deserializePropertyDefinition(pos) {
|
|
2114
2116
|
let node = {
|
|
2115
|
-
type: deserializePropertyDefinitionType(pos +
|
|
2117
|
+
type: deserializePropertyDefinitionType(pos + 12),
|
|
2116
2118
|
decorators: null,
|
|
2117
2119
|
key: null,
|
|
2118
2120
|
typeAnnotation: null,
|
|
2119
2121
|
value: null,
|
|
2120
|
-
computed: deserializeBool(pos +
|
|
2121
|
-
static: deserializeBool(pos +
|
|
2122
|
-
declare: deserializeBool(pos +
|
|
2122
|
+
computed: deserializeBool(pos + 13),
|
|
2123
|
+
static: deserializeBool(pos + 14),
|
|
2124
|
+
declare: deserializeBool(pos + 15),
|
|
2123
2125
|
override: deserializeBool(pos + 80),
|
|
2124
2126
|
optional: deserializeBool(pos + 81),
|
|
2125
2127
|
definite: deserializeBool(pos + 82),
|
|
@@ -2128,10 +2130,10 @@ function deserializePropertyDefinition(pos) {
|
|
|
2128
2130
|
start: deserializeU32(pos),
|
|
2129
2131
|
end: deserializeU32(pos + 4),
|
|
2130
2132
|
};
|
|
2131
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2132
|
-
node.key = deserializePropertyKey(pos +
|
|
2133
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2134
|
-
node.value = deserializeOptionExpression(pos +
|
|
2133
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2134
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2135
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2136
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2135
2137
|
return node;
|
|
2136
2138
|
}
|
|
2137
2139
|
|
|
@@ -2164,7 +2166,7 @@ function deserializeMethodDefinitionKind(pos) {
|
|
|
2164
2166
|
function deserializePrivateIdentifier(pos) {
|
|
2165
2167
|
return {
|
|
2166
2168
|
type: "PrivateIdentifier",
|
|
2167
|
-
name: deserializeStr(pos +
|
|
2169
|
+
name: deserializeStr(pos + 16),
|
|
2168
2170
|
start: deserializeU32(pos),
|
|
2169
2171
|
end: deserializeU32(pos + 4),
|
|
2170
2172
|
};
|
|
@@ -2177,7 +2179,7 @@ function deserializeStaticBlock(pos) {
|
|
|
2177
2179
|
start: deserializeU32(pos),
|
|
2178
2180
|
end: deserializeU32(pos + 4),
|
|
2179
2181
|
};
|
|
2180
|
-
node.body = deserializeVecStatement(pos +
|
|
2182
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
2181
2183
|
return node;
|
|
2182
2184
|
}
|
|
2183
2185
|
|
|
@@ -2194,14 +2196,14 @@ function deserializeAccessorPropertyType(pos) {
|
|
|
2194
2196
|
|
|
2195
2197
|
function deserializeAccessorProperty(pos) {
|
|
2196
2198
|
let node = {
|
|
2197
|
-
type: deserializeAccessorPropertyType(pos +
|
|
2199
|
+
type: deserializeAccessorPropertyType(pos + 12),
|
|
2198
2200
|
decorators: null,
|
|
2199
2201
|
key: null,
|
|
2200
2202
|
typeAnnotation: null,
|
|
2201
2203
|
value: null,
|
|
2202
|
-
computed: deserializeBool(pos +
|
|
2203
|
-
static: deserializeBool(pos +
|
|
2204
|
-
override: deserializeBool(pos +
|
|
2204
|
+
computed: deserializeBool(pos + 13),
|
|
2205
|
+
static: deserializeBool(pos + 14),
|
|
2206
|
+
override: deserializeBool(pos + 15),
|
|
2205
2207
|
definite: deserializeBool(pos + 80),
|
|
2206
2208
|
accessibility: deserializeOptionTSAccessibility(pos + 81),
|
|
2207
2209
|
declare: null,
|
|
@@ -2210,10 +2212,10 @@ function deserializeAccessorProperty(pos) {
|
|
|
2210
2212
|
start: deserializeU32(pos),
|
|
2211
2213
|
end: deserializeU32(pos + 4),
|
|
2212
2214
|
};
|
|
2213
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2214
|
-
node.key = deserializePropertyKey(pos +
|
|
2215
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
2216
|
-
node.value = deserializeOptionExpression(pos +
|
|
2215
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2216
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2217
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
2218
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2217
2219
|
node.declare = false;
|
|
2218
2220
|
node.optional = false;
|
|
2219
2221
|
node.readonly = false;
|
|
@@ -2225,12 +2227,12 @@ function deserializeImportExpression(pos) {
|
|
|
2225
2227
|
type: "ImportExpression",
|
|
2226
2228
|
source: null,
|
|
2227
2229
|
options: null,
|
|
2228
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2230
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2229
2231
|
start: deserializeU32(pos),
|
|
2230
2232
|
end: deserializeU32(pos + 4),
|
|
2231
2233
|
};
|
|
2232
|
-
node.source = deserializeExpression(pos +
|
|
2233
|
-
node.options = deserializeOptionExpression(pos +
|
|
2234
|
+
node.source = deserializeExpression(pos + 16);
|
|
2235
|
+
node.options = deserializeOptionExpression(pos + 32);
|
|
2234
2236
|
return node;
|
|
2235
2237
|
}
|
|
2236
2238
|
|
|
@@ -2239,17 +2241,17 @@ function deserializeImportDeclaration(pos) {
|
|
|
2239
2241
|
type: "ImportDeclaration",
|
|
2240
2242
|
specifiers: null,
|
|
2241
2243
|
source: null,
|
|
2242
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2244
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2243
2245
|
attributes: null,
|
|
2244
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2246
|
+
importKind: deserializeImportOrExportKind(pos + 13),
|
|
2245
2247
|
start: deserializeU32(pos),
|
|
2246
2248
|
end: deserializeU32(pos + 4),
|
|
2247
2249
|
},
|
|
2248
|
-
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos +
|
|
2250
|
+
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos + 16);
|
|
2249
2251
|
specifiers === null && (specifiers = []);
|
|
2250
|
-
let withClause = deserializeOptionBoxWithClause(pos +
|
|
2252
|
+
let withClause = deserializeOptionBoxWithClause(pos + 88);
|
|
2251
2253
|
node.specifiers = specifiers;
|
|
2252
|
-
node.source = deserializeStringLiteral(pos +
|
|
2254
|
+
node.source = deserializeStringLiteral(pos + 40);
|
|
2253
2255
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2254
2256
|
return node;
|
|
2255
2257
|
}
|
|
@@ -2283,12 +2285,12 @@ function deserializeImportSpecifier(pos) {
|
|
|
2283
2285
|
type: "ImportSpecifier",
|
|
2284
2286
|
imported: null,
|
|
2285
2287
|
local: null,
|
|
2286
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
2288
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
2287
2289
|
start: deserializeU32(pos),
|
|
2288
2290
|
end: deserializeU32(pos + 4),
|
|
2289
2291
|
};
|
|
2290
|
-
node.imported = deserializeModuleExportName(pos +
|
|
2291
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2292
|
+
node.imported = deserializeModuleExportName(pos + 16);
|
|
2293
|
+
node.local = deserializeBindingIdentifier(pos + 72);
|
|
2292
2294
|
return node;
|
|
2293
2295
|
}
|
|
2294
2296
|
|
|
@@ -2299,7 +2301,7 @@ function deserializeImportDefaultSpecifier(pos) {
|
|
|
2299
2301
|
start: deserializeU32(pos),
|
|
2300
2302
|
end: deserializeU32(pos + 4),
|
|
2301
2303
|
};
|
|
2302
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2304
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2303
2305
|
return node;
|
|
2304
2306
|
}
|
|
2305
2307
|
|
|
@@ -2310,16 +2312,12 @@ function deserializeImportNamespaceSpecifier(pos) {
|
|
|
2310
2312
|
start: deserializeU32(pos),
|
|
2311
2313
|
end: deserializeU32(pos + 4),
|
|
2312
2314
|
};
|
|
2313
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2315
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2314
2316
|
return node;
|
|
2315
2317
|
}
|
|
2316
2318
|
|
|
2317
2319
|
function deserializeWithClause(pos) {
|
|
2318
|
-
return {
|
|
2319
|
-
attributes: deserializeVecImportAttribute(pos + 8),
|
|
2320
|
-
start: deserializeU32(pos),
|
|
2321
|
-
end: deserializeU32(pos + 4),
|
|
2322
|
-
};
|
|
2320
|
+
return { attributes: deserializeVecImportAttribute(pos + 16) };
|
|
2323
2321
|
}
|
|
2324
2322
|
|
|
2325
2323
|
function deserializeImportAttribute(pos) {
|
|
@@ -2330,8 +2328,8 @@ function deserializeImportAttribute(pos) {
|
|
|
2330
2328
|
start: deserializeU32(pos),
|
|
2331
2329
|
end: deserializeU32(pos + 4),
|
|
2332
2330
|
};
|
|
2333
|
-
node.key = deserializeImportAttributeKey(pos +
|
|
2334
|
-
node.value = deserializeStringLiteral(pos +
|
|
2331
|
+
node.key = deserializeImportAttributeKey(pos + 16);
|
|
2332
|
+
node.value = deserializeStringLiteral(pos + 72);
|
|
2335
2333
|
return node;
|
|
2336
2334
|
}
|
|
2337
2335
|
|
|
@@ -2352,15 +2350,15 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2352
2350
|
declaration: null,
|
|
2353
2351
|
specifiers: null,
|
|
2354
2352
|
source: null,
|
|
2355
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2353
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2356
2354
|
attributes: null,
|
|
2357
2355
|
start: deserializeU32(pos),
|
|
2358
2356
|
end: deserializeU32(pos + 4),
|
|
2359
2357
|
},
|
|
2360
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2361
|
-
node.declaration = deserializeOptionDeclaration(pos +
|
|
2362
|
-
node.specifiers = deserializeVecExportSpecifier(pos +
|
|
2363
|
-
node.source = deserializeOptionStringLiteral(pos +
|
|
2358
|
+
withClause = deserializeOptionBoxWithClause(pos + 104);
|
|
2359
|
+
node.declaration = deserializeOptionDeclaration(pos + 16);
|
|
2360
|
+
node.specifiers = deserializeVecExportSpecifier(pos + 32);
|
|
2361
|
+
node.source = deserializeOptionStringLiteral(pos + 56);
|
|
2364
2362
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2365
2363
|
return node;
|
|
2366
2364
|
}
|
|
@@ -2373,7 +2371,7 @@ function deserializeExportDefaultDeclaration(pos) {
|
|
|
2373
2371
|
start: deserializeU32(pos),
|
|
2374
2372
|
end: deserializeU32(pos + 4),
|
|
2375
2373
|
};
|
|
2376
|
-
node.declaration = deserializeExportDefaultDeclarationKind(pos +
|
|
2374
|
+
node.declaration = deserializeExportDefaultDeclarationKind(pos + 16);
|
|
2377
2375
|
node.exportKind = "value";
|
|
2378
2376
|
return node;
|
|
2379
2377
|
}
|
|
@@ -2384,13 +2382,13 @@ function deserializeExportAllDeclaration(pos) {
|
|
|
2384
2382
|
exported: null,
|
|
2385
2383
|
source: null,
|
|
2386
2384
|
attributes: null,
|
|
2387
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2385
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2388
2386
|
start: deserializeU32(pos),
|
|
2389
2387
|
end: deserializeU32(pos + 4),
|
|
2390
2388
|
},
|
|
2391
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2392
|
-
node.exported = deserializeOptionModuleExportName(pos +
|
|
2393
|
-
node.source = deserializeStringLiteral(pos +
|
|
2389
|
+
withClause = deserializeOptionBoxWithClause(pos + 120);
|
|
2390
|
+
node.exported = deserializeOptionModuleExportName(pos + 16);
|
|
2391
|
+
node.source = deserializeStringLiteral(pos + 72);
|
|
2394
2392
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2395
2393
|
return node;
|
|
2396
2394
|
}
|
|
@@ -2400,12 +2398,12 @@ function deserializeExportSpecifier(pos) {
|
|
|
2400
2398
|
type: "ExportSpecifier",
|
|
2401
2399
|
local: null,
|
|
2402
2400
|
exported: null,
|
|
2403
|
-
exportKind: deserializeImportOrExportKind(pos +
|
|
2401
|
+
exportKind: deserializeImportOrExportKind(pos + 12),
|
|
2404
2402
|
start: deserializeU32(pos),
|
|
2405
2403
|
end: deserializeU32(pos + 4),
|
|
2406
2404
|
};
|
|
2407
|
-
node.local = deserializeModuleExportName(pos +
|
|
2408
|
-
node.exported = deserializeModuleExportName(pos +
|
|
2405
|
+
node.local = deserializeModuleExportName(pos + 16);
|
|
2406
|
+
node.exported = deserializeModuleExportName(pos + 72);
|
|
2409
2407
|
return node;
|
|
2410
2408
|
}
|
|
2411
2409
|
|
|
@@ -2529,8 +2527,8 @@ function deserializeV8IntrinsicExpression(pos) {
|
|
|
2529
2527
|
start: deserializeU32(pos),
|
|
2530
2528
|
end: deserializeU32(pos + 4),
|
|
2531
2529
|
};
|
|
2532
|
-
node.name = deserializeIdentifierName(pos +
|
|
2533
|
-
node.arguments = deserializeVecArgument(pos +
|
|
2530
|
+
node.name = deserializeIdentifierName(pos + 16);
|
|
2531
|
+
node.arguments = deserializeVecArgument(pos + 48);
|
|
2534
2532
|
return node;
|
|
2535
2533
|
}
|
|
2536
2534
|
|
|
@@ -2566,7 +2564,7 @@ function deserializeNullLiteral(pos) {
|
|
|
2566
2564
|
function deserializeNumericLiteral(pos) {
|
|
2567
2565
|
return {
|
|
2568
2566
|
type: "Literal",
|
|
2569
|
-
value: deserializeF64(pos +
|
|
2567
|
+
value: deserializeF64(pos + 32),
|
|
2570
2568
|
raw: deserializeOptionStr(pos + 16),
|
|
2571
2569
|
start: deserializeU32(pos),
|
|
2572
2570
|
end: deserializeU32(pos + 4),
|
|
@@ -2577,12 +2575,12 @@ function deserializeStringLiteral(pos) {
|
|
|
2577
2575
|
let node = {
|
|
2578
2576
|
type: "Literal",
|
|
2579
2577
|
value: null,
|
|
2580
|
-
raw: deserializeOptionStr(pos +
|
|
2578
|
+
raw: deserializeOptionStr(pos + 32),
|
|
2581
2579
|
start: deserializeU32(pos),
|
|
2582
2580
|
end: deserializeU32(pos + 4),
|
|
2583
2581
|
},
|
|
2584
|
-
value = deserializeStr(pos +
|
|
2585
|
-
deserializeBool(pos +
|
|
2582
|
+
value = deserializeStr(pos + 16);
|
|
2583
|
+
deserializeBool(pos + 12) &&
|
|
2586
2584
|
(value = value.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
2587
2585
|
node.value = value;
|
|
2588
2586
|
return node;
|
|
@@ -2592,12 +2590,12 @@ function deserializeBigIntLiteral(pos) {
|
|
|
2592
2590
|
let node = {
|
|
2593
2591
|
type: "Literal",
|
|
2594
2592
|
value: null,
|
|
2595
|
-
raw: deserializeOptionStr(pos +
|
|
2593
|
+
raw: deserializeOptionStr(pos + 32),
|
|
2596
2594
|
bigint: null,
|
|
2597
2595
|
start: deserializeU32(pos),
|
|
2598
2596
|
end: deserializeU32(pos + 4),
|
|
2599
2597
|
},
|
|
2600
|
-
bigint = deserializeStr(pos +
|
|
2598
|
+
bigint = deserializeStr(pos + 16);
|
|
2601
2599
|
node.value = BigInt(bigint);
|
|
2602
2600
|
node.bigint = bigint;
|
|
2603
2601
|
return node;
|
|
@@ -2607,12 +2605,12 @@ function deserializeRegExpLiteral(pos) {
|
|
|
2607
2605
|
let node = {
|
|
2608
2606
|
type: "Literal",
|
|
2609
2607
|
value: null,
|
|
2610
|
-
raw: deserializeOptionStr(pos +
|
|
2608
|
+
raw: deserializeOptionStr(pos + 48),
|
|
2611
2609
|
regex: null,
|
|
2612
2610
|
start: deserializeU32(pos),
|
|
2613
2611
|
end: deserializeU32(pos + 4),
|
|
2614
2612
|
},
|
|
2615
|
-
regex = deserializeRegExp(pos +
|
|
2613
|
+
regex = deserializeRegExp(pos + 16),
|
|
2616
2614
|
value = null;
|
|
2617
2615
|
try {
|
|
2618
2616
|
value = new RegExp(regex.pattern, regex.flags);
|
|
@@ -2653,11 +2651,11 @@ function deserializeJSXElement(pos) {
|
|
|
2653
2651
|
start: deserializeU32(pos),
|
|
2654
2652
|
end: deserializeU32(pos + 4),
|
|
2655
2653
|
},
|
|
2656
|
-
closingElement = deserializeOptionBoxJSXClosingElement(pos +
|
|
2657
|
-
openingElement = deserializeBoxJSXOpeningElement(pos +
|
|
2654
|
+
closingElement = deserializeOptionBoxJSXClosingElement(pos + 48),
|
|
2655
|
+
openingElement = deserializeBoxJSXOpeningElement(pos + 16);
|
|
2658
2656
|
closingElement === null && (openingElement.selfClosing = true);
|
|
2659
2657
|
node.openingElement = openingElement;
|
|
2660
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2658
|
+
node.children = deserializeVecJSXChild(pos + 24);
|
|
2661
2659
|
node.closingElement = closingElement;
|
|
2662
2660
|
return node;
|
|
2663
2661
|
}
|
|
@@ -2672,9 +2670,9 @@ function deserializeJSXOpeningElement(pos) {
|
|
|
2672
2670
|
start: deserializeU32(pos),
|
|
2673
2671
|
end: deserializeU32(pos + 4),
|
|
2674
2672
|
};
|
|
2675
|
-
node.name = deserializeJSXElementName(pos +
|
|
2676
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
2677
|
-
node.attributes = deserializeVecJSXAttributeItem(pos +
|
|
2673
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2674
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
2675
|
+
node.attributes = deserializeVecJSXAttributeItem(pos + 40);
|
|
2678
2676
|
node.selfClosing = false;
|
|
2679
2677
|
return node;
|
|
2680
2678
|
}
|
|
@@ -2686,7 +2684,7 @@ function deserializeJSXClosingElement(pos) {
|
|
|
2686
2684
|
start: deserializeU32(pos),
|
|
2687
2685
|
end: deserializeU32(pos + 4),
|
|
2688
2686
|
};
|
|
2689
|
-
node.name = deserializeJSXElementName(pos +
|
|
2687
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2690
2688
|
return node;
|
|
2691
2689
|
}
|
|
2692
2690
|
|
|
@@ -2699,9 +2697,9 @@ function deserializeJSXFragment(pos) {
|
|
|
2699
2697
|
start: deserializeU32(pos),
|
|
2700
2698
|
end: deserializeU32(pos + 4),
|
|
2701
2699
|
};
|
|
2702
|
-
node.openingFragment = deserializeJSXOpeningFragment(pos +
|
|
2703
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2704
|
-
node.closingFragment = deserializeJSXClosingFragment(pos +
|
|
2700
|
+
node.openingFragment = deserializeJSXOpeningFragment(pos + 16);
|
|
2701
|
+
node.children = deserializeVecJSXChild(pos + 32);
|
|
2702
|
+
node.closingFragment = deserializeJSXClosingFragment(pos + 56);
|
|
2705
2703
|
return node;
|
|
2706
2704
|
}
|
|
2707
2705
|
|
|
@@ -2758,8 +2756,8 @@ function deserializeJSXNamespacedName(pos) {
|
|
|
2758
2756
|
start: deserializeU32(pos),
|
|
2759
2757
|
end: deserializeU32(pos + 4),
|
|
2760
2758
|
};
|
|
2761
|
-
node.namespace = deserializeJSXIdentifier(pos +
|
|
2762
|
-
node.name = deserializeJSXIdentifier(pos +
|
|
2759
|
+
node.namespace = deserializeJSXIdentifier(pos + 16);
|
|
2760
|
+
node.name = deserializeJSXIdentifier(pos + 48);
|
|
2763
2761
|
return node;
|
|
2764
2762
|
}
|
|
2765
2763
|
|
|
@@ -2771,8 +2769,8 @@ function deserializeJSXMemberExpression(pos) {
|
|
|
2771
2769
|
start: deserializeU32(pos),
|
|
2772
2770
|
end: deserializeU32(pos + 4),
|
|
2773
2771
|
};
|
|
2774
|
-
node.object = deserializeJSXMemberExpressionObject(pos +
|
|
2775
|
-
node.property = deserializeJSXIdentifier(pos +
|
|
2772
|
+
node.object = deserializeJSXMemberExpressionObject(pos + 16);
|
|
2773
|
+
node.property = deserializeJSXIdentifier(pos + 32);
|
|
2776
2774
|
return node;
|
|
2777
2775
|
}
|
|
2778
2776
|
|
|
@@ -2808,7 +2806,7 @@ function deserializeJSXExpressionContainer(pos) {
|
|
|
2808
2806
|
start: deserializeU32(pos),
|
|
2809
2807
|
end: deserializeU32(pos + 4),
|
|
2810
2808
|
};
|
|
2811
|
-
node.expression = deserializeJSXExpression(pos +
|
|
2809
|
+
node.expression = deserializeJSXExpression(pos + 16);
|
|
2812
2810
|
return node;
|
|
2813
2811
|
}
|
|
2814
2812
|
|
|
@@ -2934,8 +2932,8 @@ function deserializeJSXAttribute(pos) {
|
|
|
2934
2932
|
start: deserializeU32(pos),
|
|
2935
2933
|
end: deserializeU32(pos + 4),
|
|
2936
2934
|
};
|
|
2937
|
-
node.name = deserializeJSXAttributeName(pos +
|
|
2938
|
-
node.value = deserializeOptionJSXAttributeValue(pos +
|
|
2935
|
+
node.name = deserializeJSXAttributeName(pos + 16);
|
|
2936
|
+
node.value = deserializeOptionJSXAttributeValue(pos + 32);
|
|
2939
2937
|
return node;
|
|
2940
2938
|
}
|
|
2941
2939
|
|
|
@@ -2946,7 +2944,7 @@ function deserializeJSXSpreadAttribute(pos) {
|
|
|
2946
2944
|
start: deserializeU32(pos),
|
|
2947
2945
|
end: deserializeU32(pos + 4),
|
|
2948
2946
|
};
|
|
2949
|
-
node.argument = deserializeExpression(pos +
|
|
2947
|
+
node.argument = deserializeExpression(pos + 16);
|
|
2950
2948
|
return node;
|
|
2951
2949
|
}
|
|
2952
2950
|
|
|
@@ -2979,7 +2977,7 @@ function deserializeJSXAttributeValue(pos) {
|
|
|
2979
2977
|
function deserializeJSXIdentifier(pos) {
|
|
2980
2978
|
return {
|
|
2981
2979
|
type: "JSXIdentifier",
|
|
2982
|
-
name: deserializeStr(pos +
|
|
2980
|
+
name: deserializeStr(pos + 16),
|
|
2983
2981
|
start: deserializeU32(pos),
|
|
2984
2982
|
end: deserializeU32(pos + 4),
|
|
2985
2983
|
};
|
|
@@ -3009,15 +3007,15 @@ function deserializeJSXSpreadChild(pos) {
|
|
|
3009
3007
|
start: deserializeU32(pos),
|
|
3010
3008
|
end: deserializeU32(pos + 4),
|
|
3011
3009
|
};
|
|
3012
|
-
node.expression = deserializeExpression(pos +
|
|
3010
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3013
3011
|
return node;
|
|
3014
3012
|
}
|
|
3015
3013
|
|
|
3016
3014
|
function deserializeJSXText(pos) {
|
|
3017
3015
|
return {
|
|
3018
3016
|
type: "JSXText",
|
|
3019
|
-
value: deserializeStr(pos +
|
|
3020
|
-
raw: deserializeOptionStr(pos +
|
|
3017
|
+
value: deserializeStr(pos + 16),
|
|
3018
|
+
raw: deserializeOptionStr(pos + 32),
|
|
3021
3019
|
start: deserializeU32(pos),
|
|
3022
3020
|
end: deserializeU32(pos + 4),
|
|
3023
3021
|
};
|
|
@@ -3036,7 +3034,7 @@ function deserializeTSThisParameter(pos) {
|
|
|
3036
3034
|
node.decorators = [];
|
|
3037
3035
|
node.name = "this";
|
|
3038
3036
|
node.optional = false;
|
|
3039
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3037
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
|
|
3040
3038
|
return node;
|
|
3041
3039
|
}
|
|
3042
3040
|
|
|
@@ -3045,13 +3043,13 @@ function deserializeTSEnumDeclaration(pos) {
|
|
|
3045
3043
|
type: "TSEnumDeclaration",
|
|
3046
3044
|
id: null,
|
|
3047
3045
|
body: null,
|
|
3048
|
-
const: deserializeBool(pos +
|
|
3049
|
-
declare: deserializeBool(pos +
|
|
3046
|
+
const: deserializeBool(pos + 12),
|
|
3047
|
+
declare: deserializeBool(pos + 13),
|
|
3050
3048
|
start: deserializeU32(pos),
|
|
3051
3049
|
end: deserializeU32(pos + 4),
|
|
3052
3050
|
};
|
|
3053
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3054
|
-
node.body = deserializeTSEnumBody(pos +
|
|
3051
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3052
|
+
node.body = deserializeTSEnumBody(pos + 48);
|
|
3055
3053
|
return node;
|
|
3056
3054
|
}
|
|
3057
3055
|
|
|
@@ -3062,7 +3060,7 @@ function deserializeTSEnumBody(pos) {
|
|
|
3062
3060
|
start: deserializeU32(pos),
|
|
3063
3061
|
end: deserializeU32(pos + 4),
|
|
3064
3062
|
};
|
|
3065
|
-
node.members = deserializeVecTSEnumMember(pos +
|
|
3063
|
+
node.members = deserializeVecTSEnumMember(pos + 16);
|
|
3066
3064
|
return node;
|
|
3067
3065
|
}
|
|
3068
3066
|
|
|
@@ -3075,9 +3073,9 @@ function deserializeTSEnumMember(pos) {
|
|
|
3075
3073
|
start: deserializeU32(pos),
|
|
3076
3074
|
end: deserializeU32(pos + 4),
|
|
3077
3075
|
};
|
|
3078
|
-
node.id = deserializeTSEnumMemberName(pos +
|
|
3079
|
-
node.initializer = deserializeOptionExpression(pos +
|
|
3080
|
-
node.computed = deserializeU8(pos +
|
|
3076
|
+
node.id = deserializeTSEnumMemberName(pos + 16);
|
|
3077
|
+
node.initializer = deserializeOptionExpression(pos + 32);
|
|
3078
|
+
node.computed = deserializeU8(pos + 16) > 1;
|
|
3081
3079
|
return node;
|
|
3082
3080
|
}
|
|
3083
3081
|
|
|
@@ -3103,7 +3101,7 @@ function deserializeTSTypeAnnotation(pos) {
|
|
|
3103
3101
|
start: deserializeU32(pos),
|
|
3104
3102
|
end: deserializeU32(pos + 4),
|
|
3105
3103
|
};
|
|
3106
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3104
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3107
3105
|
return node;
|
|
3108
3106
|
}
|
|
3109
3107
|
|
|
@@ -3114,7 +3112,7 @@ function deserializeTSLiteralType(pos) {
|
|
|
3114
3112
|
start: deserializeU32(pos),
|
|
3115
3113
|
end: deserializeU32(pos + 4),
|
|
3116
3114
|
};
|
|
3117
|
-
node.literal = deserializeTSLiteral(pos +
|
|
3115
|
+
node.literal = deserializeTSLiteral(pos + 16);
|
|
3118
3116
|
return node;
|
|
3119
3117
|
}
|
|
3120
3118
|
|
|
@@ -3228,10 +3226,10 @@ function deserializeTSConditionalType(pos) {
|
|
|
3228
3226
|
start: deserializeU32(pos),
|
|
3229
3227
|
end: deserializeU32(pos + 4),
|
|
3230
3228
|
};
|
|
3231
|
-
node.checkType = deserializeTSType(pos +
|
|
3232
|
-
node.extendsType = deserializeTSType(pos +
|
|
3233
|
-
node.trueType = deserializeTSType(pos +
|
|
3234
|
-
node.falseType = deserializeTSType(pos +
|
|
3229
|
+
node.checkType = deserializeTSType(pos + 16);
|
|
3230
|
+
node.extendsType = deserializeTSType(pos + 32);
|
|
3231
|
+
node.trueType = deserializeTSType(pos + 48);
|
|
3232
|
+
node.falseType = deserializeTSType(pos + 64);
|
|
3235
3233
|
return node;
|
|
3236
3234
|
}
|
|
3237
3235
|
|
|
@@ -3242,7 +3240,7 @@ function deserializeTSUnionType(pos) {
|
|
|
3242
3240
|
start: deserializeU32(pos),
|
|
3243
3241
|
end: deserializeU32(pos + 4),
|
|
3244
3242
|
};
|
|
3245
|
-
node.types = deserializeVecTSType(pos +
|
|
3243
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3246
3244
|
return node;
|
|
3247
3245
|
}
|
|
3248
3246
|
|
|
@@ -3253,7 +3251,7 @@ function deserializeTSIntersectionType(pos) {
|
|
|
3253
3251
|
start: deserializeU32(pos),
|
|
3254
3252
|
end: deserializeU32(pos + 4),
|
|
3255
3253
|
};
|
|
3256
|
-
node.types = deserializeVecTSType(pos +
|
|
3254
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3257
3255
|
return node;
|
|
3258
3256
|
}
|
|
3259
3257
|
|
|
@@ -3265,19 +3263,19 @@ function deserializeTSParenthesizedType(pos) {
|
|
|
3265
3263
|
start: deserializeU32(pos),
|
|
3266
3264
|
end: deserializeU32(pos + 4),
|
|
3267
3265
|
};
|
|
3268
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3266
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3269
3267
|
return node;
|
|
3270
3268
|
}
|
|
3271
3269
|
|
|
3272
3270
|
function deserializeTSTypeOperator(pos) {
|
|
3273
3271
|
let node = {
|
|
3274
3272
|
type: "TSTypeOperator",
|
|
3275
|
-
operator: deserializeTSTypeOperatorOperator(pos +
|
|
3273
|
+
operator: deserializeTSTypeOperatorOperator(pos + 12),
|
|
3276
3274
|
typeAnnotation: null,
|
|
3277
3275
|
start: deserializeU32(pos),
|
|
3278
3276
|
end: deserializeU32(pos + 4),
|
|
3279
3277
|
};
|
|
3280
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3278
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3281
3279
|
return node;
|
|
3282
3280
|
}
|
|
3283
3281
|
|
|
@@ -3301,7 +3299,7 @@ function deserializeTSArrayType(pos) {
|
|
|
3301
3299
|
start: deserializeU32(pos),
|
|
3302
3300
|
end: deserializeU32(pos + 4),
|
|
3303
3301
|
};
|
|
3304
|
-
node.elementType = deserializeTSType(pos +
|
|
3302
|
+
node.elementType = deserializeTSType(pos + 16);
|
|
3305
3303
|
return node;
|
|
3306
3304
|
}
|
|
3307
3305
|
|
|
@@ -3313,8 +3311,8 @@ function deserializeTSIndexedAccessType(pos) {
|
|
|
3313
3311
|
start: deserializeU32(pos),
|
|
3314
3312
|
end: deserializeU32(pos + 4),
|
|
3315
3313
|
};
|
|
3316
|
-
node.objectType = deserializeTSType(pos +
|
|
3317
|
-
node.indexType = deserializeTSType(pos +
|
|
3314
|
+
node.objectType = deserializeTSType(pos + 16);
|
|
3315
|
+
node.indexType = deserializeTSType(pos + 32);
|
|
3318
3316
|
return node;
|
|
3319
3317
|
}
|
|
3320
3318
|
|
|
@@ -3325,7 +3323,7 @@ function deserializeTSTupleType(pos) {
|
|
|
3325
3323
|
start: deserializeU32(pos),
|
|
3326
3324
|
end: deserializeU32(pos + 4),
|
|
3327
3325
|
};
|
|
3328
|
-
node.elementTypes = deserializeVecTSTupleElement(pos +
|
|
3326
|
+
node.elementTypes = deserializeVecTSTupleElement(pos + 16);
|
|
3329
3327
|
return node;
|
|
3330
3328
|
}
|
|
3331
3329
|
|
|
@@ -3334,12 +3332,12 @@ function deserializeTSNamedTupleMember(pos) {
|
|
|
3334
3332
|
type: "TSNamedTupleMember",
|
|
3335
3333
|
label: null,
|
|
3336
3334
|
elementType: null,
|
|
3337
|
-
optional: deserializeBool(pos +
|
|
3335
|
+
optional: deserializeBool(pos + 12),
|
|
3338
3336
|
start: deserializeU32(pos),
|
|
3339
3337
|
end: deserializeU32(pos + 4),
|
|
3340
3338
|
};
|
|
3341
|
-
node.label = deserializeIdentifierName(pos +
|
|
3342
|
-
node.elementType = deserializeTSTupleElement(pos +
|
|
3339
|
+
node.label = deserializeIdentifierName(pos + 16);
|
|
3340
|
+
node.elementType = deserializeTSTupleElement(pos + 48);
|
|
3343
3341
|
return node;
|
|
3344
3342
|
}
|
|
3345
3343
|
|
|
@@ -3350,7 +3348,7 @@ function deserializeTSOptionalType(pos) {
|
|
|
3350
3348
|
start: deserializeU32(pos),
|
|
3351
3349
|
end: deserializeU32(pos + 4),
|
|
3352
3350
|
};
|
|
3353
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3351
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3354
3352
|
return node;
|
|
3355
3353
|
}
|
|
3356
3354
|
|
|
@@ -3361,7 +3359,7 @@ function deserializeTSRestType(pos) {
|
|
|
3361
3359
|
start: deserializeU32(pos),
|
|
3362
3360
|
end: deserializeU32(pos + 4),
|
|
3363
3361
|
};
|
|
3364
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3362
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3365
3363
|
return node;
|
|
3366
3364
|
}
|
|
3367
3365
|
|
|
@@ -3570,8 +3568,8 @@ function deserializeTSTypeReference(pos) {
|
|
|
3570
3568
|
start: deserializeU32(pos),
|
|
3571
3569
|
end: deserializeU32(pos + 4),
|
|
3572
3570
|
};
|
|
3573
|
-
node.typeName = deserializeTSTypeName(pos +
|
|
3574
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3571
|
+
node.typeName = deserializeTSTypeName(pos + 16);
|
|
3572
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3575
3573
|
return node;
|
|
3576
3574
|
}
|
|
3577
3575
|
|
|
@@ -3596,8 +3594,8 @@ function deserializeTSQualifiedName(pos) {
|
|
|
3596
3594
|
start: deserializeU32(pos),
|
|
3597
3595
|
end: deserializeU32(pos + 4),
|
|
3598
3596
|
};
|
|
3599
|
-
node.left = deserializeTSTypeName(pos +
|
|
3600
|
-
node.right = deserializeIdentifierName(pos +
|
|
3597
|
+
node.left = deserializeTSTypeName(pos + 16);
|
|
3598
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
3601
3599
|
return node;
|
|
3602
3600
|
}
|
|
3603
3601
|
|
|
@@ -3608,7 +3606,7 @@ function deserializeTSTypeParameterInstantiation(pos) {
|
|
|
3608
3606
|
start: deserializeU32(pos),
|
|
3609
3607
|
end: deserializeU32(pos + 4),
|
|
3610
3608
|
};
|
|
3611
|
-
node.params = deserializeVecTSType(pos +
|
|
3609
|
+
node.params = deserializeVecTSType(pos + 16);
|
|
3612
3610
|
return node;
|
|
3613
3611
|
}
|
|
3614
3612
|
|
|
@@ -3618,15 +3616,15 @@ function deserializeTSTypeParameter(pos) {
|
|
|
3618
3616
|
name: null,
|
|
3619
3617
|
constraint: null,
|
|
3620
3618
|
default: null,
|
|
3621
|
-
in: deserializeBool(pos +
|
|
3622
|
-
out: deserializeBool(pos +
|
|
3623
|
-
const: deserializeBool(pos +
|
|
3619
|
+
in: deserializeBool(pos + 12),
|
|
3620
|
+
out: deserializeBool(pos + 13),
|
|
3621
|
+
const: deserializeBool(pos + 14),
|
|
3624
3622
|
start: deserializeU32(pos),
|
|
3625
3623
|
end: deserializeU32(pos + 4),
|
|
3626
3624
|
};
|
|
3627
|
-
node.name = deserializeBindingIdentifier(pos +
|
|
3628
|
-
node.constraint = deserializeOptionTSType(pos +
|
|
3629
|
-
node.default = deserializeOptionTSType(pos +
|
|
3625
|
+
node.name = deserializeBindingIdentifier(pos + 16);
|
|
3626
|
+
node.constraint = deserializeOptionTSType(pos + 48);
|
|
3627
|
+
node.default = deserializeOptionTSType(pos + 64);
|
|
3630
3628
|
return node;
|
|
3631
3629
|
}
|
|
3632
3630
|
|
|
@@ -3637,7 +3635,7 @@ function deserializeTSTypeParameterDeclaration(pos) {
|
|
|
3637
3635
|
start: deserializeU32(pos),
|
|
3638
3636
|
end: deserializeU32(pos + 4),
|
|
3639
3637
|
};
|
|
3640
|
-
node.params = deserializeVecTSTypeParameter(pos +
|
|
3638
|
+
node.params = deserializeVecTSTypeParameter(pos + 16);
|
|
3641
3639
|
return node;
|
|
3642
3640
|
}
|
|
3643
3641
|
|
|
@@ -3651,9 +3649,9 @@ function deserializeTSTypeAliasDeclaration(pos) {
|
|
|
3651
3649
|
start: deserializeU32(pos),
|
|
3652
3650
|
end: deserializeU32(pos + 4),
|
|
3653
3651
|
};
|
|
3654
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3655
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3656
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3652
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3653
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3654
|
+
node.typeAnnotation = deserializeTSType(pos + 56);
|
|
3657
3655
|
return node;
|
|
3658
3656
|
}
|
|
3659
3657
|
|
|
@@ -3678,7 +3676,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
3678
3676
|
start: deserializeU32(pos),
|
|
3679
3677
|
end: deserializeU32(pos + 4),
|
|
3680
3678
|
},
|
|
3681
|
-
expression = deserializeTSTypeName(pos +
|
|
3679
|
+
expression = deserializeTSTypeName(pos + 16);
|
|
3682
3680
|
if (expression.type === "TSQualifiedName") {
|
|
3683
3681
|
let object = expression.left,
|
|
3684
3682
|
{ right } = expression,
|
|
@@ -3706,7 +3704,7 @@ function deserializeTSClassImplements(pos) {
|
|
|
3706
3704
|
}
|
|
3707
3705
|
}
|
|
3708
3706
|
node.expression = expression;
|
|
3709
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3707
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3710
3708
|
return node;
|
|
3711
3709
|
}
|
|
3712
3710
|
|
|
@@ -3721,10 +3719,10 @@ function deserializeTSInterfaceDeclaration(pos) {
|
|
|
3721
3719
|
start: deserializeU32(pos),
|
|
3722
3720
|
end: deserializeU32(pos + 4),
|
|
3723
3721
|
};
|
|
3724
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3725
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3726
|
-
node.extends = deserializeVecTSInterfaceHeritage(pos +
|
|
3727
|
-
node.body = deserializeBoxTSInterfaceBody(pos +
|
|
3722
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3723
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3724
|
+
node.extends = deserializeVecTSInterfaceHeritage(pos + 56);
|
|
3725
|
+
node.body = deserializeBoxTSInterfaceBody(pos + 80);
|
|
3728
3726
|
return node;
|
|
3729
3727
|
}
|
|
3730
3728
|
|
|
@@ -3735,16 +3733,16 @@ function deserializeTSInterfaceBody(pos) {
|
|
|
3735
3733
|
start: deserializeU32(pos),
|
|
3736
3734
|
end: deserializeU32(pos + 4),
|
|
3737
3735
|
};
|
|
3738
|
-
node.body = deserializeVecTSSignature(pos +
|
|
3736
|
+
node.body = deserializeVecTSSignature(pos + 16);
|
|
3739
3737
|
return node;
|
|
3740
3738
|
}
|
|
3741
3739
|
|
|
3742
3740
|
function deserializeTSPropertySignature(pos) {
|
|
3743
3741
|
let node = {
|
|
3744
3742
|
type: "TSPropertySignature",
|
|
3745
|
-
computed: deserializeBool(pos +
|
|
3746
|
-
optional: deserializeBool(pos +
|
|
3747
|
-
readonly: deserializeBool(pos +
|
|
3743
|
+
computed: deserializeBool(pos + 12),
|
|
3744
|
+
optional: deserializeBool(pos + 13),
|
|
3745
|
+
readonly: deserializeBool(pos + 14),
|
|
3748
3746
|
key: null,
|
|
3749
3747
|
typeAnnotation: null,
|
|
3750
3748
|
accessibility: null,
|
|
@@ -3752,8 +3750,8 @@ function deserializeTSPropertySignature(pos) {
|
|
|
3752
3750
|
start: deserializeU32(pos),
|
|
3753
3751
|
end: deserializeU32(pos + 4),
|
|
3754
3752
|
};
|
|
3755
|
-
node.key = deserializePropertyKey(pos +
|
|
3756
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3753
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
3754
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3757
3755
|
node.static = false;
|
|
3758
3756
|
return node;
|
|
3759
3757
|
}
|
|
@@ -3780,14 +3778,14 @@ function deserializeTSIndexSignature(pos) {
|
|
|
3780
3778
|
type: "TSIndexSignature",
|
|
3781
3779
|
parameters: null,
|
|
3782
3780
|
typeAnnotation: null,
|
|
3783
|
-
readonly: deserializeBool(pos +
|
|
3784
|
-
static: deserializeBool(pos +
|
|
3781
|
+
readonly: deserializeBool(pos + 12),
|
|
3782
|
+
static: deserializeBool(pos + 13),
|
|
3785
3783
|
accessibility: null,
|
|
3786
3784
|
start: deserializeU32(pos),
|
|
3787
3785
|
end: deserializeU32(pos + 4),
|
|
3788
3786
|
};
|
|
3789
|
-
node.parameters = deserializeVecTSIndexSignatureName(pos +
|
|
3790
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
3787
|
+
node.parameters = deserializeVecTSIndexSignatureName(pos + 16);
|
|
3788
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
3791
3789
|
return node;
|
|
3792
3790
|
}
|
|
3793
3791
|
|
|
@@ -3800,12 +3798,12 @@ function deserializeTSCallSignatureDeclaration(pos) {
|
|
|
3800
3798
|
start: deserializeU32(pos),
|
|
3801
3799
|
end: deserializeU32(pos + 4),
|
|
3802
3800
|
},
|
|
3803
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3804
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3801
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
3802
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
3805
3803
|
thisParam !== null && params.unshift(thisParam);
|
|
3806
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3804
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
3807
3805
|
node.params = params;
|
|
3808
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3806
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
3809
3807
|
return node;
|
|
3810
3808
|
}
|
|
3811
3809
|
|
|
@@ -3838,13 +3836,13 @@ function deserializeTSMethodSignature(pos) {
|
|
|
3838
3836
|
start: deserializeU32(pos),
|
|
3839
3837
|
end: deserializeU32(pos + 4),
|
|
3840
3838
|
},
|
|
3841
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3842
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3839
|
+
params = deserializeBoxFormalParameters(pos + 48),
|
|
3840
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 40);
|
|
3843
3841
|
thisParam !== null && params.unshift(thisParam);
|
|
3844
|
-
node.key = deserializePropertyKey(pos +
|
|
3845
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3842
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
3843
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 32);
|
|
3846
3844
|
node.params = params;
|
|
3847
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3845
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
3848
3846
|
node.readonly = false;
|
|
3849
3847
|
node.static = false;
|
|
3850
3848
|
return node;
|
|
@@ -3859,9 +3857,9 @@ function deserializeTSConstructSignatureDeclaration(pos) {
|
|
|
3859
3857
|
start: deserializeU32(pos),
|
|
3860
3858
|
end: deserializeU32(pos + 4),
|
|
3861
3859
|
};
|
|
3862
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3863
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
3864
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3860
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
3861
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
3862
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3865
3863
|
return node;
|
|
3866
3864
|
}
|
|
3867
3865
|
|
|
@@ -3869,7 +3867,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
3869
3867
|
let node = {
|
|
3870
3868
|
type: "Identifier",
|
|
3871
3869
|
decorators: null,
|
|
3872
|
-
name: deserializeStr(pos +
|
|
3870
|
+
name: deserializeStr(pos + 16),
|
|
3873
3871
|
optional: null,
|
|
3874
3872
|
typeAnnotation: null,
|
|
3875
3873
|
start: deserializeU32(pos),
|
|
@@ -3877,7 +3875,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
3877
3875
|
};
|
|
3878
3876
|
node.decorators = [];
|
|
3879
3877
|
node.optional = false;
|
|
3880
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
3878
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
3881
3879
|
return node;
|
|
3882
3880
|
}
|
|
3883
3881
|
|
|
@@ -3889,8 +3887,8 @@ function deserializeTSInterfaceHeritage(pos) {
|
|
|
3889
3887
|
start: deserializeU32(pos),
|
|
3890
3888
|
end: deserializeU32(pos + 4),
|
|
3891
3889
|
};
|
|
3892
|
-
node.expression = deserializeExpression(pos +
|
|
3893
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3890
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3891
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3894
3892
|
return node;
|
|
3895
3893
|
}
|
|
3896
3894
|
|
|
@@ -3898,13 +3896,13 @@ function deserializeTSTypePredicate(pos) {
|
|
|
3898
3896
|
let node = {
|
|
3899
3897
|
type: "TSTypePredicate",
|
|
3900
3898
|
parameterName: null,
|
|
3901
|
-
asserts: deserializeBool(pos +
|
|
3899
|
+
asserts: deserializeBool(pos + 12),
|
|
3902
3900
|
typeAnnotation: null,
|
|
3903
3901
|
start: deserializeU32(pos),
|
|
3904
3902
|
end: deserializeU32(pos + 4),
|
|
3905
3903
|
};
|
|
3906
|
-
node.parameterName = deserializeTSTypePredicateName(pos +
|
|
3907
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3904
|
+
node.parameterName = deserializeTSTypePredicateName(pos + 16);
|
|
3905
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
3908
3906
|
return node;
|
|
3909
3907
|
}
|
|
3910
3908
|
|
|
@@ -3925,7 +3923,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3925
3923
|
end = deserializeU32(pos + 4),
|
|
3926
3924
|
declare = deserializeBool(pos + 89),
|
|
3927
3925
|
node,
|
|
3928
|
-
body = deserializeOptionTSModuleDeclarationBody(pos +
|
|
3926
|
+
body = deserializeOptionTSModuleDeclarationBody(pos + 72);
|
|
3929
3927
|
if (body === null) {
|
|
3930
3928
|
node = {
|
|
3931
3929
|
type: "TSModuleDeclaration",
|
|
@@ -3936,7 +3934,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3936
3934
|
start,
|
|
3937
3935
|
end,
|
|
3938
3936
|
};
|
|
3939
|
-
node.id = deserializeTSModuleDeclarationName(pos +
|
|
3937
|
+
node.id = deserializeTSModuleDeclarationName(pos + 16);
|
|
3940
3938
|
} else {
|
|
3941
3939
|
node = {
|
|
3942
3940
|
type: "TSModuleDeclaration",
|
|
@@ -3948,7 +3946,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3948
3946
|
start,
|
|
3949
3947
|
end,
|
|
3950
3948
|
};
|
|
3951
|
-
let id = deserializeTSModuleDeclarationName(pos +
|
|
3949
|
+
let id = deserializeTSModuleDeclarationName(pos + 16);
|
|
3952
3950
|
if (body.type === "TSModuleBlock") node.id = id;
|
|
3953
3951
|
else {
|
|
3954
3952
|
let innerId = body.id;
|
|
@@ -4038,10 +4036,10 @@ function deserializeTSGlobalDeclaration(pos) {
|
|
|
4038
4036
|
name: "global",
|
|
4039
4037
|
optional: false,
|
|
4040
4038
|
typeAnnotation: null,
|
|
4041
|
-
start: deserializeU32(pos +
|
|
4042
|
-
end: deserializeU32(pos +
|
|
4039
|
+
start: deserializeU32(pos + 16),
|
|
4040
|
+
end: deserializeU32(pos + 20),
|
|
4043
4041
|
};
|
|
4044
|
-
node.body = deserializeTSModuleBlock(pos +
|
|
4042
|
+
node.body = deserializeTSModuleBlock(pos + 24);
|
|
4045
4043
|
node.kind = "global";
|
|
4046
4044
|
node.global = true;
|
|
4047
4045
|
return node;
|
|
@@ -4054,8 +4052,8 @@ function deserializeTSModuleBlock(pos) {
|
|
|
4054
4052
|
start: deserializeU32(pos),
|
|
4055
4053
|
end: deserializeU32(pos + 4),
|
|
4056
4054
|
},
|
|
4057
|
-
body = deserializeVecDirective(pos +
|
|
4058
|
-
body.push(...deserializeVecStatement(pos +
|
|
4055
|
+
body = deserializeVecDirective(pos + 16);
|
|
4056
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
4059
4057
|
node.body = body;
|
|
4060
4058
|
return node;
|
|
4061
4059
|
}
|
|
@@ -4067,7 +4065,7 @@ function deserializeTSTypeLiteral(pos) {
|
|
|
4067
4065
|
start: deserializeU32(pos),
|
|
4068
4066
|
end: deserializeU32(pos + 4),
|
|
4069
4067
|
};
|
|
4070
|
-
node.members = deserializeVecTSSignature(pos +
|
|
4068
|
+
node.members = deserializeVecTSSignature(pos + 16);
|
|
4071
4069
|
return node;
|
|
4072
4070
|
}
|
|
4073
4071
|
|
|
@@ -4078,7 +4076,7 @@ function deserializeTSInferType(pos) {
|
|
|
4078
4076
|
start: deserializeU32(pos),
|
|
4079
4077
|
end: deserializeU32(pos + 4),
|
|
4080
4078
|
};
|
|
4081
|
-
node.typeParameter = deserializeBoxTSTypeParameter(pos +
|
|
4079
|
+
node.typeParameter = deserializeBoxTSTypeParameter(pos + 16);
|
|
4082
4080
|
return node;
|
|
4083
4081
|
}
|
|
4084
4082
|
|
|
@@ -4090,8 +4088,8 @@ function deserializeTSTypeQuery(pos) {
|
|
|
4090
4088
|
start: deserializeU32(pos),
|
|
4091
4089
|
end: deserializeU32(pos + 4),
|
|
4092
4090
|
};
|
|
4093
|
-
node.exprName = deserializeTSTypeQueryExprName(pos +
|
|
4094
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4091
|
+
node.exprName = deserializeTSTypeQueryExprName(pos + 16);
|
|
4092
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4095
4093
|
return node;
|
|
4096
4094
|
}
|
|
4097
4095
|
|
|
@@ -4120,10 +4118,10 @@ function deserializeTSImportType(pos) {
|
|
|
4120
4118
|
start: deserializeU32(pos),
|
|
4121
4119
|
end: deserializeU32(pos + 4),
|
|
4122
4120
|
};
|
|
4123
|
-
node.source = deserializeStringLiteral(pos +
|
|
4124
|
-
node.options = deserializeOptionBoxObjectExpression(pos +
|
|
4125
|
-
node.qualifier = deserializeOptionTSImportTypeQualifier(pos +
|
|
4126
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4121
|
+
node.source = deserializeStringLiteral(pos + 16);
|
|
4122
|
+
node.options = deserializeOptionBoxObjectExpression(pos + 64);
|
|
4123
|
+
node.qualifier = deserializeOptionTSImportTypeQualifier(pos + 72);
|
|
4124
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 88);
|
|
4127
4125
|
return node;
|
|
4128
4126
|
}
|
|
4129
4127
|
|
|
@@ -4146,8 +4144,8 @@ function deserializeTSImportTypeQualifiedName(pos) {
|
|
|
4146
4144
|
start: deserializeU32(pos),
|
|
4147
4145
|
end: deserializeU32(pos + 4),
|
|
4148
4146
|
};
|
|
4149
|
-
node.left = deserializeTSImportTypeQualifier(pos +
|
|
4150
|
-
node.right = deserializeIdentifierName(pos +
|
|
4147
|
+
node.left = deserializeTSImportTypeQualifier(pos + 16);
|
|
4148
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
4151
4149
|
return node;
|
|
4152
4150
|
}
|
|
4153
4151
|
|
|
@@ -4160,12 +4158,12 @@ function deserializeTSFunctionType(pos) {
|
|
|
4160
4158
|
start: deserializeU32(pos),
|
|
4161
4159
|
end: deserializeU32(pos + 4),
|
|
4162
4160
|
},
|
|
4163
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4164
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4161
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
4162
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
4165
4163
|
thisParam !== null && params.unshift(thisParam);
|
|
4166
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4164
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4167
4165
|
node.params = params;
|
|
4168
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4166
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
4169
4167
|
return node;
|
|
4170
4168
|
}
|
|
4171
4169
|
|
|
@@ -4179,9 +4177,9 @@ function deserializeTSConstructorType(pos) {
|
|
|
4179
4177
|
start: deserializeU32(pos),
|
|
4180
4178
|
end: deserializeU32(pos + 4),
|
|
4181
4179
|
};
|
|
4182
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4183
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
4184
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4180
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4181
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4182
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4185
4183
|
return node;
|
|
4186
4184
|
}
|
|
4187
4185
|
|
|
@@ -4199,10 +4197,10 @@ function deserializeTSMappedType(pos) {
|
|
|
4199
4197
|
},
|
|
4200
4198
|
optional = deserializeOptionTSMappedTypeModifierOperator(pos + 96);
|
|
4201
4199
|
optional === null && (optional = false);
|
|
4202
|
-
node.key = deserializeBindingIdentifier(pos +
|
|
4203
|
-
node.constraint = deserializeTSType(pos +
|
|
4204
|
-
node.nameType = deserializeOptionTSType(pos +
|
|
4205
|
-
node.typeAnnotation = deserializeOptionTSType(pos +
|
|
4200
|
+
node.key = deserializeBindingIdentifier(pos + 16);
|
|
4201
|
+
node.constraint = deserializeTSType(pos + 48);
|
|
4202
|
+
node.nameType = deserializeOptionTSType(pos + 64);
|
|
4203
|
+
node.typeAnnotation = deserializeOptionTSType(pos + 80);
|
|
4206
4204
|
node.optional = optional;
|
|
4207
4205
|
return node;
|
|
4208
4206
|
}
|
|
@@ -4228,8 +4226,8 @@ function deserializeTSTemplateLiteralType(pos) {
|
|
|
4228
4226
|
start: deserializeU32(pos),
|
|
4229
4227
|
end: deserializeU32(pos + 4),
|
|
4230
4228
|
};
|
|
4231
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
4232
|
-
node.types = deserializeVecTSType(pos +
|
|
4229
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
4230
|
+
node.types = deserializeVecTSType(pos + 40);
|
|
4233
4231
|
return node;
|
|
4234
4232
|
}
|
|
4235
4233
|
|
|
@@ -4241,8 +4239,8 @@ function deserializeTSAsExpression(pos) {
|
|
|
4241
4239
|
start: deserializeU32(pos),
|
|
4242
4240
|
end: deserializeU32(pos + 4),
|
|
4243
4241
|
};
|
|
4244
|
-
node.expression = deserializeExpression(pos +
|
|
4245
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4242
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4243
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4246
4244
|
return node;
|
|
4247
4245
|
}
|
|
4248
4246
|
|
|
@@ -4254,8 +4252,8 @@ function deserializeTSSatisfiesExpression(pos) {
|
|
|
4254
4252
|
start: deserializeU32(pos),
|
|
4255
4253
|
end: deserializeU32(pos + 4),
|
|
4256
4254
|
};
|
|
4257
|
-
node.expression = deserializeExpression(pos +
|
|
4258
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4255
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4256
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4259
4257
|
return node;
|
|
4260
4258
|
}
|
|
4261
4259
|
|
|
@@ -4267,8 +4265,8 @@ function deserializeTSTypeAssertion(pos) {
|
|
|
4267
4265
|
start: deserializeU32(pos),
|
|
4268
4266
|
end: deserializeU32(pos + 4),
|
|
4269
4267
|
};
|
|
4270
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4271
|
-
node.expression = deserializeExpression(pos +
|
|
4268
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4269
|
+
node.expression = deserializeExpression(pos + 32);
|
|
4272
4270
|
return node;
|
|
4273
4271
|
}
|
|
4274
4272
|
|
|
@@ -4277,12 +4275,12 @@ function deserializeTSImportEqualsDeclaration(pos) {
|
|
|
4277
4275
|
type: "TSImportEqualsDeclaration",
|
|
4278
4276
|
id: null,
|
|
4279
4277
|
moduleReference: null,
|
|
4280
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
4278
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
4281
4279
|
start: deserializeU32(pos),
|
|
4282
4280
|
end: deserializeU32(pos + 4),
|
|
4283
4281
|
};
|
|
4284
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4285
|
-
node.moduleReference = deserializeTSModuleReference(pos +
|
|
4282
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4283
|
+
node.moduleReference = deserializeTSModuleReference(pos + 48);
|
|
4286
4284
|
return node;
|
|
4287
4285
|
}
|
|
4288
4286
|
|
|
@@ -4306,7 +4304,7 @@ function deserializeTSExternalModuleReference(pos) {
|
|
|
4306
4304
|
start: deserializeU32(pos),
|
|
4307
4305
|
end: deserializeU32(pos + 4),
|
|
4308
4306
|
};
|
|
4309
|
-
node.expression = deserializeStringLiteral(pos +
|
|
4307
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
4310
4308
|
return node;
|
|
4311
4309
|
}
|
|
4312
4310
|
|
|
@@ -4317,7 +4315,7 @@ function deserializeTSNonNullExpression(pos) {
|
|
|
4317
4315
|
start: deserializeU32(pos),
|
|
4318
4316
|
end: deserializeU32(pos + 4),
|
|
4319
4317
|
};
|
|
4320
|
-
node.expression = deserializeExpression(pos +
|
|
4318
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4321
4319
|
return node;
|
|
4322
4320
|
}
|
|
4323
4321
|
|
|
@@ -4328,7 +4326,7 @@ function deserializeDecorator(pos) {
|
|
|
4328
4326
|
start: deserializeU32(pos),
|
|
4329
4327
|
end: deserializeU32(pos + 4),
|
|
4330
4328
|
};
|
|
4331
|
-
node.expression = deserializeExpression(pos +
|
|
4329
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4332
4330
|
return node;
|
|
4333
4331
|
}
|
|
4334
4332
|
|
|
@@ -4339,7 +4337,7 @@ function deserializeTSExportAssignment(pos) {
|
|
|
4339
4337
|
start: deserializeU32(pos),
|
|
4340
4338
|
end: deserializeU32(pos + 4),
|
|
4341
4339
|
};
|
|
4342
|
-
node.expression = deserializeExpression(pos +
|
|
4340
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4343
4341
|
return node;
|
|
4344
4342
|
}
|
|
4345
4343
|
|
|
@@ -4350,7 +4348,7 @@ function deserializeTSNamespaceExportDeclaration(pos) {
|
|
|
4350
4348
|
start: deserializeU32(pos),
|
|
4351
4349
|
end: deserializeU32(pos + 4),
|
|
4352
4350
|
};
|
|
4353
|
-
node.id = deserializeIdentifierName(pos +
|
|
4351
|
+
node.id = deserializeIdentifierName(pos + 16);
|
|
4354
4352
|
return node;
|
|
4355
4353
|
}
|
|
4356
4354
|
|
|
@@ -4362,8 +4360,8 @@ function deserializeTSInstantiationExpression(pos) {
|
|
|
4362
4360
|
start: deserializeU32(pos),
|
|
4363
4361
|
end: deserializeU32(pos + 4),
|
|
4364
4362
|
};
|
|
4365
|
-
node.expression = deserializeExpression(pos +
|
|
4366
|
-
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos +
|
|
4363
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4364
|
+
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos + 32);
|
|
4367
4365
|
return node;
|
|
4368
4366
|
}
|
|
4369
4367
|
|
|
@@ -4382,11 +4380,11 @@ function deserializeJSDocNullableType(pos) {
|
|
|
4382
4380
|
let node = {
|
|
4383
4381
|
type: "TSJSDocNullableType",
|
|
4384
4382
|
typeAnnotation: null,
|
|
4385
|
-
postfix: deserializeBool(pos +
|
|
4383
|
+
postfix: deserializeBool(pos + 12),
|
|
4386
4384
|
start: deserializeU32(pos),
|
|
4387
4385
|
end: deserializeU32(pos + 4),
|
|
4388
4386
|
};
|
|
4389
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4387
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4390
4388
|
return node;
|
|
4391
4389
|
}
|
|
4392
4390
|
|
|
@@ -4394,11 +4392,11 @@ function deserializeJSDocNonNullableType(pos) {
|
|
|
4394
4392
|
let node = {
|
|
4395
4393
|
type: "TSJSDocNonNullableType",
|
|
4396
4394
|
typeAnnotation: null,
|
|
4397
|
-
postfix: deserializeBool(pos +
|
|
4395
|
+
postfix: deserializeBool(pos + 12),
|
|
4398
4396
|
start: deserializeU32(pos),
|
|
4399
4397
|
end: deserializeU32(pos + 4),
|
|
4400
4398
|
};
|
|
4401
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4399
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4402
4400
|
return node;
|
|
4403
4401
|
}
|
|
4404
4402
|
|
|
@@ -4435,6 +4433,26 @@ function deserializeComment(pos) {
|
|
|
4435
4433
|
};
|
|
4436
4434
|
}
|
|
4437
4435
|
|
|
4436
|
+
function deserializeModuleKind(pos) {
|
|
4437
|
+
switch (uint8[pos]) {
|
|
4438
|
+
case 0:
|
|
4439
|
+
return "script";
|
|
4440
|
+
case 1:
|
|
4441
|
+
return "module";
|
|
4442
|
+
case 3:
|
|
4443
|
+
return "commonjs";
|
|
4444
|
+
default:
|
|
4445
|
+
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
4446
|
+
}
|
|
4447
|
+
}
|
|
4448
|
+
|
|
4449
|
+
function deserializeSpan(pos) {
|
|
4450
|
+
return {
|
|
4451
|
+
start: deserializeU32(pos),
|
|
4452
|
+
end: deserializeU32(pos + 4),
|
|
4453
|
+
};
|
|
4454
|
+
}
|
|
4455
|
+
|
|
4438
4456
|
function deserializeNameSpan(pos) {
|
|
4439
4457
|
return {
|
|
4440
4458
|
value: deserializeStr(pos + 8),
|
|
@@ -4732,26 +4750,6 @@ function deserializeUpdateOperator(pos) {
|
|
|
4732
4750
|
}
|
|
4733
4751
|
}
|
|
4734
4752
|
|
|
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
4753
|
function deserializeRawTransferData(pos) {
|
|
4756
4754
|
return {
|
|
4757
4755
|
program: deserializeProgram(pos),
|
|
@@ -4819,14 +4817,6 @@ function deserializeStaticExport(pos) {
|
|
|
4819
4817
|
};
|
|
4820
4818
|
}
|
|
4821
4819
|
|
|
4822
|
-
function deserializeU32(pos) {
|
|
4823
|
-
return uint32[pos >> 2];
|
|
4824
|
-
}
|
|
4825
|
-
|
|
4826
|
-
function deserializeU8(pos) {
|
|
4827
|
-
return uint8[pos];
|
|
4828
|
-
}
|
|
4829
|
-
|
|
4830
4820
|
function deserializeStr(pos) {
|
|
4831
4821
|
let pos32 = pos >> 2,
|
|
4832
4822
|
len = uint32[pos32 + 2];
|
|
@@ -4864,7 +4854,7 @@ function deserializeVecComment(pos) {
|
|
|
4864
4854
|
}
|
|
4865
4855
|
|
|
4866
4856
|
function deserializeOptionHashbang(pos) {
|
|
4867
|
-
if (uint32[(pos +
|
|
4857
|
+
if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
|
|
4868
4858
|
return deserializeHashbang(pos);
|
|
4869
4859
|
}
|
|
4870
4860
|
|
|
@@ -5353,7 +5343,7 @@ function deserializeOptionForStatementInit(pos) {
|
|
|
5353
5343
|
}
|
|
5354
5344
|
|
|
5355
5345
|
function deserializeOptionLabelIdentifier(pos) {
|
|
5356
|
-
if (uint32[(pos +
|
|
5346
|
+
if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
|
|
5357
5347
|
return deserializeLabelIdentifier(pos);
|
|
5358
5348
|
}
|
|
5359
5349
|
|
|
@@ -5384,7 +5374,7 @@ function deserializeOptionBoxBlockStatement(pos) {
|
|
|
5384
5374
|
}
|
|
5385
5375
|
|
|
5386
5376
|
function deserializeOptionCatchParameter(pos) {
|
|
5387
|
-
if (uint8[pos +
|
|
5377
|
+
if (uint8[pos + 16] === 4) return null;
|
|
5388
5378
|
return deserializeCatchParameter(pos);
|
|
5389
5379
|
}
|
|
5390
5380
|
|
|
@@ -5443,7 +5433,7 @@ function deserializeVecOptionBindingPattern(pos) {
|
|
|
5443
5433
|
}
|
|
5444
5434
|
|
|
5445
5435
|
function deserializeOptionBindingIdentifier(pos) {
|
|
5446
|
-
if (uint32[(pos +
|
|
5436
|
+
if (uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0) return null;
|
|
5447
5437
|
return deserializeBindingIdentifier(pos);
|
|
5448
5438
|
}
|
|
5449
5439
|
|
|
@@ -5661,7 +5651,7 @@ function deserializeVecExportSpecifier(pos) {
|
|
|
5661
5651
|
}
|
|
5662
5652
|
|
|
5663
5653
|
function deserializeOptionStringLiteral(pos) {
|
|
5664
|
-
if (uint8[pos +
|
|
5654
|
+
if (uint8[pos + 12] === 2) return null;
|
|
5665
5655
|
return deserializeStringLiteral(pos);
|
|
5666
5656
|
}
|
|
5667
5657
|
|
|
@@ -5674,6 +5664,10 @@ function deserializeF64(pos) {
|
|
|
5674
5664
|
return float64[pos >> 3];
|
|
5675
5665
|
}
|
|
5676
5666
|
|
|
5667
|
+
function deserializeU8(pos) {
|
|
5668
|
+
return uint8[pos];
|
|
5669
|
+
}
|
|
5670
|
+
|
|
5677
5671
|
function deserializeBoxJSXOpeningElement(pos) {
|
|
5678
5672
|
return deserializeJSXOpeningElement(uint32[pos >> 2]);
|
|
5679
5673
|
}
|
|
@@ -6053,6 +6047,10 @@ function deserializeBoxTSExternalModuleReference(pos) {
|
|
|
6053
6047
|
return deserializeTSExternalModuleReference(uint32[pos >> 2]);
|
|
6054
6048
|
}
|
|
6055
6049
|
|
|
6050
|
+
function deserializeU32(pos) {
|
|
6051
|
+
return uint32[pos >> 2];
|
|
6052
|
+
}
|
|
6053
|
+
|
|
6056
6054
|
function deserializeOptionNameSpan(pos) {
|
|
6057
6055
|
if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
|
|
6058
6056
|
return deserializeNameSpan(pos);
|