oxc-parser 0.94.0 → 0.96.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/generated/deserialize/js.js +871 -1038
- package/generated/deserialize/js_range.js +250 -176
- package/generated/deserialize/ts.js +859 -1020
- package/generated/deserialize/ts_range.js +260 -188
- package/generated/lazy/constructors.js +119 -347
- package/generated/lazy/walk.js +581 -312
- package/generated/visit/walk.js +280 -140
- package/package.json +24 -23
- package/src-js/bindings.js +68 -50
- package/src-js/raw-transfer/common.js +2 -1
- package/src-js/raw-transfer/eager.js +1 -1
- package/src-js/raw-transfer/lazy.js +2 -3
- package/src-js/raw-transfer/node-array.js +3 -2
- package/src-js/raw-transfer/supported.js +1 -1
- package/src-js/raw-transfer/visitor.js +3 -3
- package/src-js/visit/index.js +4 -1
- package/src-js/visit/visitor.js +3 -4
- package/src-js/webcontainer-fallback.cjs +1 -3
- package/src-js/wrap.js +1 -1
- /package/generated/lazy/{types.js → type_ids.js} +0 -0
- /package/generated/visit/{types.js → type_ids.js} +0 -0
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
3
|
|
|
4
4
|
let uint8, uint32, float64, sourceText, sourceIsAscii, sourceByteLen;
|
|
5
|
+
|
|
5
6
|
const textDecoder = new TextDecoder('utf-8', { ignoreBOM: true }),
|
|
6
7
|
decodeStr = textDecoder.decode.bind(textDecoder),
|
|
7
8
|
{ fromCodePoint } = String;
|
|
8
9
|
|
|
9
10
|
export function deserialize(buffer, sourceText, sourceByteLen) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export function deserializeProgramOnly(buffer, sourceText, sourceByteLen, getLoc) {
|
|
14
|
-
return deserializeWith(buffer, sourceText, sourceByteLen, getLoc, deserializeProgram);
|
|
11
|
+
let data = deserializeWith(buffer, sourceText, sourceByteLen, null, deserializeRawTransferData);
|
|
12
|
+
resetBuffer();
|
|
13
|
+
return data;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
function deserializeWith(buffer, sourceTextInput, sourceByteLenInput, getLocInput, deserialize) {
|
|
@@ -21,13 +20,12 @@ function deserializeWith(buffer, sourceTextInput, sourceByteLenInput, getLocInpu
|
|
|
21
20
|
sourceText = sourceTextInput;
|
|
22
21
|
sourceByteLen = sourceByteLenInput;
|
|
23
22
|
sourceIsAscii = sourceText.length === sourceByteLen;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return data;
|
|
23
|
+
return deserialize(uint32[536870902]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function resetBuffer() {
|
|
27
|
+
// Clear buffer and source text string to allow them to be garbage collected
|
|
28
|
+
uint8 = uint32 = float64 = sourceText = void 0;
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
function deserializeProgram(pos) {
|
|
@@ -140,7 +138,8 @@ function deserializeExpression(pos) {
|
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
function deserializeIdentifierName(pos) {
|
|
143
|
-
let start = deserializeU32(pos),
|
|
141
|
+
let start = deserializeU32(pos),
|
|
142
|
+
end = deserializeU32(pos + 4);
|
|
144
143
|
return {
|
|
145
144
|
type: 'Identifier',
|
|
146
145
|
name: deserializeStr(pos + 8),
|
|
@@ -150,7 +149,8 @@ function deserializeIdentifierName(pos) {
|
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
function deserializeIdentifierReference(pos) {
|
|
153
|
-
let start = deserializeU32(pos),
|
|
152
|
+
let start = deserializeU32(pos),
|
|
153
|
+
end = deserializeU32(pos + 4);
|
|
154
154
|
return {
|
|
155
155
|
type: 'Identifier',
|
|
156
156
|
name: deserializeStr(pos + 8),
|
|
@@ -160,7 +160,8 @@ function deserializeIdentifierReference(pos) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
function deserializeBindingIdentifier(pos) {
|
|
163
|
-
let start = deserializeU32(pos),
|
|
163
|
+
let start = deserializeU32(pos),
|
|
164
|
+
end = deserializeU32(pos + 4);
|
|
164
165
|
return {
|
|
165
166
|
type: 'Identifier',
|
|
166
167
|
name: deserializeStr(pos + 8),
|
|
@@ -170,7 +171,8 @@ function deserializeBindingIdentifier(pos) {
|
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
function deserializeLabelIdentifier(pos) {
|
|
173
|
-
let start = deserializeU32(pos),
|
|
174
|
+
let start = deserializeU32(pos),
|
|
175
|
+
end = deserializeU32(pos + 4);
|
|
174
176
|
return {
|
|
175
177
|
type: 'Identifier',
|
|
176
178
|
name: deserializeStr(pos + 8),
|
|
@@ -180,23 +182,20 @@ function deserializeLabelIdentifier(pos) {
|
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
function deserializeThisExpression(pos) {
|
|
183
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
184
185
|
return {
|
|
185
186
|
type: 'ThisExpression',
|
|
186
|
-
start,
|
|
187
|
-
end,
|
|
187
|
+
start: deserializeU32(pos),
|
|
188
|
+
end: deserializeU32(pos + 4),
|
|
188
189
|
};
|
|
189
190
|
}
|
|
190
191
|
|
|
191
192
|
function deserializeArrayExpression(pos) {
|
|
192
|
-
let
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
end,
|
|
199
|
-
};
|
|
193
|
+
let node = {
|
|
194
|
+
type: 'ArrayExpression',
|
|
195
|
+
elements: null,
|
|
196
|
+
start: deserializeU32(pos),
|
|
197
|
+
end: deserializeU32(pos + 4),
|
|
198
|
+
};
|
|
200
199
|
node.elements = deserializeVecArrayExpressionElement(pos + 8);
|
|
201
200
|
return node;
|
|
202
201
|
}
|
|
@@ -303,14 +302,12 @@ function deserializeElision(pos) {
|
|
|
303
302
|
}
|
|
304
303
|
|
|
305
304
|
function deserializeObjectExpression(pos) {
|
|
306
|
-
let
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
end,
|
|
313
|
-
};
|
|
305
|
+
let node = {
|
|
306
|
+
type: 'ObjectExpression',
|
|
307
|
+
properties: null,
|
|
308
|
+
start: deserializeU32(pos),
|
|
309
|
+
end: deserializeU32(pos + 4),
|
|
310
|
+
};
|
|
314
311
|
node.properties = deserializeVecObjectPropertyKind(pos + 8);
|
|
315
312
|
return node;
|
|
316
313
|
}
|
|
@@ -456,30 +453,26 @@ function deserializePropertyKind(pos) {
|
|
|
456
453
|
}
|
|
457
454
|
|
|
458
455
|
function deserializeTemplateLiteral(pos) {
|
|
459
|
-
let
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
end,
|
|
467
|
-
};
|
|
456
|
+
let node = {
|
|
457
|
+
type: 'TemplateLiteral',
|
|
458
|
+
quasis: null,
|
|
459
|
+
expressions: null,
|
|
460
|
+
start: deserializeU32(pos),
|
|
461
|
+
end: deserializeU32(pos + 4),
|
|
462
|
+
};
|
|
468
463
|
node.quasis = deserializeVecTemplateElement(pos + 8);
|
|
469
464
|
node.expressions = deserializeVecExpression(pos + 32);
|
|
470
465
|
return node;
|
|
471
466
|
}
|
|
472
467
|
|
|
473
468
|
function deserializeTaggedTemplateExpression(pos) {
|
|
474
|
-
let
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
end,
|
|
482
|
-
};
|
|
469
|
+
let node = {
|
|
470
|
+
type: 'TaggedTemplateExpression',
|
|
471
|
+
tag: null,
|
|
472
|
+
quasi: null,
|
|
473
|
+
start: deserializeU32(pos),
|
|
474
|
+
end: deserializeU32(pos + 4),
|
|
475
|
+
};
|
|
483
476
|
node.tag = deserializeExpression(pos + 8);
|
|
484
477
|
node.quasi = deserializeTemplateLiteral(pos + 32);
|
|
485
478
|
return node;
|
|
@@ -490,7 +483,8 @@ function deserializeTemplateElement(pos) {
|
|
|
490
483
|
start = deserializeU32(pos),
|
|
491
484
|
end = deserializeU32(pos + 4),
|
|
492
485
|
value = deserializeTemplateElementValue(pos + 8);
|
|
493
|
-
value.cooked !== null &&
|
|
486
|
+
value.cooked !== null &&
|
|
487
|
+
deserializeBool(pos + 41) &&
|
|
494
488
|
(value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
495
489
|
return {
|
|
496
490
|
type: 'TemplateElement',
|
|
@@ -579,44 +573,38 @@ function deserializeCallExpression(pos) {
|
|
|
579
573
|
}
|
|
580
574
|
|
|
581
575
|
function deserializeNewExpression(pos) {
|
|
582
|
-
let
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
end,
|
|
590
|
-
};
|
|
576
|
+
let node = {
|
|
577
|
+
type: 'NewExpression',
|
|
578
|
+
callee: null,
|
|
579
|
+
arguments: null,
|
|
580
|
+
start: deserializeU32(pos),
|
|
581
|
+
end: deserializeU32(pos + 4),
|
|
582
|
+
};
|
|
591
583
|
node.callee = deserializeExpression(pos + 8);
|
|
592
584
|
node.arguments = deserializeVecArgument(pos + 32);
|
|
593
585
|
return node;
|
|
594
586
|
}
|
|
595
587
|
|
|
596
588
|
function deserializeMetaProperty(pos) {
|
|
597
|
-
let
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
end,
|
|
605
|
-
};
|
|
589
|
+
let node = {
|
|
590
|
+
type: 'MetaProperty',
|
|
591
|
+
meta: null,
|
|
592
|
+
property: null,
|
|
593
|
+
start: deserializeU32(pos),
|
|
594
|
+
end: deserializeU32(pos + 4),
|
|
595
|
+
};
|
|
606
596
|
node.meta = deserializeIdentifierName(pos + 8);
|
|
607
597
|
node.property = deserializeIdentifierName(pos + 32);
|
|
608
598
|
return node;
|
|
609
599
|
}
|
|
610
600
|
|
|
611
601
|
function deserializeSpreadElement(pos) {
|
|
612
|
-
let
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
end,
|
|
619
|
-
};
|
|
602
|
+
let node = {
|
|
603
|
+
type: 'SpreadElement',
|
|
604
|
+
argument: null,
|
|
605
|
+
start: deserializeU32(pos),
|
|
606
|
+
end: deserializeU32(pos + 4),
|
|
607
|
+
};
|
|
620
608
|
node.argument = deserializeExpression(pos + 8);
|
|
621
609
|
return node;
|
|
622
610
|
}
|
|
@@ -764,16 +752,14 @@ function deserializeBinaryExpression(pos) {
|
|
|
764
752
|
}
|
|
765
753
|
|
|
766
754
|
function deserializePrivateInExpression(pos) {
|
|
767
|
-
let
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
end,
|
|
776
|
-
};
|
|
755
|
+
let node = {
|
|
756
|
+
type: 'BinaryExpression',
|
|
757
|
+
left: null,
|
|
758
|
+
operator: null,
|
|
759
|
+
right: null,
|
|
760
|
+
start: deserializeU32(pos),
|
|
761
|
+
end: deserializeU32(pos + 4),
|
|
762
|
+
};
|
|
777
763
|
node.left = deserializePrivateIdentifier(pos + 8);
|
|
778
764
|
node.operator = 'in';
|
|
779
765
|
node.right = deserializeExpression(pos + 32);
|
|
@@ -797,16 +783,14 @@ function deserializeLogicalExpression(pos) {
|
|
|
797
783
|
}
|
|
798
784
|
|
|
799
785
|
function deserializeConditionalExpression(pos) {
|
|
800
|
-
let
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
end,
|
|
809
|
-
};
|
|
786
|
+
let node = {
|
|
787
|
+
type: 'ConditionalExpression',
|
|
788
|
+
test: null,
|
|
789
|
+
consequent: null,
|
|
790
|
+
alternate: null,
|
|
791
|
+
start: deserializeU32(pos),
|
|
792
|
+
end: deserializeU32(pos + 4),
|
|
793
|
+
};
|
|
810
794
|
node.test = deserializeExpression(pos + 8);
|
|
811
795
|
node.consequent = deserializeExpression(pos + 24);
|
|
812
796
|
node.alternate = deserializeExpression(pos + 40);
|
|
@@ -880,13 +864,11 @@ function deserializeSimpleAssignmentTarget(pos) {
|
|
|
880
864
|
}
|
|
881
865
|
|
|
882
866
|
function deserializeArrayAssignmentTarget(pos) {
|
|
883
|
-
let
|
|
884
|
-
end = deserializeU32(pos + 4),
|
|
885
|
-
node = {
|
|
867
|
+
let node = {
|
|
886
868
|
type: 'ArrayPattern',
|
|
887
869
|
elements: null,
|
|
888
|
-
start,
|
|
889
|
-
end,
|
|
870
|
+
start: deserializeU32(pos),
|
|
871
|
+
end: deserializeU32(pos + 4),
|
|
890
872
|
},
|
|
891
873
|
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos + 8),
|
|
892
874
|
rest = deserializeOptionBoxAssignmentTargetRest(pos + 32);
|
|
@@ -896,13 +878,11 @@ function deserializeArrayAssignmentTarget(pos) {
|
|
|
896
878
|
}
|
|
897
879
|
|
|
898
880
|
function deserializeObjectAssignmentTarget(pos) {
|
|
899
|
-
let
|
|
900
|
-
end = deserializeU32(pos + 4),
|
|
901
|
-
node = {
|
|
881
|
+
let node = {
|
|
902
882
|
type: 'ObjectPattern',
|
|
903
883
|
properties: null,
|
|
904
|
-
start,
|
|
905
|
-
end,
|
|
884
|
+
start: deserializeU32(pos),
|
|
885
|
+
end: deserializeU32(pos + 4),
|
|
906
886
|
},
|
|
907
887
|
properties = deserializeVecAssignmentTargetProperty(pos + 8),
|
|
908
888
|
rest = deserializeOptionBoxAssignmentTargetRest(pos + 32);
|
|
@@ -912,14 +892,12 @@ function deserializeObjectAssignmentTarget(pos) {
|
|
|
912
892
|
}
|
|
913
893
|
|
|
914
894
|
function deserializeAssignmentTargetRest(pos) {
|
|
915
|
-
let
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
end,
|
|
922
|
-
};
|
|
895
|
+
let node = {
|
|
896
|
+
type: 'RestElement',
|
|
897
|
+
argument: null,
|
|
898
|
+
start: deserializeU32(pos),
|
|
899
|
+
end: deserializeU32(pos + 4),
|
|
900
|
+
};
|
|
923
901
|
node.argument = deserializeAssignmentTarget(pos + 8);
|
|
924
902
|
return node;
|
|
925
903
|
}
|
|
@@ -954,15 +932,13 @@ function deserializeAssignmentTargetMaybeDefault(pos) {
|
|
|
954
932
|
}
|
|
955
933
|
|
|
956
934
|
function deserializeAssignmentTargetWithDefault(pos) {
|
|
957
|
-
let
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
end,
|
|
965
|
-
};
|
|
935
|
+
let node = {
|
|
936
|
+
type: 'AssignmentPattern',
|
|
937
|
+
left: null,
|
|
938
|
+
right: null,
|
|
939
|
+
start: deserializeU32(pos),
|
|
940
|
+
end: deserializeU32(pos + 4),
|
|
941
|
+
};
|
|
966
942
|
node.left = deserializeAssignmentTarget(pos + 8);
|
|
967
943
|
node.right = deserializeExpression(pos + 24);
|
|
968
944
|
return node;
|
|
@@ -996,13 +972,14 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
996
972
|
key = deserializeIdentifierReference(pos + 8),
|
|
997
973
|
init = deserializeOptionExpression(pos + 40),
|
|
998
974
|
value = { ...key };
|
|
999
|
-
init !== null &&
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
975
|
+
init !== null &&
|
|
976
|
+
(value = {
|
|
977
|
+
type: 'AssignmentPattern',
|
|
978
|
+
left: value,
|
|
979
|
+
right: init,
|
|
980
|
+
start,
|
|
981
|
+
end,
|
|
982
|
+
});
|
|
1006
983
|
node.kind = 'init';
|
|
1007
984
|
node.key = key;
|
|
1008
985
|
node.value = value;
|
|
@@ -1035,49 +1012,42 @@ function deserializeAssignmentTargetPropertyProperty(pos) {
|
|
|
1035
1012
|
}
|
|
1036
1013
|
|
|
1037
1014
|
function deserializeSequenceExpression(pos) {
|
|
1038
|
-
let
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
end,
|
|
1045
|
-
};
|
|
1015
|
+
let node = {
|
|
1016
|
+
type: 'SequenceExpression',
|
|
1017
|
+
expressions: null,
|
|
1018
|
+
start: deserializeU32(pos),
|
|
1019
|
+
end: deserializeU32(pos + 4),
|
|
1020
|
+
};
|
|
1046
1021
|
node.expressions = deserializeVecExpression(pos + 8);
|
|
1047
1022
|
return node;
|
|
1048
1023
|
}
|
|
1049
1024
|
|
|
1050
1025
|
function deserializeSuper(pos) {
|
|
1051
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
1052
1026
|
return {
|
|
1053
1027
|
type: 'Super',
|
|
1054
|
-
start,
|
|
1055
|
-
end,
|
|
1028
|
+
start: deserializeU32(pos),
|
|
1029
|
+
end: deserializeU32(pos + 4),
|
|
1056
1030
|
};
|
|
1057
1031
|
}
|
|
1058
1032
|
|
|
1059
1033
|
function deserializeAwaitExpression(pos) {
|
|
1060
|
-
let
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
end,
|
|
1067
|
-
};
|
|
1034
|
+
let node = {
|
|
1035
|
+
type: 'AwaitExpression',
|
|
1036
|
+
argument: null,
|
|
1037
|
+
start: deserializeU32(pos),
|
|
1038
|
+
end: deserializeU32(pos + 4),
|
|
1039
|
+
};
|
|
1068
1040
|
node.argument = deserializeExpression(pos + 8);
|
|
1069
1041
|
return node;
|
|
1070
1042
|
}
|
|
1071
1043
|
|
|
1072
1044
|
function deserializeChainExpression(pos) {
|
|
1073
|
-
let
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
end,
|
|
1080
|
-
};
|
|
1045
|
+
let node = {
|
|
1046
|
+
type: 'ChainExpression',
|
|
1047
|
+
expression: null,
|
|
1048
|
+
start: deserializeU32(pos),
|
|
1049
|
+
end: deserializeU32(pos + 4),
|
|
1050
|
+
};
|
|
1081
1051
|
node.expression = deserializeChainElement(pos + 8);
|
|
1082
1052
|
return node;
|
|
1083
1053
|
}
|
|
@@ -1197,7 +1167,8 @@ function deserializeDirective(pos) {
|
|
|
1197
1167
|
}
|
|
1198
1168
|
|
|
1199
1169
|
function deserializeHashbang(pos) {
|
|
1200
|
-
let start = deserializeU32(pos),
|
|
1170
|
+
let start = deserializeU32(pos),
|
|
1171
|
+
end = deserializeU32(pos + 4);
|
|
1201
1172
|
return {
|
|
1202
1173
|
type: 'Hashbang',
|
|
1203
1174
|
value: deserializeStr(pos + 8),
|
|
@@ -1207,14 +1178,12 @@ function deserializeHashbang(pos) {
|
|
|
1207
1178
|
}
|
|
1208
1179
|
|
|
1209
1180
|
function deserializeBlockStatement(pos) {
|
|
1210
|
-
let
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
end,
|
|
1217
|
-
};
|
|
1181
|
+
let node = {
|
|
1182
|
+
type: 'BlockStatement',
|
|
1183
|
+
body: null,
|
|
1184
|
+
start: deserializeU32(pos),
|
|
1185
|
+
end: deserializeU32(pos + 4),
|
|
1186
|
+
};
|
|
1218
1187
|
node.body = deserializeVecStatement(pos + 8);
|
|
1219
1188
|
return node;
|
|
1220
1189
|
}
|
|
@@ -1274,53 +1243,46 @@ function deserializeVariableDeclarationKind(pos) {
|
|
|
1274
1243
|
}
|
|
1275
1244
|
|
|
1276
1245
|
function deserializeVariableDeclarator(pos) {
|
|
1277
|
-
let
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
end,
|
|
1285
|
-
};
|
|
1246
|
+
let node = {
|
|
1247
|
+
type: 'VariableDeclarator',
|
|
1248
|
+
id: null,
|
|
1249
|
+
init: null,
|
|
1250
|
+
start: deserializeU32(pos),
|
|
1251
|
+
end: deserializeU32(pos + 4),
|
|
1252
|
+
};
|
|
1286
1253
|
node.id = deserializeBindingPattern(pos + 8);
|
|
1287
1254
|
node.init = deserializeOptionExpression(pos + 40);
|
|
1288
1255
|
return node;
|
|
1289
1256
|
}
|
|
1290
1257
|
|
|
1291
1258
|
function deserializeEmptyStatement(pos) {
|
|
1292
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
1293
1259
|
return {
|
|
1294
1260
|
type: 'EmptyStatement',
|
|
1295
|
-
start,
|
|
1296
|
-
end,
|
|
1261
|
+
start: deserializeU32(pos),
|
|
1262
|
+
end: deserializeU32(pos + 4),
|
|
1297
1263
|
};
|
|
1298
1264
|
}
|
|
1299
1265
|
|
|
1300
1266
|
function deserializeExpressionStatement(pos) {
|
|
1301
|
-
let
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
end,
|
|
1308
|
-
};
|
|
1267
|
+
let node = {
|
|
1268
|
+
type: 'ExpressionStatement',
|
|
1269
|
+
expression: null,
|
|
1270
|
+
start: deserializeU32(pos),
|
|
1271
|
+
end: deserializeU32(pos + 4),
|
|
1272
|
+
};
|
|
1309
1273
|
node.expression = deserializeExpression(pos + 8);
|
|
1310
1274
|
return node;
|
|
1311
1275
|
}
|
|
1312
1276
|
|
|
1313
1277
|
function deserializeIfStatement(pos) {
|
|
1314
|
-
let
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
end,
|
|
1323
|
-
};
|
|
1278
|
+
let node = {
|
|
1279
|
+
type: 'IfStatement',
|
|
1280
|
+
test: null,
|
|
1281
|
+
consequent: null,
|
|
1282
|
+
alternate: null,
|
|
1283
|
+
start: deserializeU32(pos),
|
|
1284
|
+
end: deserializeU32(pos + 4),
|
|
1285
|
+
};
|
|
1324
1286
|
node.test = deserializeExpression(pos + 8);
|
|
1325
1287
|
node.consequent = deserializeStatement(pos + 24);
|
|
1326
1288
|
node.alternate = deserializeOptionStatement(pos + 40);
|
|
@@ -1328,47 +1290,41 @@ function deserializeIfStatement(pos) {
|
|
|
1328
1290
|
}
|
|
1329
1291
|
|
|
1330
1292
|
function deserializeDoWhileStatement(pos) {
|
|
1331
|
-
let
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
end,
|
|
1339
|
-
};
|
|
1293
|
+
let node = {
|
|
1294
|
+
type: 'DoWhileStatement',
|
|
1295
|
+
body: null,
|
|
1296
|
+
test: null,
|
|
1297
|
+
start: deserializeU32(pos),
|
|
1298
|
+
end: deserializeU32(pos + 4),
|
|
1299
|
+
};
|
|
1340
1300
|
node.body = deserializeStatement(pos + 8);
|
|
1341
1301
|
node.test = deserializeExpression(pos + 24);
|
|
1342
1302
|
return node;
|
|
1343
1303
|
}
|
|
1344
1304
|
|
|
1345
1305
|
function deserializeWhileStatement(pos) {
|
|
1346
|
-
let
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
end,
|
|
1354
|
-
};
|
|
1306
|
+
let node = {
|
|
1307
|
+
type: 'WhileStatement',
|
|
1308
|
+
test: null,
|
|
1309
|
+
body: null,
|
|
1310
|
+
start: deserializeU32(pos),
|
|
1311
|
+
end: deserializeU32(pos + 4),
|
|
1312
|
+
};
|
|
1355
1313
|
node.test = deserializeExpression(pos + 8);
|
|
1356
1314
|
node.body = deserializeStatement(pos + 24);
|
|
1357
1315
|
return node;
|
|
1358
1316
|
}
|
|
1359
1317
|
|
|
1360
1318
|
function deserializeForStatement(pos) {
|
|
1361
|
-
let
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
end,
|
|
1371
|
-
};
|
|
1319
|
+
let node = {
|
|
1320
|
+
type: 'ForStatement',
|
|
1321
|
+
init: null,
|
|
1322
|
+
test: null,
|
|
1323
|
+
update: null,
|
|
1324
|
+
body: null,
|
|
1325
|
+
start: deserializeU32(pos),
|
|
1326
|
+
end: deserializeU32(pos + 4),
|
|
1327
|
+
};
|
|
1372
1328
|
node.init = deserializeOptionForStatementInit(pos + 8);
|
|
1373
1329
|
node.test = deserializeOptionExpression(pos + 24);
|
|
1374
1330
|
node.update = deserializeOptionExpression(pos + 40);
|
|
@@ -1472,16 +1428,14 @@ function deserializeForStatementInit(pos) {
|
|
|
1472
1428
|
}
|
|
1473
1429
|
|
|
1474
1430
|
function deserializeForInStatement(pos) {
|
|
1475
|
-
let
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
end,
|
|
1484
|
-
};
|
|
1431
|
+
let node = {
|
|
1432
|
+
type: 'ForInStatement',
|
|
1433
|
+
left: null,
|
|
1434
|
+
right: null,
|
|
1435
|
+
body: null,
|
|
1436
|
+
start: deserializeU32(pos),
|
|
1437
|
+
end: deserializeU32(pos + 4),
|
|
1438
|
+
};
|
|
1485
1439
|
node.left = deserializeForStatementLeft(pos + 8);
|
|
1486
1440
|
node.right = deserializeExpression(pos + 24);
|
|
1487
1441
|
node.body = deserializeStatement(pos + 40);
|
|
@@ -1536,128 +1490,110 @@ function deserializeForOfStatement(pos) {
|
|
|
1536
1490
|
}
|
|
1537
1491
|
|
|
1538
1492
|
function deserializeContinueStatement(pos) {
|
|
1539
|
-
let
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
end,
|
|
1546
|
-
};
|
|
1493
|
+
let node = {
|
|
1494
|
+
type: 'ContinueStatement',
|
|
1495
|
+
label: null,
|
|
1496
|
+
start: deserializeU32(pos),
|
|
1497
|
+
end: deserializeU32(pos + 4),
|
|
1498
|
+
};
|
|
1547
1499
|
node.label = deserializeOptionLabelIdentifier(pos + 8);
|
|
1548
1500
|
return node;
|
|
1549
1501
|
}
|
|
1550
1502
|
|
|
1551
1503
|
function deserializeBreakStatement(pos) {
|
|
1552
|
-
let
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
end,
|
|
1559
|
-
};
|
|
1504
|
+
let node = {
|
|
1505
|
+
type: 'BreakStatement',
|
|
1506
|
+
label: null,
|
|
1507
|
+
start: deserializeU32(pos),
|
|
1508
|
+
end: deserializeU32(pos + 4),
|
|
1509
|
+
};
|
|
1560
1510
|
node.label = deserializeOptionLabelIdentifier(pos + 8);
|
|
1561
1511
|
return node;
|
|
1562
1512
|
}
|
|
1563
1513
|
|
|
1564
1514
|
function deserializeReturnStatement(pos) {
|
|
1565
|
-
let
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
end,
|
|
1572
|
-
};
|
|
1515
|
+
let node = {
|
|
1516
|
+
type: 'ReturnStatement',
|
|
1517
|
+
argument: null,
|
|
1518
|
+
start: deserializeU32(pos),
|
|
1519
|
+
end: deserializeU32(pos + 4),
|
|
1520
|
+
};
|
|
1573
1521
|
node.argument = deserializeOptionExpression(pos + 8);
|
|
1574
1522
|
return node;
|
|
1575
1523
|
}
|
|
1576
1524
|
|
|
1577
1525
|
function deserializeWithStatement(pos) {
|
|
1578
|
-
let
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
end,
|
|
1586
|
-
};
|
|
1526
|
+
let node = {
|
|
1527
|
+
type: 'WithStatement',
|
|
1528
|
+
object: null,
|
|
1529
|
+
body: null,
|
|
1530
|
+
start: deserializeU32(pos),
|
|
1531
|
+
end: deserializeU32(pos + 4),
|
|
1532
|
+
};
|
|
1587
1533
|
node.object = deserializeExpression(pos + 8);
|
|
1588
1534
|
node.body = deserializeStatement(pos + 24);
|
|
1589
1535
|
return node;
|
|
1590
1536
|
}
|
|
1591
1537
|
|
|
1592
1538
|
function deserializeSwitchStatement(pos) {
|
|
1593
|
-
let
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
end,
|
|
1601
|
-
};
|
|
1539
|
+
let node = {
|
|
1540
|
+
type: 'SwitchStatement',
|
|
1541
|
+
discriminant: null,
|
|
1542
|
+
cases: null,
|
|
1543
|
+
start: deserializeU32(pos),
|
|
1544
|
+
end: deserializeU32(pos + 4),
|
|
1545
|
+
};
|
|
1602
1546
|
node.discriminant = deserializeExpression(pos + 8);
|
|
1603
1547
|
node.cases = deserializeVecSwitchCase(pos + 24);
|
|
1604
1548
|
return node;
|
|
1605
1549
|
}
|
|
1606
1550
|
|
|
1607
1551
|
function deserializeSwitchCase(pos) {
|
|
1608
|
-
let
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
end,
|
|
1616
|
-
};
|
|
1552
|
+
let node = {
|
|
1553
|
+
type: 'SwitchCase',
|
|
1554
|
+
test: null,
|
|
1555
|
+
consequent: null,
|
|
1556
|
+
start: deserializeU32(pos),
|
|
1557
|
+
end: deserializeU32(pos + 4),
|
|
1558
|
+
};
|
|
1617
1559
|
node.test = deserializeOptionExpression(pos + 8);
|
|
1618
1560
|
node.consequent = deserializeVecStatement(pos + 24);
|
|
1619
1561
|
return node;
|
|
1620
1562
|
}
|
|
1621
1563
|
|
|
1622
1564
|
function deserializeLabeledStatement(pos) {
|
|
1623
|
-
let
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
end,
|
|
1631
|
-
};
|
|
1565
|
+
let node = {
|
|
1566
|
+
type: 'LabeledStatement',
|
|
1567
|
+
label: null,
|
|
1568
|
+
body: null,
|
|
1569
|
+
start: deserializeU32(pos),
|
|
1570
|
+
end: deserializeU32(pos + 4),
|
|
1571
|
+
};
|
|
1632
1572
|
node.label = deserializeLabelIdentifier(pos + 8);
|
|
1633
1573
|
node.body = deserializeStatement(pos + 32);
|
|
1634
1574
|
return node;
|
|
1635
1575
|
}
|
|
1636
1576
|
|
|
1637
1577
|
function deserializeThrowStatement(pos) {
|
|
1638
|
-
let
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
end,
|
|
1645
|
-
};
|
|
1578
|
+
let node = {
|
|
1579
|
+
type: 'ThrowStatement',
|
|
1580
|
+
argument: null,
|
|
1581
|
+
start: deserializeU32(pos),
|
|
1582
|
+
end: deserializeU32(pos + 4),
|
|
1583
|
+
};
|
|
1646
1584
|
node.argument = deserializeExpression(pos + 8);
|
|
1647
1585
|
return node;
|
|
1648
1586
|
}
|
|
1649
1587
|
|
|
1650
1588
|
function deserializeTryStatement(pos) {
|
|
1651
|
-
let
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
end,
|
|
1660
|
-
};
|
|
1589
|
+
let node = {
|
|
1590
|
+
type: 'TryStatement',
|
|
1591
|
+
block: null,
|
|
1592
|
+
handler: null,
|
|
1593
|
+
finalizer: null,
|
|
1594
|
+
start: deserializeU32(pos),
|
|
1595
|
+
end: deserializeU32(pos + 4),
|
|
1596
|
+
};
|
|
1661
1597
|
node.block = deserializeBoxBlockStatement(pos + 8);
|
|
1662
1598
|
node.handler = deserializeOptionBoxCatchClause(pos + 16);
|
|
1663
1599
|
node.finalizer = deserializeOptionBoxBlockStatement(pos + 24);
|
|
@@ -1665,15 +1601,13 @@ function deserializeTryStatement(pos) {
|
|
|
1665
1601
|
}
|
|
1666
1602
|
|
|
1667
1603
|
function deserializeCatchClause(pos) {
|
|
1668
|
-
let
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
end,
|
|
1676
|
-
};
|
|
1604
|
+
let node = {
|
|
1605
|
+
type: 'CatchClause',
|
|
1606
|
+
param: null,
|
|
1607
|
+
body: null,
|
|
1608
|
+
start: deserializeU32(pos),
|
|
1609
|
+
end: deserializeU32(pos + 4),
|
|
1610
|
+
};
|
|
1677
1611
|
node.param = deserializeOptionCatchParameter(pos + 8);
|
|
1678
1612
|
node.body = deserializeBoxBlockStatement(pos + 48);
|
|
1679
1613
|
return node;
|
|
@@ -1684,11 +1618,10 @@ function deserializeCatchParameter(pos) {
|
|
|
1684
1618
|
}
|
|
1685
1619
|
|
|
1686
1620
|
function deserializeDebuggerStatement(pos) {
|
|
1687
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
1688
1621
|
return {
|
|
1689
1622
|
type: 'DebuggerStatement',
|
|
1690
|
-
start,
|
|
1691
|
-
end,
|
|
1623
|
+
start: deserializeU32(pos),
|
|
1624
|
+
end: deserializeU32(pos + 4),
|
|
1692
1625
|
};
|
|
1693
1626
|
}
|
|
1694
1627
|
|
|
@@ -1712,28 +1645,24 @@ function deserializeBindingPatternKind(pos) {
|
|
|
1712
1645
|
}
|
|
1713
1646
|
|
|
1714
1647
|
function deserializeAssignmentPattern(pos) {
|
|
1715
|
-
let
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
end,
|
|
1723
|
-
};
|
|
1648
|
+
let node = {
|
|
1649
|
+
type: 'AssignmentPattern',
|
|
1650
|
+
left: null,
|
|
1651
|
+
right: null,
|
|
1652
|
+
start: deserializeU32(pos),
|
|
1653
|
+
end: deserializeU32(pos + 4),
|
|
1654
|
+
};
|
|
1724
1655
|
node.left = deserializeBindingPattern(pos + 8);
|
|
1725
1656
|
node.right = deserializeExpression(pos + 40);
|
|
1726
1657
|
return node;
|
|
1727
1658
|
}
|
|
1728
1659
|
|
|
1729
1660
|
function deserializeObjectPattern(pos) {
|
|
1730
|
-
let
|
|
1731
|
-
end = deserializeU32(pos + 4),
|
|
1732
|
-
node = {
|
|
1661
|
+
let node = {
|
|
1733
1662
|
type: 'ObjectPattern',
|
|
1734
1663
|
properties: null,
|
|
1735
|
-
start,
|
|
1736
|
-
end,
|
|
1664
|
+
start: deserializeU32(pos),
|
|
1665
|
+
end: deserializeU32(pos + 4),
|
|
1737
1666
|
},
|
|
1738
1667
|
properties = deserializeVecBindingProperty(pos + 8),
|
|
1739
1668
|
rest = deserializeOptionBoxBindingRestElement(pos + 32);
|
|
@@ -1764,13 +1693,11 @@ function deserializeBindingProperty(pos) {
|
|
|
1764
1693
|
}
|
|
1765
1694
|
|
|
1766
1695
|
function deserializeArrayPattern(pos) {
|
|
1767
|
-
let
|
|
1768
|
-
end = deserializeU32(pos + 4),
|
|
1769
|
-
node = {
|
|
1696
|
+
let node = {
|
|
1770
1697
|
type: 'ArrayPattern',
|
|
1771
1698
|
elements: null,
|
|
1772
|
-
start,
|
|
1773
|
-
end,
|
|
1699
|
+
start: deserializeU32(pos),
|
|
1700
|
+
end: deserializeU32(pos + 4),
|
|
1774
1701
|
},
|
|
1775
1702
|
elements = deserializeVecOptionBindingPattern(pos + 8),
|
|
1776
1703
|
rest = deserializeOptionBoxBindingRestElement(pos + 32);
|
|
@@ -1780,14 +1707,12 @@ function deserializeArrayPattern(pos) {
|
|
|
1780
1707
|
}
|
|
1781
1708
|
|
|
1782
1709
|
function deserializeBindingRestElement(pos) {
|
|
1783
|
-
let
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
end,
|
|
1790
|
-
};
|
|
1710
|
+
let node = {
|
|
1711
|
+
type: 'RestElement',
|
|
1712
|
+
argument: null,
|
|
1713
|
+
start: deserializeU32(pos),
|
|
1714
|
+
end: deserializeU32(pos + 4),
|
|
1715
|
+
};
|
|
1791
1716
|
node.argument = deserializeBindingPattern(pos + 8);
|
|
1792
1717
|
return node;
|
|
1793
1718
|
}
|
|
@@ -1831,8 +1756,8 @@ function deserializeFunctionType(pos) {
|
|
|
1831
1756
|
|
|
1832
1757
|
function deserializeFormalParameters(pos) {
|
|
1833
1758
|
let params = deserializeVecFormalParameter(pos + 8);
|
|
1834
|
-
if (uint32[pos + 32 >> 2] !== 0 && uint32[pos + 36 >> 2] !== 0) {
|
|
1835
|
-
pos = uint32[pos + 32 >> 2];
|
|
1759
|
+
if (uint32[(pos + 32) >> 2] !== 0 && uint32[(pos + 36) >> 2] !== 0) {
|
|
1760
|
+
pos = uint32[(pos + 32) >> 2];
|
|
1836
1761
|
let rest = {
|
|
1837
1762
|
type: 'RestElement',
|
|
1838
1763
|
argument: null,
|
|
@@ -1852,13 +1777,11 @@ function deserializeFormalParameter(pos) {
|
|
|
1852
1777
|
}
|
|
1853
1778
|
|
|
1854
1779
|
function deserializeFunctionBody(pos) {
|
|
1855
|
-
let
|
|
1856
|
-
end = deserializeU32(pos + 4),
|
|
1857
|
-
node = {
|
|
1780
|
+
let node = {
|
|
1858
1781
|
type: 'BlockStatement',
|
|
1859
1782
|
body: null,
|
|
1860
|
-
start,
|
|
1861
|
-
end,
|
|
1783
|
+
start: deserializeU32(pos),
|
|
1784
|
+
end: deserializeU32(pos + 4),
|
|
1862
1785
|
},
|
|
1863
1786
|
body = deserializeVecDirective(pos + 8);
|
|
1864
1787
|
body.push(...deserializeVecStatement(pos + 32));
|
|
@@ -1935,14 +1858,12 @@ function deserializeClassType(pos) {
|
|
|
1935
1858
|
}
|
|
1936
1859
|
|
|
1937
1860
|
function deserializeClassBody(pos) {
|
|
1938
|
-
let
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
end,
|
|
1945
|
-
};
|
|
1861
|
+
let node = {
|
|
1862
|
+
type: 'ClassBody',
|
|
1863
|
+
body: null,
|
|
1864
|
+
start: deserializeU32(pos),
|
|
1865
|
+
end: deserializeU32(pos + 4),
|
|
1866
|
+
};
|
|
1946
1867
|
node.body = deserializeVecClassElement(pos + 8);
|
|
1947
1868
|
return node;
|
|
1948
1869
|
}
|
|
@@ -2041,7 +1962,8 @@ function deserializeMethodDefinitionKind(pos) {
|
|
|
2041
1962
|
}
|
|
2042
1963
|
|
|
2043
1964
|
function deserializePrivateIdentifier(pos) {
|
|
2044
|
-
let start = deserializeU32(pos),
|
|
1965
|
+
let start = deserializeU32(pos),
|
|
1966
|
+
end = deserializeU32(pos + 4);
|
|
2045
1967
|
return {
|
|
2046
1968
|
type: 'PrivateIdentifier',
|
|
2047
1969
|
name: deserializeStr(pos + 8),
|
|
@@ -2051,14 +1973,12 @@ function deserializePrivateIdentifier(pos) {
|
|
|
2051
1973
|
}
|
|
2052
1974
|
|
|
2053
1975
|
function deserializeStaticBlock(pos) {
|
|
2054
|
-
let
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
end,
|
|
2061
|
-
};
|
|
1976
|
+
let node = {
|
|
1977
|
+
type: 'StaticBlock',
|
|
1978
|
+
body: null,
|
|
1979
|
+
start: deserializeU32(pos),
|
|
1980
|
+
end: deserializeU32(pos + 4),
|
|
1981
|
+
};
|
|
2062
1982
|
node.body = deserializeVecStatement(pos + 8);
|
|
2063
1983
|
return node;
|
|
2064
1984
|
}
|
|
@@ -2155,42 +2075,36 @@ function deserializeImportDeclarationSpecifier(pos) {
|
|
|
2155
2075
|
}
|
|
2156
2076
|
|
|
2157
2077
|
function deserializeImportSpecifier(pos) {
|
|
2158
|
-
let
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
end,
|
|
2166
|
-
};
|
|
2078
|
+
let node = {
|
|
2079
|
+
type: 'ImportSpecifier',
|
|
2080
|
+
imported: null,
|
|
2081
|
+
local: null,
|
|
2082
|
+
start: deserializeU32(pos),
|
|
2083
|
+
end: deserializeU32(pos + 4),
|
|
2084
|
+
};
|
|
2167
2085
|
node.imported = deserializeModuleExportName(pos + 8);
|
|
2168
2086
|
node.local = deserializeBindingIdentifier(pos + 64);
|
|
2169
2087
|
return node;
|
|
2170
2088
|
}
|
|
2171
2089
|
|
|
2172
2090
|
function deserializeImportDefaultSpecifier(pos) {
|
|
2173
|
-
let
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
end,
|
|
2180
|
-
};
|
|
2091
|
+
let node = {
|
|
2092
|
+
type: 'ImportDefaultSpecifier',
|
|
2093
|
+
local: null,
|
|
2094
|
+
start: deserializeU32(pos),
|
|
2095
|
+
end: deserializeU32(pos + 4),
|
|
2096
|
+
};
|
|
2181
2097
|
node.local = deserializeBindingIdentifier(pos + 8);
|
|
2182
2098
|
return node;
|
|
2183
2099
|
}
|
|
2184
2100
|
|
|
2185
2101
|
function deserializeImportNamespaceSpecifier(pos) {
|
|
2186
|
-
let
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
end,
|
|
2193
|
-
};
|
|
2102
|
+
let node = {
|
|
2103
|
+
type: 'ImportNamespaceSpecifier',
|
|
2104
|
+
local: null,
|
|
2105
|
+
start: deserializeU32(pos),
|
|
2106
|
+
end: deserializeU32(pos + 4),
|
|
2107
|
+
};
|
|
2194
2108
|
node.local = deserializeBindingIdentifier(pos + 8);
|
|
2195
2109
|
return node;
|
|
2196
2110
|
}
|
|
@@ -2200,15 +2114,13 @@ function deserializeWithClause(pos) {
|
|
|
2200
2114
|
}
|
|
2201
2115
|
|
|
2202
2116
|
function deserializeImportAttribute(pos) {
|
|
2203
|
-
let
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
end,
|
|
2211
|
-
};
|
|
2117
|
+
let node = {
|
|
2118
|
+
type: 'ImportAttribute',
|
|
2119
|
+
key: null,
|
|
2120
|
+
value: null,
|
|
2121
|
+
start: deserializeU32(pos),
|
|
2122
|
+
end: deserializeU32(pos + 4),
|
|
2123
|
+
};
|
|
2212
2124
|
node.key = deserializeImportAttributeKey(pos + 8);
|
|
2213
2125
|
node.value = deserializeStringLiteral(pos + 64);
|
|
2214
2126
|
return node;
|
|
@@ -2226,16 +2138,14 @@ function deserializeImportAttributeKey(pos) {
|
|
|
2226
2138
|
}
|
|
2227
2139
|
|
|
2228
2140
|
function deserializeExportNamedDeclaration(pos) {
|
|
2229
|
-
let
|
|
2230
|
-
end = deserializeU32(pos + 4),
|
|
2231
|
-
node = {
|
|
2141
|
+
let node = {
|
|
2232
2142
|
type: 'ExportNamedDeclaration',
|
|
2233
2143
|
declaration: null,
|
|
2234
2144
|
specifiers: null,
|
|
2235
2145
|
source: null,
|
|
2236
2146
|
attributes: null,
|
|
2237
|
-
start,
|
|
2238
|
-
end,
|
|
2147
|
+
start: deserializeU32(pos),
|
|
2148
|
+
end: deserializeU32(pos + 4),
|
|
2239
2149
|
},
|
|
2240
2150
|
withClause = deserializeOptionBoxWithClause(pos + 96);
|
|
2241
2151
|
node.declaration = deserializeOptionDeclaration(pos + 8);
|
|
@@ -2246,28 +2156,24 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2246
2156
|
}
|
|
2247
2157
|
|
|
2248
2158
|
function deserializeExportDefaultDeclaration(pos) {
|
|
2249
|
-
let
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
end,
|
|
2256
|
-
};
|
|
2159
|
+
let node = {
|
|
2160
|
+
type: 'ExportDefaultDeclaration',
|
|
2161
|
+
declaration: null,
|
|
2162
|
+
start: deserializeU32(pos),
|
|
2163
|
+
end: deserializeU32(pos + 4),
|
|
2164
|
+
};
|
|
2257
2165
|
node.declaration = deserializeExportDefaultDeclarationKind(pos + 8);
|
|
2258
2166
|
return node;
|
|
2259
2167
|
}
|
|
2260
2168
|
|
|
2261
2169
|
function deserializeExportAllDeclaration(pos) {
|
|
2262
|
-
let
|
|
2263
|
-
end = deserializeU32(pos + 4),
|
|
2264
|
-
node = {
|
|
2170
|
+
let node = {
|
|
2265
2171
|
type: 'ExportAllDeclaration',
|
|
2266
2172
|
exported: null,
|
|
2267
2173
|
source: null,
|
|
2268
2174
|
attributes: null,
|
|
2269
|
-
start,
|
|
2270
|
-
end,
|
|
2175
|
+
start: deserializeU32(pos),
|
|
2176
|
+
end: deserializeU32(pos + 4),
|
|
2271
2177
|
},
|
|
2272
2178
|
withClause = deserializeOptionBoxWithClause(pos + 112);
|
|
2273
2179
|
node.exported = deserializeOptionModuleExportName(pos + 8);
|
|
@@ -2277,17 +2183,15 @@ function deserializeExportAllDeclaration(pos) {
|
|
|
2277
2183
|
}
|
|
2278
2184
|
|
|
2279
2185
|
function deserializeExportSpecifier(pos) {
|
|
2280
|
-
let
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
node.local = deserializeModuleExportName(pos + 8);
|
|
2290
|
-
node.exported = deserializeModuleExportName(pos + 64);
|
|
2186
|
+
let node = {
|
|
2187
|
+
type: 'ExportSpecifier',
|
|
2188
|
+
local: null,
|
|
2189
|
+
exported: null,
|
|
2190
|
+
start: deserializeU32(pos),
|
|
2191
|
+
end: deserializeU32(pos + 4),
|
|
2192
|
+
};
|
|
2193
|
+
node.local = deserializeModuleExportName(pos + 8);
|
|
2194
|
+
node.exported = deserializeModuleExportName(pos + 64);
|
|
2291
2195
|
return node;
|
|
2292
2196
|
}
|
|
2293
2197
|
|
|
@@ -2404,15 +2308,13 @@ function deserializeModuleExportName(pos) {
|
|
|
2404
2308
|
}
|
|
2405
2309
|
|
|
2406
2310
|
function deserializeV8IntrinsicExpression(pos) {
|
|
2407
|
-
let
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
end,
|
|
2415
|
-
};
|
|
2311
|
+
let node = {
|
|
2312
|
+
type: 'V8IntrinsicExpression',
|
|
2313
|
+
name: null,
|
|
2314
|
+
arguments: null,
|
|
2315
|
+
start: deserializeU32(pos),
|
|
2316
|
+
end: deserializeU32(pos + 4),
|
|
2317
|
+
};
|
|
2416
2318
|
node.name = deserializeIdentifierName(pos + 8);
|
|
2417
2319
|
node.arguments = deserializeVecArgument(pos + 32);
|
|
2418
2320
|
return node;
|
|
@@ -2449,7 +2351,8 @@ function deserializeNullLiteral(pos) {
|
|
|
2449
2351
|
}
|
|
2450
2352
|
|
|
2451
2353
|
function deserializeNumericLiteral(pos) {
|
|
2452
|
-
let start = deserializeU32(pos),
|
|
2354
|
+
let start = deserializeU32(pos),
|
|
2355
|
+
end = deserializeU32(pos + 4);
|
|
2453
2356
|
return {
|
|
2454
2357
|
type: 'Literal',
|
|
2455
2358
|
value: deserializeF64(pos + 8),
|
|
@@ -2522,7 +2425,8 @@ function deserializeRegExp(pos) {
|
|
|
2522
2425
|
}
|
|
2523
2426
|
|
|
2524
2427
|
function deserializeRegExpFlags(pos) {
|
|
2525
|
-
let flagBits = deserializeU8(pos),
|
|
2428
|
+
let flagBits = deserializeU8(pos),
|
|
2429
|
+
flags = '';
|
|
2526
2430
|
// Alphabetical order
|
|
2527
2431
|
flagBits & 64 && (flags += 'd');
|
|
2528
2432
|
flagBits & 1 && (flags += 'g');
|
|
@@ -2536,15 +2440,13 @@ function deserializeRegExpFlags(pos) {
|
|
|
2536
2440
|
}
|
|
2537
2441
|
|
|
2538
2442
|
function deserializeJSXElement(pos) {
|
|
2539
|
-
let
|
|
2540
|
-
end = deserializeU32(pos + 4),
|
|
2541
|
-
node = {
|
|
2443
|
+
let node = {
|
|
2542
2444
|
type: 'JSXElement',
|
|
2543
2445
|
openingElement: null,
|
|
2544
2446
|
children: null,
|
|
2545
2447
|
closingElement: null,
|
|
2546
|
-
start,
|
|
2547
|
-
end,
|
|
2448
|
+
start: deserializeU32(pos),
|
|
2449
|
+
end: deserializeU32(pos + 4),
|
|
2548
2450
|
},
|
|
2549
2451
|
closingElement = deserializeOptionBoxJSXClosingElement(pos + 40),
|
|
2550
2452
|
openingElement = deserializeBoxJSXOpeningElement(pos + 8);
|
|
@@ -2556,16 +2458,14 @@ function deserializeJSXElement(pos) {
|
|
|
2556
2458
|
}
|
|
2557
2459
|
|
|
2558
2460
|
function deserializeJSXOpeningElement(pos) {
|
|
2559
|
-
let
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
end,
|
|
2568
|
-
};
|
|
2461
|
+
let node = {
|
|
2462
|
+
type: 'JSXOpeningElement',
|
|
2463
|
+
name: null,
|
|
2464
|
+
attributes: null,
|
|
2465
|
+
selfClosing: null,
|
|
2466
|
+
start: deserializeU32(pos),
|
|
2467
|
+
end: deserializeU32(pos + 4),
|
|
2468
|
+
};
|
|
2569
2469
|
node.name = deserializeJSXElementName(pos + 8);
|
|
2570
2470
|
node.attributes = deserializeVecJSXAttributeItem(pos + 32);
|
|
2571
2471
|
node.selfClosing = false;
|
|
@@ -2573,29 +2473,25 @@ function deserializeJSXOpeningElement(pos) {
|
|
|
2573
2473
|
}
|
|
2574
2474
|
|
|
2575
2475
|
function deserializeJSXClosingElement(pos) {
|
|
2576
|
-
let
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
end,
|
|
2583
|
-
};
|
|
2476
|
+
let node = {
|
|
2477
|
+
type: 'JSXClosingElement',
|
|
2478
|
+
name: null,
|
|
2479
|
+
start: deserializeU32(pos),
|
|
2480
|
+
end: deserializeU32(pos + 4),
|
|
2481
|
+
};
|
|
2584
2482
|
node.name = deserializeJSXElementName(pos + 8);
|
|
2585
2483
|
return node;
|
|
2586
2484
|
}
|
|
2587
2485
|
|
|
2588
2486
|
function deserializeJSXFragment(pos) {
|
|
2589
|
-
let
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
end,
|
|
2598
|
-
};
|
|
2487
|
+
let node = {
|
|
2488
|
+
type: 'JSXFragment',
|
|
2489
|
+
openingFragment: null,
|
|
2490
|
+
children: null,
|
|
2491
|
+
closingFragment: null,
|
|
2492
|
+
start: deserializeU32(pos),
|
|
2493
|
+
end: deserializeU32(pos + 4),
|
|
2494
|
+
};
|
|
2599
2495
|
node.openingFragment = deserializeJSXOpeningFragment(pos + 8);
|
|
2600
2496
|
node.children = deserializeVecJSXChild(pos + 16);
|
|
2601
2497
|
node.closingFragment = deserializeJSXClosingFragment(pos + 40);
|
|
@@ -2603,26 +2499,23 @@ function deserializeJSXFragment(pos) {
|
|
|
2603
2499
|
}
|
|
2604
2500
|
|
|
2605
2501
|
function deserializeJSXOpeningFragment(pos) {
|
|
2606
|
-
let
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
end,
|
|
2614
|
-
};
|
|
2502
|
+
let node = {
|
|
2503
|
+
type: 'JSXOpeningFragment',
|
|
2504
|
+
attributes: null,
|
|
2505
|
+
selfClosing: null,
|
|
2506
|
+
start: deserializeU32(pos),
|
|
2507
|
+
end: deserializeU32(pos + 4),
|
|
2508
|
+
};
|
|
2615
2509
|
node.attributes = [];
|
|
2616
2510
|
node.selfClosing = false;
|
|
2617
2511
|
return node;
|
|
2618
2512
|
}
|
|
2619
2513
|
|
|
2620
2514
|
function deserializeJSXClosingFragment(pos) {
|
|
2621
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
2622
2515
|
return {
|
|
2623
2516
|
type: 'JSXClosingFragment',
|
|
2624
|
-
start,
|
|
2625
|
-
end,
|
|
2517
|
+
start: deserializeU32(pos),
|
|
2518
|
+
end: deserializeU32(pos + 4),
|
|
2626
2519
|
};
|
|
2627
2520
|
}
|
|
2628
2521
|
|
|
@@ -2656,30 +2549,26 @@ function deserializeJSXElementName(pos) {
|
|
|
2656
2549
|
}
|
|
2657
2550
|
|
|
2658
2551
|
function deserializeJSXNamespacedName(pos) {
|
|
2659
|
-
let
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
end,
|
|
2667
|
-
};
|
|
2552
|
+
let node = {
|
|
2553
|
+
type: 'JSXNamespacedName',
|
|
2554
|
+
namespace: null,
|
|
2555
|
+
name: null,
|
|
2556
|
+
start: deserializeU32(pos),
|
|
2557
|
+
end: deserializeU32(pos + 4),
|
|
2558
|
+
};
|
|
2668
2559
|
node.namespace = deserializeJSXIdentifier(pos + 8);
|
|
2669
2560
|
node.name = deserializeJSXIdentifier(pos + 32);
|
|
2670
2561
|
return node;
|
|
2671
2562
|
}
|
|
2672
2563
|
|
|
2673
2564
|
function deserializeJSXMemberExpression(pos) {
|
|
2674
|
-
let
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
end,
|
|
2682
|
-
};
|
|
2565
|
+
let node = {
|
|
2566
|
+
type: 'JSXMemberExpression',
|
|
2567
|
+
object: null,
|
|
2568
|
+
property: null,
|
|
2569
|
+
start: deserializeU32(pos),
|
|
2570
|
+
end: deserializeU32(pos + 4),
|
|
2571
|
+
};
|
|
2683
2572
|
node.object = deserializeJSXMemberExpressionObject(pos + 8);
|
|
2684
2573
|
node.property = deserializeJSXIdentifier(pos + 24);
|
|
2685
2574
|
return node;
|
|
@@ -2711,14 +2600,12 @@ function deserializeJSXMemberExpressionObject(pos) {
|
|
|
2711
2600
|
}
|
|
2712
2601
|
|
|
2713
2602
|
function deserializeJSXExpressionContainer(pos) {
|
|
2714
|
-
let
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
end,
|
|
2721
|
-
};
|
|
2603
|
+
let node = {
|
|
2604
|
+
type: 'JSXExpressionContainer',
|
|
2605
|
+
expression: null,
|
|
2606
|
+
start: deserializeU32(pos),
|
|
2607
|
+
end: deserializeU32(pos + 4),
|
|
2608
|
+
};
|
|
2722
2609
|
node.expression = deserializeJSXExpression(pos + 8);
|
|
2723
2610
|
return node;
|
|
2724
2611
|
}
|
|
@@ -2819,11 +2706,10 @@ function deserializeJSXExpression(pos) {
|
|
|
2819
2706
|
}
|
|
2820
2707
|
|
|
2821
2708
|
function deserializeJSXEmptyExpression(pos) {
|
|
2822
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
2823
2709
|
return {
|
|
2824
2710
|
type: 'JSXEmptyExpression',
|
|
2825
|
-
start,
|
|
2826
|
-
end,
|
|
2711
|
+
start: deserializeU32(pos),
|
|
2712
|
+
end: deserializeU32(pos + 4),
|
|
2827
2713
|
};
|
|
2828
2714
|
}
|
|
2829
2715
|
|
|
@@ -2839,29 +2725,25 @@ function deserializeJSXAttributeItem(pos) {
|
|
|
2839
2725
|
}
|
|
2840
2726
|
|
|
2841
2727
|
function deserializeJSXAttribute(pos) {
|
|
2842
|
-
let
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
end,
|
|
2850
|
-
};
|
|
2728
|
+
let node = {
|
|
2729
|
+
type: 'JSXAttribute',
|
|
2730
|
+
name: null,
|
|
2731
|
+
value: null,
|
|
2732
|
+
start: deserializeU32(pos),
|
|
2733
|
+
end: deserializeU32(pos + 4),
|
|
2734
|
+
};
|
|
2851
2735
|
node.name = deserializeJSXAttributeName(pos + 8);
|
|
2852
2736
|
node.value = deserializeOptionJSXAttributeValue(pos + 24);
|
|
2853
2737
|
return node;
|
|
2854
2738
|
}
|
|
2855
2739
|
|
|
2856
2740
|
function deserializeJSXSpreadAttribute(pos) {
|
|
2857
|
-
let
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
end,
|
|
2864
|
-
};
|
|
2741
|
+
let node = {
|
|
2742
|
+
type: 'JSXSpreadAttribute',
|
|
2743
|
+
argument: null,
|
|
2744
|
+
start: deserializeU32(pos),
|
|
2745
|
+
end: deserializeU32(pos + 4),
|
|
2746
|
+
};
|
|
2865
2747
|
node.argument = deserializeExpression(pos + 8);
|
|
2866
2748
|
return node;
|
|
2867
2749
|
}
|
|
@@ -2893,7 +2775,8 @@ function deserializeJSXAttributeValue(pos) {
|
|
|
2893
2775
|
}
|
|
2894
2776
|
|
|
2895
2777
|
function deserializeJSXIdentifier(pos) {
|
|
2896
|
-
let start = deserializeU32(pos),
|
|
2778
|
+
let start = deserializeU32(pos),
|
|
2779
|
+
end = deserializeU32(pos + 4);
|
|
2897
2780
|
return {
|
|
2898
2781
|
type: 'JSXIdentifier',
|
|
2899
2782
|
name: deserializeStr(pos + 8),
|
|
@@ -2920,20 +2803,19 @@ function deserializeJSXChild(pos) {
|
|
|
2920
2803
|
}
|
|
2921
2804
|
|
|
2922
2805
|
function deserializeJSXSpreadChild(pos) {
|
|
2923
|
-
let
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
end,
|
|
2930
|
-
};
|
|
2806
|
+
let node = {
|
|
2807
|
+
type: 'JSXSpreadChild',
|
|
2808
|
+
expression: null,
|
|
2809
|
+
start: deserializeU32(pos),
|
|
2810
|
+
end: deserializeU32(pos + 4),
|
|
2811
|
+
};
|
|
2931
2812
|
node.expression = deserializeExpression(pos + 8);
|
|
2932
2813
|
return node;
|
|
2933
2814
|
}
|
|
2934
2815
|
|
|
2935
2816
|
function deserializeJSXText(pos) {
|
|
2936
|
-
let start = deserializeU32(pos),
|
|
2817
|
+
let start = deserializeU32(pos),
|
|
2818
|
+
end = deserializeU32(pos + 4);
|
|
2937
2819
|
return {
|
|
2938
2820
|
type: 'JSXText',
|
|
2939
2821
|
value: deserializeStr(pos + 8),
|
|
@@ -2944,17 +2826,15 @@ function deserializeJSXText(pos) {
|
|
|
2944
2826
|
}
|
|
2945
2827
|
|
|
2946
2828
|
function deserializeTSThisParameter(pos) {
|
|
2947
|
-
let
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
end,
|
|
2957
|
-
};
|
|
2829
|
+
let node = {
|
|
2830
|
+
type: 'Identifier',
|
|
2831
|
+
decorators: null,
|
|
2832
|
+
name: null,
|
|
2833
|
+
optional: null,
|
|
2834
|
+
typeAnnotation: null,
|
|
2835
|
+
start: deserializeU32(pos),
|
|
2836
|
+
end: deserializeU32(pos + 4),
|
|
2837
|
+
};
|
|
2958
2838
|
node.decorators = [];
|
|
2959
2839
|
node.name = 'this';
|
|
2960
2840
|
node.optional = false;
|
|
@@ -2980,29 +2860,25 @@ function deserializeTSEnumDeclaration(pos) {
|
|
|
2980
2860
|
}
|
|
2981
2861
|
|
|
2982
2862
|
function deserializeTSEnumBody(pos) {
|
|
2983
|
-
let
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
end,
|
|
2990
|
-
};
|
|
2863
|
+
let node = {
|
|
2864
|
+
type: 'TSEnumBody',
|
|
2865
|
+
members: null,
|
|
2866
|
+
start: deserializeU32(pos),
|
|
2867
|
+
end: deserializeU32(pos + 4),
|
|
2868
|
+
};
|
|
2991
2869
|
node.members = deserializeVecTSEnumMember(pos + 8);
|
|
2992
2870
|
return node;
|
|
2993
2871
|
}
|
|
2994
2872
|
|
|
2995
2873
|
function deserializeTSEnumMember(pos) {
|
|
2996
|
-
let
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
end,
|
|
3005
|
-
};
|
|
2874
|
+
let node = {
|
|
2875
|
+
type: 'TSEnumMember',
|
|
2876
|
+
id: null,
|
|
2877
|
+
initializer: null,
|
|
2878
|
+
computed: null,
|
|
2879
|
+
start: deserializeU32(pos),
|
|
2880
|
+
end: deserializeU32(pos + 4),
|
|
2881
|
+
};
|
|
3006
2882
|
node.id = deserializeTSEnumMemberName(pos + 8);
|
|
3007
2883
|
node.initializer = deserializeOptionExpression(pos + 24);
|
|
3008
2884
|
node.computed = deserializeU8(pos + 8) > 1;
|
|
@@ -3025,27 +2901,23 @@ function deserializeTSEnumMemberName(pos) {
|
|
|
3025
2901
|
}
|
|
3026
2902
|
|
|
3027
2903
|
function deserializeTSTypeAnnotation(pos) {
|
|
3028
|
-
let
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
end,
|
|
3035
|
-
};
|
|
2904
|
+
let node = {
|
|
2905
|
+
type: 'TSTypeAnnotation',
|
|
2906
|
+
typeAnnotation: null,
|
|
2907
|
+
start: deserializeU32(pos),
|
|
2908
|
+
end: deserializeU32(pos + 4),
|
|
2909
|
+
};
|
|
3036
2910
|
node.typeAnnotation = deserializeTSType(pos + 8);
|
|
3037
2911
|
return node;
|
|
3038
2912
|
}
|
|
3039
2913
|
|
|
3040
2914
|
function deserializeTSLiteralType(pos) {
|
|
3041
|
-
let
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
end,
|
|
3048
|
-
};
|
|
2915
|
+
let node = {
|
|
2916
|
+
type: 'TSLiteralType',
|
|
2917
|
+
literal: null,
|
|
2918
|
+
start: deserializeU32(pos),
|
|
2919
|
+
end: deserializeU32(pos + 4),
|
|
2920
|
+
};
|
|
3049
2921
|
node.literal = deserializeTSLiteral(pos + 8);
|
|
3050
2922
|
return node;
|
|
3051
2923
|
}
|
|
@@ -3151,17 +3023,15 @@ function deserializeTSType(pos) {
|
|
|
3151
3023
|
}
|
|
3152
3024
|
|
|
3153
3025
|
function deserializeTSConditionalType(pos) {
|
|
3154
|
-
let
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
end,
|
|
3164
|
-
};
|
|
3026
|
+
let node = {
|
|
3027
|
+
type: 'TSConditionalType',
|
|
3028
|
+
checkType: null,
|
|
3029
|
+
extendsType: null,
|
|
3030
|
+
trueType: null,
|
|
3031
|
+
falseType: null,
|
|
3032
|
+
start: deserializeU32(pos),
|
|
3033
|
+
end: deserializeU32(pos + 4),
|
|
3034
|
+
};
|
|
3165
3035
|
node.checkType = deserializeTSType(pos + 8);
|
|
3166
3036
|
node.extendsType = deserializeTSType(pos + 24);
|
|
3167
3037
|
node.trueType = deserializeTSType(pos + 40);
|
|
@@ -3170,27 +3040,23 @@ function deserializeTSConditionalType(pos) {
|
|
|
3170
3040
|
}
|
|
3171
3041
|
|
|
3172
3042
|
function deserializeTSUnionType(pos) {
|
|
3173
|
-
let
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
end,
|
|
3180
|
-
};
|
|
3043
|
+
let node = {
|
|
3044
|
+
type: 'TSUnionType',
|
|
3045
|
+
types: null,
|
|
3046
|
+
start: deserializeU32(pos),
|
|
3047
|
+
end: deserializeU32(pos + 4),
|
|
3048
|
+
};
|
|
3181
3049
|
node.types = deserializeVecTSType(pos + 8);
|
|
3182
3050
|
return node;
|
|
3183
3051
|
}
|
|
3184
3052
|
|
|
3185
3053
|
function deserializeTSIntersectionType(pos) {
|
|
3186
|
-
let
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
end,
|
|
3193
|
-
};
|
|
3054
|
+
let node = {
|
|
3055
|
+
type: 'TSIntersectionType',
|
|
3056
|
+
types: null,
|
|
3057
|
+
start: deserializeU32(pos),
|
|
3058
|
+
end: deserializeU32(pos + 4),
|
|
3059
|
+
};
|
|
3194
3060
|
node.types = deserializeVecTSType(pos + 8);
|
|
3195
3061
|
return node;
|
|
3196
3062
|
}
|
|
@@ -3235,42 +3101,36 @@ function deserializeTSTypeOperatorOperator(pos) {
|
|
|
3235
3101
|
}
|
|
3236
3102
|
|
|
3237
3103
|
function deserializeTSArrayType(pos) {
|
|
3238
|
-
let
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
end,
|
|
3245
|
-
};
|
|
3104
|
+
let node = {
|
|
3105
|
+
type: 'TSArrayType',
|
|
3106
|
+
elementType: null,
|
|
3107
|
+
start: deserializeU32(pos),
|
|
3108
|
+
end: deserializeU32(pos + 4),
|
|
3109
|
+
};
|
|
3246
3110
|
node.elementType = deserializeTSType(pos + 8);
|
|
3247
3111
|
return node;
|
|
3248
3112
|
}
|
|
3249
3113
|
|
|
3250
3114
|
function deserializeTSIndexedAccessType(pos) {
|
|
3251
|
-
let
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
end,
|
|
3259
|
-
};
|
|
3115
|
+
let node = {
|
|
3116
|
+
type: 'TSIndexedAccessType',
|
|
3117
|
+
objectType: null,
|
|
3118
|
+
indexType: null,
|
|
3119
|
+
start: deserializeU32(pos),
|
|
3120
|
+
end: deserializeU32(pos + 4),
|
|
3121
|
+
};
|
|
3260
3122
|
node.objectType = deserializeTSType(pos + 8);
|
|
3261
3123
|
node.indexType = deserializeTSType(pos + 24);
|
|
3262
3124
|
return node;
|
|
3263
3125
|
}
|
|
3264
3126
|
|
|
3265
3127
|
function deserializeTSTupleType(pos) {
|
|
3266
|
-
let
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
end,
|
|
3273
|
-
};
|
|
3128
|
+
let node = {
|
|
3129
|
+
type: 'TSTupleType',
|
|
3130
|
+
elementTypes: null,
|
|
3131
|
+
start: deserializeU32(pos),
|
|
3132
|
+
end: deserializeU32(pos + 4),
|
|
3133
|
+
};
|
|
3274
3134
|
node.elementTypes = deserializeVecTSTupleElement(pos + 8);
|
|
3275
3135
|
return node;
|
|
3276
3136
|
}
|
|
@@ -3292,27 +3152,23 @@ function deserializeTSNamedTupleMember(pos) {
|
|
|
3292
3152
|
}
|
|
3293
3153
|
|
|
3294
3154
|
function deserializeTSOptionalType(pos) {
|
|
3295
|
-
let
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
end,
|
|
3302
|
-
};
|
|
3155
|
+
let node = {
|
|
3156
|
+
type: 'TSOptionalType',
|
|
3157
|
+
typeAnnotation: null,
|
|
3158
|
+
start: deserializeU32(pos),
|
|
3159
|
+
end: deserializeU32(pos + 4),
|
|
3160
|
+
};
|
|
3303
3161
|
node.typeAnnotation = deserializeTSType(pos + 8);
|
|
3304
3162
|
return node;
|
|
3305
3163
|
}
|
|
3306
3164
|
|
|
3307
3165
|
function deserializeTSRestType(pos) {
|
|
3308
|
-
let
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
end,
|
|
3315
|
-
};
|
|
3166
|
+
let node = {
|
|
3167
|
+
type: 'TSRestType',
|
|
3168
|
+
typeAnnotation: null,
|
|
3169
|
+
start: deserializeU32(pos),
|
|
3170
|
+
end: deserializeU32(pos + 4),
|
|
3171
|
+
};
|
|
3316
3172
|
node.typeAnnotation = deserializeTSType(pos + 8);
|
|
3317
3173
|
return node;
|
|
3318
3174
|
}
|
|
@@ -3403,141 +3259,125 @@ function deserializeTSTupleElement(pos) {
|
|
|
3403
3259
|
}
|
|
3404
3260
|
|
|
3405
3261
|
function deserializeTSAnyKeyword(pos) {
|
|
3406
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3407
3262
|
return {
|
|
3408
3263
|
type: 'TSAnyKeyword',
|
|
3409
|
-
start,
|
|
3410
|
-
end,
|
|
3264
|
+
start: deserializeU32(pos),
|
|
3265
|
+
end: deserializeU32(pos + 4),
|
|
3411
3266
|
};
|
|
3412
3267
|
}
|
|
3413
3268
|
|
|
3414
3269
|
function deserializeTSStringKeyword(pos) {
|
|
3415
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3416
3270
|
return {
|
|
3417
3271
|
type: 'TSStringKeyword',
|
|
3418
|
-
start,
|
|
3419
|
-
end,
|
|
3272
|
+
start: deserializeU32(pos),
|
|
3273
|
+
end: deserializeU32(pos + 4),
|
|
3420
3274
|
};
|
|
3421
3275
|
}
|
|
3422
3276
|
|
|
3423
3277
|
function deserializeTSBooleanKeyword(pos) {
|
|
3424
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3425
3278
|
return {
|
|
3426
3279
|
type: 'TSBooleanKeyword',
|
|
3427
|
-
start,
|
|
3428
|
-
end,
|
|
3280
|
+
start: deserializeU32(pos),
|
|
3281
|
+
end: deserializeU32(pos + 4),
|
|
3429
3282
|
};
|
|
3430
3283
|
}
|
|
3431
3284
|
|
|
3432
3285
|
function deserializeTSNumberKeyword(pos) {
|
|
3433
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3434
3286
|
return {
|
|
3435
3287
|
type: 'TSNumberKeyword',
|
|
3436
|
-
start,
|
|
3437
|
-
end,
|
|
3288
|
+
start: deserializeU32(pos),
|
|
3289
|
+
end: deserializeU32(pos + 4),
|
|
3438
3290
|
};
|
|
3439
3291
|
}
|
|
3440
3292
|
|
|
3441
3293
|
function deserializeTSNeverKeyword(pos) {
|
|
3442
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3443
3294
|
return {
|
|
3444
3295
|
type: 'TSNeverKeyword',
|
|
3445
|
-
start,
|
|
3446
|
-
end,
|
|
3296
|
+
start: deserializeU32(pos),
|
|
3297
|
+
end: deserializeU32(pos + 4),
|
|
3447
3298
|
};
|
|
3448
3299
|
}
|
|
3449
3300
|
|
|
3450
3301
|
function deserializeTSIntrinsicKeyword(pos) {
|
|
3451
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3452
3302
|
return {
|
|
3453
3303
|
type: 'TSIntrinsicKeyword',
|
|
3454
|
-
start,
|
|
3455
|
-
end,
|
|
3304
|
+
start: deserializeU32(pos),
|
|
3305
|
+
end: deserializeU32(pos + 4),
|
|
3456
3306
|
};
|
|
3457
3307
|
}
|
|
3458
3308
|
|
|
3459
3309
|
function deserializeTSUnknownKeyword(pos) {
|
|
3460
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3461
3310
|
return {
|
|
3462
3311
|
type: 'TSUnknownKeyword',
|
|
3463
|
-
start,
|
|
3464
|
-
end,
|
|
3312
|
+
start: deserializeU32(pos),
|
|
3313
|
+
end: deserializeU32(pos + 4),
|
|
3465
3314
|
};
|
|
3466
3315
|
}
|
|
3467
3316
|
|
|
3468
3317
|
function deserializeTSNullKeyword(pos) {
|
|
3469
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3470
3318
|
return {
|
|
3471
3319
|
type: 'TSNullKeyword',
|
|
3472
|
-
start,
|
|
3473
|
-
end,
|
|
3320
|
+
start: deserializeU32(pos),
|
|
3321
|
+
end: deserializeU32(pos + 4),
|
|
3474
3322
|
};
|
|
3475
3323
|
}
|
|
3476
3324
|
|
|
3477
3325
|
function deserializeTSUndefinedKeyword(pos) {
|
|
3478
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3479
3326
|
return {
|
|
3480
3327
|
type: 'TSUndefinedKeyword',
|
|
3481
|
-
start,
|
|
3482
|
-
end,
|
|
3328
|
+
start: deserializeU32(pos),
|
|
3329
|
+
end: deserializeU32(pos + 4),
|
|
3483
3330
|
};
|
|
3484
3331
|
}
|
|
3485
3332
|
|
|
3486
3333
|
function deserializeTSVoidKeyword(pos) {
|
|
3487
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3488
3334
|
return {
|
|
3489
3335
|
type: 'TSVoidKeyword',
|
|
3490
|
-
start,
|
|
3491
|
-
end,
|
|
3336
|
+
start: deserializeU32(pos),
|
|
3337
|
+
end: deserializeU32(pos + 4),
|
|
3492
3338
|
};
|
|
3493
3339
|
}
|
|
3494
3340
|
|
|
3495
3341
|
function deserializeTSSymbolKeyword(pos) {
|
|
3496
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3497
3342
|
return {
|
|
3498
3343
|
type: 'TSSymbolKeyword',
|
|
3499
|
-
start,
|
|
3500
|
-
end,
|
|
3344
|
+
start: deserializeU32(pos),
|
|
3345
|
+
end: deserializeU32(pos + 4),
|
|
3501
3346
|
};
|
|
3502
3347
|
}
|
|
3503
3348
|
|
|
3504
3349
|
function deserializeTSThisType(pos) {
|
|
3505
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3506
3350
|
return {
|
|
3507
3351
|
type: 'TSThisType',
|
|
3508
|
-
start,
|
|
3509
|
-
end,
|
|
3352
|
+
start: deserializeU32(pos),
|
|
3353
|
+
end: deserializeU32(pos + 4),
|
|
3510
3354
|
};
|
|
3511
3355
|
}
|
|
3512
3356
|
|
|
3513
3357
|
function deserializeTSObjectKeyword(pos) {
|
|
3514
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3515
3358
|
return {
|
|
3516
3359
|
type: 'TSObjectKeyword',
|
|
3517
|
-
start,
|
|
3518
|
-
end,
|
|
3360
|
+
start: deserializeU32(pos),
|
|
3361
|
+
end: deserializeU32(pos + 4),
|
|
3519
3362
|
};
|
|
3520
3363
|
}
|
|
3521
3364
|
|
|
3522
3365
|
function deserializeTSBigIntKeyword(pos) {
|
|
3523
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
3524
3366
|
return {
|
|
3525
3367
|
type: 'TSBigIntKeyword',
|
|
3526
|
-
start,
|
|
3527
|
-
end,
|
|
3368
|
+
start: deserializeU32(pos),
|
|
3369
|
+
end: deserializeU32(pos + 4),
|
|
3528
3370
|
};
|
|
3529
3371
|
}
|
|
3530
3372
|
|
|
3531
3373
|
function deserializeTSTypeReference(pos) {
|
|
3532
|
-
let
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
end,
|
|
3540
|
-
};
|
|
3374
|
+
let node = {
|
|
3375
|
+
type: 'TSTypeReference',
|
|
3376
|
+
typeName: null,
|
|
3377
|
+
typeArguments: null,
|
|
3378
|
+
start: deserializeU32(pos),
|
|
3379
|
+
end: deserializeU32(pos + 4),
|
|
3380
|
+
};
|
|
3541
3381
|
node.typeName = deserializeTSTypeName(pos + 8);
|
|
3542
3382
|
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 24);
|
|
3543
3383
|
return node;
|
|
@@ -3557,29 +3397,25 @@ function deserializeTSTypeName(pos) {
|
|
|
3557
3397
|
}
|
|
3558
3398
|
|
|
3559
3399
|
function deserializeTSQualifiedName(pos) {
|
|
3560
|
-
let
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
node
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
params: null,
|
|
3580
|
-
start,
|
|
3581
|
-
end,
|
|
3582
|
-
};
|
|
3400
|
+
let node = {
|
|
3401
|
+
type: 'TSQualifiedName',
|
|
3402
|
+
left: null,
|
|
3403
|
+
right: null,
|
|
3404
|
+
start: deserializeU32(pos),
|
|
3405
|
+
end: deserializeU32(pos + 4),
|
|
3406
|
+
};
|
|
3407
|
+
node.left = deserializeTSTypeName(pos + 8);
|
|
3408
|
+
node.right = deserializeIdentifierName(pos + 24);
|
|
3409
|
+
return node;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
function deserializeTSTypeParameterInstantiation(pos) {
|
|
3413
|
+
let node = {
|
|
3414
|
+
type: 'TSTypeParameterInstantiation',
|
|
3415
|
+
params: null,
|
|
3416
|
+
start: deserializeU32(pos),
|
|
3417
|
+
end: deserializeU32(pos + 4),
|
|
3418
|
+
};
|
|
3583
3419
|
node.params = deserializeVecTSType(pos + 8);
|
|
3584
3420
|
return node;
|
|
3585
3421
|
}
|
|
@@ -3605,14 +3441,12 @@ function deserializeTSTypeParameter(pos) {
|
|
|
3605
3441
|
}
|
|
3606
3442
|
|
|
3607
3443
|
function deserializeTSTypeParameterDeclaration(pos) {
|
|
3608
|
-
let
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
end,
|
|
3615
|
-
};
|
|
3444
|
+
let node = {
|
|
3445
|
+
type: 'TSTypeParameterDeclaration',
|
|
3446
|
+
params: null,
|
|
3447
|
+
start: deserializeU32(pos),
|
|
3448
|
+
end: deserializeU32(pos + 4),
|
|
3449
|
+
};
|
|
3616
3450
|
node.params = deserializeVecTSTypeParameter(pos + 8);
|
|
3617
3451
|
return node;
|
|
3618
3452
|
}
|
|
@@ -3656,14 +3490,12 @@ function deserializeTSInterfaceDeclaration(pos) {
|
|
|
3656
3490
|
}
|
|
3657
3491
|
|
|
3658
3492
|
function deserializeTSInterfaceBody(pos) {
|
|
3659
|
-
let
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
end,
|
|
3666
|
-
};
|
|
3493
|
+
let node = {
|
|
3494
|
+
type: 'TSInterfaceBody',
|
|
3495
|
+
body: null,
|
|
3496
|
+
start: deserializeU32(pos),
|
|
3497
|
+
end: deserializeU32(pos + 4),
|
|
3498
|
+
};
|
|
3667
3499
|
node.body = deserializeVecTSSignature(pos + 8);
|
|
3668
3500
|
return node;
|
|
3669
3501
|
}
|
|
@@ -3727,15 +3559,13 @@ function deserializeTSIndexSignature(pos) {
|
|
|
3727
3559
|
}
|
|
3728
3560
|
|
|
3729
3561
|
function deserializeTSCallSignatureDeclaration(pos) {
|
|
3730
|
-
let
|
|
3731
|
-
end = deserializeU32(pos + 4),
|
|
3732
|
-
node = {
|
|
3562
|
+
let node = {
|
|
3733
3563
|
type: 'TSCallSignatureDeclaration',
|
|
3734
3564
|
typeParameters: null,
|
|
3735
3565
|
params: null,
|
|
3736
3566
|
returnType: null,
|
|
3737
|
-
start,
|
|
3738
|
-
end,
|
|
3567
|
+
start: deserializeU32(pos),
|
|
3568
|
+
end: deserializeU32(pos + 4),
|
|
3739
3569
|
},
|
|
3740
3570
|
params = deserializeBoxFormalParameters(pos + 24),
|
|
3741
3571
|
thisParam = deserializeOptionBoxTSThisParameter(pos + 16);
|
|
@@ -3791,16 +3621,14 @@ function deserializeTSMethodSignature(pos) {
|
|
|
3791
3621
|
}
|
|
3792
3622
|
|
|
3793
3623
|
function deserializeTSConstructSignatureDeclaration(pos) {
|
|
3794
|
-
let
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
end,
|
|
3803
|
-
};
|
|
3624
|
+
let node = {
|
|
3625
|
+
type: 'TSConstructSignatureDeclaration',
|
|
3626
|
+
typeParameters: null,
|
|
3627
|
+
params: null,
|
|
3628
|
+
returnType: null,
|
|
3629
|
+
start: deserializeU32(pos),
|
|
3630
|
+
end: deserializeU32(pos + 4),
|
|
3631
|
+
};
|
|
3804
3632
|
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 8);
|
|
3805
3633
|
node.params = deserializeBoxFormalParameters(pos + 16);
|
|
3806
3634
|
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 24);
|
|
@@ -3826,15 +3654,13 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
3826
3654
|
}
|
|
3827
3655
|
|
|
3828
3656
|
function deserializeTSInterfaceHeritage(pos) {
|
|
3829
|
-
let
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
end,
|
|
3837
|
-
};
|
|
3657
|
+
let node = {
|
|
3658
|
+
type: 'TSInterfaceHeritage',
|
|
3659
|
+
expression: null,
|
|
3660
|
+
typeArguments: null,
|
|
3661
|
+
start: deserializeU32(pos),
|
|
3662
|
+
end: deserializeU32(pos + 4),
|
|
3663
|
+
};
|
|
3838
3664
|
node.expression = deserializeExpression(pos + 8);
|
|
3839
3665
|
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 24);
|
|
3840
3666
|
return node;
|
|
@@ -3901,7 +3727,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3901
3727
|
if (body.type === 'TSModuleBlock') node.id = id;
|
|
3902
3728
|
else {
|
|
3903
3729
|
let innerId = body.id;
|
|
3904
|
-
if (innerId.type === 'Identifier')
|
|
3730
|
+
if (innerId.type === 'Identifier')
|
|
3905
3731
|
node.id = {
|
|
3906
3732
|
type: 'TSQualifiedName',
|
|
3907
3733
|
left: id,
|
|
@@ -3909,7 +3735,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
3909
3735
|
start: id.start,
|
|
3910
3736
|
end: innerId.end,
|
|
3911
3737
|
};
|
|
3912
|
-
|
|
3738
|
+
else {
|
|
3913
3739
|
// Replace `left` of innermost `TSQualifiedName` with a nested `TSQualifiedName` with `id` of
|
|
3914
3740
|
// this module on left, and previous `left` of innermost `TSQualifiedName` on right
|
|
3915
3741
|
node.id = innerId;
|
|
@@ -3973,13 +3799,11 @@ function deserializeTSModuleDeclarationBody(pos) {
|
|
|
3973
3799
|
}
|
|
3974
3800
|
|
|
3975
3801
|
function deserializeTSModuleBlock(pos) {
|
|
3976
|
-
let
|
|
3977
|
-
end = deserializeU32(pos + 4),
|
|
3978
|
-
node = {
|
|
3802
|
+
let node = {
|
|
3979
3803
|
type: 'TSModuleBlock',
|
|
3980
3804
|
body: null,
|
|
3981
|
-
start,
|
|
3982
|
-
end,
|
|
3805
|
+
start: deserializeU32(pos),
|
|
3806
|
+
end: deserializeU32(pos + 4),
|
|
3983
3807
|
},
|
|
3984
3808
|
body = deserializeVecDirective(pos + 8);
|
|
3985
3809
|
body.push(...deserializeVecStatement(pos + 32));
|
|
@@ -3988,41 +3812,35 @@ function deserializeTSModuleBlock(pos) {
|
|
|
3988
3812
|
}
|
|
3989
3813
|
|
|
3990
3814
|
function deserializeTSTypeLiteral(pos) {
|
|
3991
|
-
let
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
end,
|
|
3998
|
-
};
|
|
3815
|
+
let node = {
|
|
3816
|
+
type: 'TSTypeLiteral',
|
|
3817
|
+
members: null,
|
|
3818
|
+
start: deserializeU32(pos),
|
|
3819
|
+
end: deserializeU32(pos + 4),
|
|
3820
|
+
};
|
|
3999
3821
|
node.members = deserializeVecTSSignature(pos + 8);
|
|
4000
3822
|
return node;
|
|
4001
3823
|
}
|
|
4002
3824
|
|
|
4003
3825
|
function deserializeTSInferType(pos) {
|
|
4004
|
-
let
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
end,
|
|
4011
|
-
};
|
|
3826
|
+
let node = {
|
|
3827
|
+
type: 'TSInferType',
|
|
3828
|
+
typeParameter: null,
|
|
3829
|
+
start: deserializeU32(pos),
|
|
3830
|
+
end: deserializeU32(pos + 4),
|
|
3831
|
+
};
|
|
4012
3832
|
node.typeParameter = deserializeBoxTSTypeParameter(pos + 8);
|
|
4013
3833
|
return node;
|
|
4014
3834
|
}
|
|
4015
3835
|
|
|
4016
3836
|
function deserializeTSTypeQuery(pos) {
|
|
4017
|
-
let
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
end,
|
|
4025
|
-
};
|
|
3837
|
+
let node = {
|
|
3838
|
+
type: 'TSTypeQuery',
|
|
3839
|
+
exprName: null,
|
|
3840
|
+
typeArguments: null,
|
|
3841
|
+
start: deserializeU32(pos),
|
|
3842
|
+
end: deserializeU32(pos + 4),
|
|
3843
|
+
};
|
|
4026
3844
|
node.exprName = deserializeTSTypeQueryExprName(pos + 8);
|
|
4027
3845
|
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 24);
|
|
4028
3846
|
return node;
|
|
@@ -4044,17 +3862,15 @@ function deserializeTSTypeQueryExprName(pos) {
|
|
|
4044
3862
|
}
|
|
4045
3863
|
|
|
4046
3864
|
function deserializeTSImportType(pos) {
|
|
4047
|
-
let
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
end,
|
|
4057
|
-
};
|
|
3865
|
+
let node = {
|
|
3866
|
+
type: 'TSImportType',
|
|
3867
|
+
argument: null,
|
|
3868
|
+
options: null,
|
|
3869
|
+
qualifier: null,
|
|
3870
|
+
typeArguments: null,
|
|
3871
|
+
start: deserializeU32(pos),
|
|
3872
|
+
end: deserializeU32(pos + 4),
|
|
3873
|
+
};
|
|
4058
3874
|
node.argument = deserializeTSType(pos + 8);
|
|
4059
3875
|
node.options = deserializeOptionBoxObjectExpression(pos + 24);
|
|
4060
3876
|
node.qualifier = deserializeOptionTSImportTypeQualifier(pos + 32);
|
|
@@ -4074,30 +3890,26 @@ function deserializeTSImportTypeQualifier(pos) {
|
|
|
4074
3890
|
}
|
|
4075
3891
|
|
|
4076
3892
|
function deserializeTSImportTypeQualifiedName(pos) {
|
|
4077
|
-
let
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
end,
|
|
4085
|
-
};
|
|
3893
|
+
let node = {
|
|
3894
|
+
type: 'TSQualifiedName',
|
|
3895
|
+
left: null,
|
|
3896
|
+
right: null,
|
|
3897
|
+
start: deserializeU32(pos),
|
|
3898
|
+
end: deserializeU32(pos + 4),
|
|
3899
|
+
};
|
|
4086
3900
|
node.left = deserializeTSImportTypeQualifier(pos + 8);
|
|
4087
3901
|
node.right = deserializeIdentifierName(pos + 24);
|
|
4088
3902
|
return node;
|
|
4089
3903
|
}
|
|
4090
3904
|
|
|
4091
3905
|
function deserializeTSFunctionType(pos) {
|
|
4092
|
-
let
|
|
4093
|
-
end = deserializeU32(pos + 4),
|
|
4094
|
-
node = {
|
|
3906
|
+
let node = {
|
|
4095
3907
|
type: 'TSFunctionType',
|
|
4096
3908
|
typeParameters: null,
|
|
4097
3909
|
params: null,
|
|
4098
3910
|
returnType: null,
|
|
4099
|
-
start,
|
|
4100
|
-
end,
|
|
3911
|
+
start: deserializeU32(pos),
|
|
3912
|
+
end: deserializeU32(pos + 4),
|
|
4101
3913
|
},
|
|
4102
3914
|
params = deserializeBoxFormalParameters(pos + 24),
|
|
4103
3915
|
thisParam = deserializeOptionBoxTSThisParameter(pos + 16);
|
|
@@ -4113,7 +3925,7 @@ function deserializeTSConstructorType(pos) {
|
|
|
4113
3925
|
end = deserializeU32(pos + 4),
|
|
4114
3926
|
node = {
|
|
4115
3927
|
type: 'TSConstructorType',
|
|
4116
|
-
abstract: deserializeBool(pos +
|
|
3928
|
+
abstract: deserializeBool(pos + 36),
|
|
4117
3929
|
typeParameters: null,
|
|
4118
3930
|
params: null,
|
|
4119
3931
|
returnType: null,
|
|
@@ -4167,60 +3979,52 @@ function deserializeTSMappedTypeModifierOperator(pos) {
|
|
|
4167
3979
|
}
|
|
4168
3980
|
|
|
4169
3981
|
function deserializeTSTemplateLiteralType(pos) {
|
|
4170
|
-
let
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
end,
|
|
4178
|
-
};
|
|
3982
|
+
let node = {
|
|
3983
|
+
type: 'TSTemplateLiteralType',
|
|
3984
|
+
quasis: null,
|
|
3985
|
+
types: null,
|
|
3986
|
+
start: deserializeU32(pos),
|
|
3987
|
+
end: deserializeU32(pos + 4),
|
|
3988
|
+
};
|
|
4179
3989
|
node.quasis = deserializeVecTemplateElement(pos + 8);
|
|
4180
3990
|
node.types = deserializeVecTSType(pos + 32);
|
|
4181
3991
|
return node;
|
|
4182
3992
|
}
|
|
4183
3993
|
|
|
4184
3994
|
function deserializeTSAsExpression(pos) {
|
|
4185
|
-
let
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
end,
|
|
4193
|
-
};
|
|
3995
|
+
let node = {
|
|
3996
|
+
type: 'TSAsExpression',
|
|
3997
|
+
expression: null,
|
|
3998
|
+
typeAnnotation: null,
|
|
3999
|
+
start: deserializeU32(pos),
|
|
4000
|
+
end: deserializeU32(pos + 4),
|
|
4001
|
+
};
|
|
4194
4002
|
node.expression = deserializeExpression(pos + 8);
|
|
4195
4003
|
node.typeAnnotation = deserializeTSType(pos + 24);
|
|
4196
4004
|
return node;
|
|
4197
4005
|
}
|
|
4198
4006
|
|
|
4199
4007
|
function deserializeTSSatisfiesExpression(pos) {
|
|
4200
|
-
let
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
end,
|
|
4208
|
-
};
|
|
4008
|
+
let node = {
|
|
4009
|
+
type: 'TSSatisfiesExpression',
|
|
4010
|
+
expression: null,
|
|
4011
|
+
typeAnnotation: null,
|
|
4012
|
+
start: deserializeU32(pos),
|
|
4013
|
+
end: deserializeU32(pos + 4),
|
|
4014
|
+
};
|
|
4209
4015
|
node.expression = deserializeExpression(pos + 8);
|
|
4210
4016
|
node.typeAnnotation = deserializeTSType(pos + 24);
|
|
4211
4017
|
return node;
|
|
4212
4018
|
}
|
|
4213
4019
|
|
|
4214
4020
|
function deserializeTSTypeAssertion(pos) {
|
|
4215
|
-
let
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
end,
|
|
4223
|
-
};
|
|
4021
|
+
let node = {
|
|
4022
|
+
type: 'TSTypeAssertion',
|
|
4023
|
+
typeAnnotation: null,
|
|
4024
|
+
expression: null,
|
|
4025
|
+
start: deserializeU32(pos),
|
|
4026
|
+
end: deserializeU32(pos + 4),
|
|
4027
|
+
};
|
|
4224
4028
|
node.typeAnnotation = deserializeTSType(pos + 8);
|
|
4225
4029
|
node.expression = deserializeExpression(pos + 24);
|
|
4226
4030
|
return node;
|
|
@@ -4258,80 +4062,68 @@ function deserializeTSModuleReference(pos) {
|
|
|
4258
4062
|
}
|
|
4259
4063
|
|
|
4260
4064
|
function deserializeTSExternalModuleReference(pos) {
|
|
4261
|
-
let
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
end,
|
|
4268
|
-
};
|
|
4065
|
+
let node = {
|
|
4066
|
+
type: 'TSExternalModuleReference',
|
|
4067
|
+
expression: null,
|
|
4068
|
+
start: deserializeU32(pos),
|
|
4069
|
+
end: deserializeU32(pos + 4),
|
|
4070
|
+
};
|
|
4269
4071
|
node.expression = deserializeStringLiteral(pos + 8);
|
|
4270
4072
|
return node;
|
|
4271
4073
|
}
|
|
4272
4074
|
|
|
4273
4075
|
function deserializeTSNonNullExpression(pos) {
|
|
4274
|
-
let
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
end,
|
|
4281
|
-
};
|
|
4076
|
+
let node = {
|
|
4077
|
+
type: 'TSNonNullExpression',
|
|
4078
|
+
expression: null,
|
|
4079
|
+
start: deserializeU32(pos),
|
|
4080
|
+
end: deserializeU32(pos + 4),
|
|
4081
|
+
};
|
|
4282
4082
|
node.expression = deserializeExpression(pos + 8);
|
|
4283
4083
|
return node;
|
|
4284
4084
|
}
|
|
4285
4085
|
|
|
4286
4086
|
function deserializeDecorator(pos) {
|
|
4287
|
-
let
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
end,
|
|
4294
|
-
};
|
|
4087
|
+
let node = {
|
|
4088
|
+
type: 'Decorator',
|
|
4089
|
+
expression: null,
|
|
4090
|
+
start: deserializeU32(pos),
|
|
4091
|
+
end: deserializeU32(pos + 4),
|
|
4092
|
+
};
|
|
4295
4093
|
node.expression = deserializeExpression(pos + 8);
|
|
4296
4094
|
return node;
|
|
4297
4095
|
}
|
|
4298
4096
|
|
|
4299
4097
|
function deserializeTSExportAssignment(pos) {
|
|
4300
|
-
let
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
end,
|
|
4307
|
-
};
|
|
4098
|
+
let node = {
|
|
4099
|
+
type: 'TSExportAssignment',
|
|
4100
|
+
expression: null,
|
|
4101
|
+
start: deserializeU32(pos),
|
|
4102
|
+
end: deserializeU32(pos + 4),
|
|
4103
|
+
};
|
|
4308
4104
|
node.expression = deserializeExpression(pos + 8);
|
|
4309
4105
|
return node;
|
|
4310
4106
|
}
|
|
4311
4107
|
|
|
4312
4108
|
function deserializeTSNamespaceExportDeclaration(pos) {
|
|
4313
|
-
let
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
end,
|
|
4320
|
-
};
|
|
4109
|
+
let node = {
|
|
4110
|
+
type: 'TSNamespaceExportDeclaration',
|
|
4111
|
+
id: null,
|
|
4112
|
+
start: deserializeU32(pos),
|
|
4113
|
+
end: deserializeU32(pos + 4),
|
|
4114
|
+
};
|
|
4321
4115
|
node.id = deserializeIdentifierName(pos + 8);
|
|
4322
4116
|
return node;
|
|
4323
4117
|
}
|
|
4324
4118
|
|
|
4325
4119
|
function deserializeTSInstantiationExpression(pos) {
|
|
4326
|
-
let
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
end,
|
|
4334
|
-
};
|
|
4120
|
+
let node = {
|
|
4121
|
+
type: 'TSInstantiationExpression',
|
|
4122
|
+
expression: null,
|
|
4123
|
+
typeArguments: null,
|
|
4124
|
+
start: deserializeU32(pos),
|
|
4125
|
+
end: deserializeU32(pos + 4),
|
|
4126
|
+
};
|
|
4335
4127
|
node.expression = deserializeExpression(pos + 8);
|
|
4336
4128
|
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos + 24);
|
|
4337
4129
|
return node;
|
|
@@ -4377,11 +4169,10 @@ function deserializeJSDocNonNullableType(pos) {
|
|
|
4377
4169
|
}
|
|
4378
4170
|
|
|
4379
4171
|
function deserializeJSDocUnknownType(pos) {
|
|
4380
|
-
let start = deserializeU32(pos), end = deserializeU32(pos + 4);
|
|
4381
4172
|
return {
|
|
4382
4173
|
type: 'TSJSDocUnknownType',
|
|
4383
|
-
start,
|
|
4384
|
-
end,
|
|
4174
|
+
start: deserializeU32(pos),
|
|
4175
|
+
end: deserializeU32(pos + 4),
|
|
4385
4176
|
};
|
|
4386
4177
|
}
|
|
4387
4178
|
|
|
@@ -4399,20 +4190,18 @@ function deserializeCommentKind(pos) {
|
|
|
4399
4190
|
function deserializeComment(pos) {
|
|
4400
4191
|
let type = deserializeCommentKind(pos + 12),
|
|
4401
4192
|
start = deserializeU32(pos),
|
|
4402
|
-
end = deserializeU32(pos + 4)
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
endCut = type === 'Line' ? 0 : 2;
|
|
4410
|
-
node.value = sourceText.slice(start + 2, end - endCut);
|
|
4411
|
-
return node;
|
|
4193
|
+
end = deserializeU32(pos + 4);
|
|
4194
|
+
return {
|
|
4195
|
+
type,
|
|
4196
|
+
value: sourceText.slice(start + 2, end - (type === 'Line' ? 0 : 2)),
|
|
4197
|
+
start,
|
|
4198
|
+
end,
|
|
4199
|
+
};
|
|
4412
4200
|
}
|
|
4413
4201
|
|
|
4414
4202
|
function deserializeNameSpan(pos) {
|
|
4415
|
-
let start = deserializeU32(pos),
|
|
4203
|
+
let start = deserializeU32(pos),
|
|
4204
|
+
end = deserializeU32(pos + 4);
|
|
4416
4205
|
return {
|
|
4417
4206
|
value: deserializeStr(pos + 8),
|
|
4418
4207
|
start,
|
|
@@ -4459,7 +4248,8 @@ function deserializeImportImportName(pos) {
|
|
|
4459
4248
|
}
|
|
4460
4249
|
|
|
4461
4250
|
function deserializeExportEntry(pos) {
|
|
4462
|
-
let start = deserializeU32(pos),
|
|
4251
|
+
let start = deserializeU32(pos),
|
|
4252
|
+
end = deserializeU32(pos + 4);
|
|
4463
4253
|
return {
|
|
4464
4254
|
moduleRequest: deserializeOptionNameSpan(pos + 16),
|
|
4465
4255
|
importName: deserializeExportImportName(pos + 40),
|
|
@@ -4568,7 +4358,8 @@ function deserializeExportLocalName(pos) {
|
|
|
4568
4358
|
}
|
|
4569
4359
|
|
|
4570
4360
|
function deserializeDynamicImport(pos) {
|
|
4571
|
-
let start = deserializeU32(pos),
|
|
4361
|
+
let start = deserializeU32(pos),
|
|
4362
|
+
end = deserializeU32(pos + 4);
|
|
4572
4363
|
return {
|
|
4573
4364
|
moduleRequest: deserializeSpan(pos + 8),
|
|
4574
4365
|
start,
|
|
@@ -4762,7 +4553,8 @@ function deserializeErrorSeverity(pos) {
|
|
|
4762
4553
|
}
|
|
4763
4554
|
|
|
4764
4555
|
function deserializeErrorLabel(pos) {
|
|
4765
|
-
let start = deserializeU32(pos),
|
|
4556
|
+
let start = deserializeU32(pos),
|
|
4557
|
+
end = deserializeU32(pos + 4);
|
|
4766
4558
|
return {
|
|
4767
4559
|
message: deserializeOptionStr(pos + 8),
|
|
4768
4560
|
start,
|
|
@@ -4781,7 +4573,8 @@ function deserializeEcmaScriptModule(pos) {
|
|
|
4781
4573
|
}
|
|
4782
4574
|
|
|
4783
4575
|
function deserializeStaticImport(pos) {
|
|
4784
|
-
let start = deserializeU32(pos),
|
|
4576
|
+
let start = deserializeU32(pos),
|
|
4577
|
+
end = deserializeU32(pos + 4);
|
|
4785
4578
|
return {
|
|
4786
4579
|
moduleRequest: deserializeNameSpan(pos + 8),
|
|
4787
4580
|
entries: deserializeVecImportEntry(pos + 32),
|
|
@@ -4791,7 +4584,8 @@ function deserializeStaticImport(pos) {
|
|
|
4791
4584
|
}
|
|
4792
4585
|
|
|
4793
4586
|
function deserializeStaticExport(pos) {
|
|
4794
|
-
let start = deserializeU32(pos),
|
|
4587
|
+
let start = deserializeU32(pos),
|
|
4588
|
+
end = deserializeU32(pos + 4);
|
|
4795
4589
|
return {
|
|
4796
4590
|
entries: deserializeVecExportEntry(pos + 8),
|
|
4797
4591
|
start,
|
|
@@ -4808,7 +4602,8 @@ function deserializeU8(pos) {
|
|
|
4808
4602
|
}
|
|
4809
4603
|
|
|
4810
4604
|
function deserializeStr(pos) {
|
|
4811
|
-
let pos32 = pos >> 2,
|
|
4605
|
+
let pos32 = pos >> 2,
|
|
4606
|
+
len = uint32[pos32 + 2];
|
|
4812
4607
|
if (len === 0) return '';
|
|
4813
4608
|
pos = uint32[pos32];
|
|
4814
4609
|
if (sourceIsAscii && pos < sourceByteLen) return sourceText.substr(pos, len);
|
|
@@ -4817,7 +4612,8 @@ function deserializeStr(pos) {
|
|
|
4817
4612
|
let end = pos + len;
|
|
4818
4613
|
if (len > 50) return decodeStr(uint8.subarray(pos, end));
|
|
4819
4614
|
// Shorter strings decode by hand to avoid native call
|
|
4820
|
-
let out = '',
|
|
4615
|
+
let out = '',
|
|
4616
|
+
c;
|
|
4821
4617
|
do {
|
|
4822
4618
|
c = uint8[pos++];
|
|
4823
4619
|
if (c < 128) out += fromCodePoint(c);
|
|
@@ -4830,10 +4626,11 @@ function deserializeStr(pos) {
|
|
|
4830
4626
|
}
|
|
4831
4627
|
|
|
4832
4628
|
function deserializeVecComment(pos) {
|
|
4833
|
-
let arr = [],
|
|
4629
|
+
let arr = [],
|
|
4630
|
+
pos32 = pos >> 2;
|
|
4834
4631
|
pos = uint32[pos32];
|
|
4835
4632
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
4836
|
-
for (; pos !== endPos;) {
|
|
4633
|
+
for (; pos !== endPos; ) {
|
|
4837
4634
|
arr.push(deserializeComment(pos));
|
|
4838
4635
|
pos += 16;
|
|
4839
4636
|
}
|
|
@@ -4841,15 +4638,16 @@ function deserializeVecComment(pos) {
|
|
|
4841
4638
|
}
|
|
4842
4639
|
|
|
4843
4640
|
function deserializeOptionHashbang(pos) {
|
|
4844
|
-
if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
|
|
4641
|
+
if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
|
|
4845
4642
|
return deserializeHashbang(pos);
|
|
4846
4643
|
}
|
|
4847
4644
|
|
|
4848
4645
|
function deserializeVecDirective(pos) {
|
|
4849
|
-
let arr = [],
|
|
4646
|
+
let arr = [],
|
|
4647
|
+
pos32 = pos >> 2;
|
|
4850
4648
|
pos = uint32[pos32];
|
|
4851
4649
|
let endPos = pos + uint32[pos32 + 2] * 72;
|
|
4852
|
-
for (; pos !== endPos;) {
|
|
4650
|
+
for (; pos !== endPos; ) {
|
|
4853
4651
|
arr.push(deserializeDirective(pos));
|
|
4854
4652
|
pos += 72;
|
|
4855
4653
|
}
|
|
@@ -4857,10 +4655,11 @@ function deserializeVecDirective(pos) {
|
|
|
4857
4655
|
}
|
|
4858
4656
|
|
|
4859
4657
|
function deserializeVecStatement(pos) {
|
|
4860
|
-
let arr = [],
|
|
4658
|
+
let arr = [],
|
|
4659
|
+
pos32 = pos >> 2;
|
|
4861
4660
|
pos = uint32[pos32];
|
|
4862
4661
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
4863
|
-
for (; pos !== endPos;) {
|
|
4662
|
+
for (; pos !== endPos; ) {
|
|
4864
4663
|
arr.push(deserializeStatement(pos));
|
|
4865
4664
|
pos += 16;
|
|
4866
4665
|
}
|
|
@@ -5028,10 +4827,11 @@ function deserializeBoxV8IntrinsicExpression(pos) {
|
|
|
5028
4827
|
}
|
|
5029
4828
|
|
|
5030
4829
|
function deserializeVecArrayExpressionElement(pos) {
|
|
5031
|
-
let arr = [],
|
|
4830
|
+
let arr = [],
|
|
4831
|
+
pos32 = pos >> 2;
|
|
5032
4832
|
pos = uint32[pos32];
|
|
5033
4833
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5034
|
-
for (; pos !== endPos;) {
|
|
4834
|
+
for (; pos !== endPos; ) {
|
|
5035
4835
|
arr.push(deserializeArrayExpressionElement(pos));
|
|
5036
4836
|
pos += 16;
|
|
5037
4837
|
}
|
|
@@ -5043,10 +4843,11 @@ function deserializeBoxSpreadElement(pos) {
|
|
|
5043
4843
|
}
|
|
5044
4844
|
|
|
5045
4845
|
function deserializeVecObjectPropertyKind(pos) {
|
|
5046
|
-
let arr = [],
|
|
4846
|
+
let arr = [],
|
|
4847
|
+
pos32 = pos >> 2;
|
|
5047
4848
|
pos = uint32[pos32];
|
|
5048
4849
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5049
|
-
for (; pos !== endPos;) {
|
|
4850
|
+
for (; pos !== endPos; ) {
|
|
5050
4851
|
arr.push(deserializeObjectPropertyKind(pos));
|
|
5051
4852
|
pos += 16;
|
|
5052
4853
|
}
|
|
@@ -5070,10 +4871,11 @@ function deserializeBoxPrivateIdentifier(pos) {
|
|
|
5070
4871
|
}
|
|
5071
4872
|
|
|
5072
4873
|
function deserializeVecTemplateElement(pos) {
|
|
5073
|
-
let arr = [],
|
|
4874
|
+
let arr = [],
|
|
4875
|
+
pos32 = pos >> 2;
|
|
5074
4876
|
pos = uint32[pos32];
|
|
5075
4877
|
let endPos = pos + uint32[pos32 + 2] * 48;
|
|
5076
|
-
for (; pos !== endPos;) {
|
|
4878
|
+
for (; pos !== endPos; ) {
|
|
5077
4879
|
arr.push(deserializeTemplateElement(pos));
|
|
5078
4880
|
pos += 48;
|
|
5079
4881
|
}
|
|
@@ -5081,10 +4883,11 @@ function deserializeVecTemplateElement(pos) {
|
|
|
5081
4883
|
}
|
|
5082
4884
|
|
|
5083
4885
|
function deserializeVecExpression(pos) {
|
|
5084
|
-
let arr = [],
|
|
4886
|
+
let arr = [],
|
|
4887
|
+
pos32 = pos >> 2;
|
|
5085
4888
|
pos = uint32[pos32];
|
|
5086
4889
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5087
|
-
for (; pos !== endPos;) {
|
|
4890
|
+
for (; pos !== endPos; ) {
|
|
5088
4891
|
arr.push(deserializeExpression(pos));
|
|
5089
4892
|
pos += 16;
|
|
5090
4893
|
}
|
|
@@ -5096,12 +4899,12 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
|
|
|
5096
4899
|
}
|
|
5097
4900
|
|
|
5098
4901
|
function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
|
|
5099
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
4902
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5100
4903
|
return deserializeBoxTSTypeParameterInstantiation(pos);
|
|
5101
4904
|
}
|
|
5102
4905
|
|
|
5103
4906
|
function deserializeOptionStr(pos) {
|
|
5104
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
4907
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5105
4908
|
return deserializeStr(pos);
|
|
5106
4909
|
}
|
|
5107
4910
|
|
|
@@ -5118,10 +4921,11 @@ function deserializeBoxPrivateFieldExpression(pos) {
|
|
|
5118
4921
|
}
|
|
5119
4922
|
|
|
5120
4923
|
function deserializeVecArgument(pos) {
|
|
5121
|
-
let arr = [],
|
|
4924
|
+
let arr = [],
|
|
4925
|
+
pos32 = pos >> 2;
|
|
5122
4926
|
pos = uint32[pos32];
|
|
5123
4927
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5124
|
-
for (; pos !== endPos;) {
|
|
4928
|
+
for (; pos !== endPos; ) {
|
|
5125
4929
|
arr.push(deserializeArgument(pos));
|
|
5126
4930
|
pos += 16;
|
|
5127
4931
|
}
|
|
@@ -5142,10 +4946,11 @@ function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
|
5142
4946
|
}
|
|
5143
4947
|
|
|
5144
4948
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
5145
|
-
let arr = [],
|
|
4949
|
+
let arr = [],
|
|
4950
|
+
pos32 = pos >> 2;
|
|
5146
4951
|
pos = uint32[pos32];
|
|
5147
4952
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5148
|
-
for (; pos !== endPos;) {
|
|
4953
|
+
for (; pos !== endPos; ) {
|
|
5149
4954
|
arr.push(deserializeOptionAssignmentTargetMaybeDefault(pos));
|
|
5150
4955
|
pos += 16;
|
|
5151
4956
|
}
|
|
@@ -5157,15 +4962,16 @@ function deserializeBoxAssignmentTargetRest(pos) {
|
|
|
5157
4962
|
}
|
|
5158
4963
|
|
|
5159
4964
|
function deserializeOptionBoxAssignmentTargetRest(pos) {
|
|
5160
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
4965
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5161
4966
|
return deserializeBoxAssignmentTargetRest(pos);
|
|
5162
4967
|
}
|
|
5163
4968
|
|
|
5164
4969
|
function deserializeVecAssignmentTargetProperty(pos) {
|
|
5165
|
-
let arr = [],
|
|
4970
|
+
let arr = [],
|
|
4971
|
+
pos32 = pos >> 2;
|
|
5166
4972
|
pos = uint32[pos32];
|
|
5167
4973
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5168
|
-
for (; pos !== endPos;) {
|
|
4974
|
+
for (; pos !== endPos; ) {
|
|
5169
4975
|
arr.push(deserializeAssignmentTargetProperty(pos));
|
|
5170
4976
|
pos += 16;
|
|
5171
4977
|
}
|
|
@@ -5286,10 +5092,11 @@ function deserializeBoxTSImportEqualsDeclaration(pos) {
|
|
|
5286
5092
|
}
|
|
5287
5093
|
|
|
5288
5094
|
function deserializeVecVariableDeclarator(pos) {
|
|
5289
|
-
let arr = [],
|
|
5095
|
+
let arr = [],
|
|
5096
|
+
pos32 = pos >> 2;
|
|
5290
5097
|
pos = uint32[pos32];
|
|
5291
5098
|
let endPos = pos + uint32[pos32 + 2] * 64;
|
|
5292
|
-
for (; pos !== endPos;) {
|
|
5099
|
+
for (; pos !== endPos; ) {
|
|
5293
5100
|
arr.push(deserializeVariableDeclarator(pos));
|
|
5294
5101
|
pos += 64;
|
|
5295
5102
|
}
|
|
@@ -5307,15 +5114,16 @@ function deserializeOptionForStatementInit(pos) {
|
|
|
5307
5114
|
}
|
|
5308
5115
|
|
|
5309
5116
|
function deserializeOptionLabelIdentifier(pos) {
|
|
5310
|
-
if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
|
|
5117
|
+
if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
|
|
5311
5118
|
return deserializeLabelIdentifier(pos);
|
|
5312
5119
|
}
|
|
5313
5120
|
|
|
5314
5121
|
function deserializeVecSwitchCase(pos) {
|
|
5315
|
-
let arr = [],
|
|
5122
|
+
let arr = [],
|
|
5123
|
+
pos32 = pos >> 2;
|
|
5316
5124
|
pos = uint32[pos32];
|
|
5317
5125
|
let endPos = pos + uint32[pos32 + 2] * 48;
|
|
5318
|
-
for (; pos !== endPos;) {
|
|
5126
|
+
for (; pos !== endPos; ) {
|
|
5319
5127
|
arr.push(deserializeSwitchCase(pos));
|
|
5320
5128
|
pos += 48;
|
|
5321
5129
|
}
|
|
@@ -5327,12 +5135,12 @@ function deserializeBoxCatchClause(pos) {
|
|
|
5327
5135
|
}
|
|
5328
5136
|
|
|
5329
5137
|
function deserializeOptionBoxCatchClause(pos) {
|
|
5330
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5138
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5331
5139
|
return deserializeBoxCatchClause(pos);
|
|
5332
5140
|
}
|
|
5333
5141
|
|
|
5334
5142
|
function deserializeOptionBoxBlockStatement(pos) {
|
|
5335
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5143
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5336
5144
|
return deserializeBoxBlockStatement(pos);
|
|
5337
5145
|
}
|
|
5338
5146
|
|
|
@@ -5346,7 +5154,7 @@ function deserializeBoxTSTypeAnnotation(pos) {
|
|
|
5346
5154
|
}
|
|
5347
5155
|
|
|
5348
5156
|
function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
5349
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5157
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5350
5158
|
return deserializeBoxTSTypeAnnotation(pos);
|
|
5351
5159
|
}
|
|
5352
5160
|
|
|
@@ -5367,10 +5175,11 @@ function deserializeBoxAssignmentPattern(pos) {
|
|
|
5367
5175
|
}
|
|
5368
5176
|
|
|
5369
5177
|
function deserializeVecBindingProperty(pos) {
|
|
5370
|
-
let arr = [],
|
|
5178
|
+
let arr = [],
|
|
5179
|
+
pos32 = pos >> 2;
|
|
5371
5180
|
pos = uint32[pos32];
|
|
5372
5181
|
let endPos = pos + uint32[pos32 + 2] * 64;
|
|
5373
|
-
for (; pos !== endPos;) {
|
|
5182
|
+
for (; pos !== endPos; ) {
|
|
5374
5183
|
arr.push(deserializeBindingProperty(pos));
|
|
5375
5184
|
pos += 64;
|
|
5376
5185
|
}
|
|
@@ -5382,7 +5191,7 @@ function deserializeBoxBindingRestElement(pos) {
|
|
|
5382
5191
|
}
|
|
5383
5192
|
|
|
5384
5193
|
function deserializeOptionBoxBindingRestElement(pos) {
|
|
5385
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5194
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5386
5195
|
return deserializeBoxBindingRestElement(pos);
|
|
5387
5196
|
}
|
|
5388
5197
|
|
|
@@ -5392,10 +5201,11 @@ function deserializeOptionBindingPattern(pos) {
|
|
|
5392
5201
|
}
|
|
5393
5202
|
|
|
5394
5203
|
function deserializeVecOptionBindingPattern(pos) {
|
|
5395
|
-
let arr = [],
|
|
5204
|
+
let arr = [],
|
|
5205
|
+
pos32 = pos >> 2;
|
|
5396
5206
|
pos = uint32[pos32];
|
|
5397
5207
|
let endPos = pos + uint32[pos32 + 2] * 32;
|
|
5398
|
-
for (; pos !== endPos;) {
|
|
5208
|
+
for (; pos !== endPos; ) {
|
|
5399
5209
|
arr.push(deserializeOptionBindingPattern(pos));
|
|
5400
5210
|
pos += 32;
|
|
5401
5211
|
}
|
|
@@ -5403,7 +5213,7 @@ function deserializeVecOptionBindingPattern(pos) {
|
|
|
5403
5213
|
}
|
|
5404
5214
|
|
|
5405
5215
|
function deserializeOptionBindingIdentifier(pos) {
|
|
5406
|
-
if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
|
|
5216
|
+
if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
|
|
5407
5217
|
return deserializeBindingIdentifier(pos);
|
|
5408
5218
|
}
|
|
5409
5219
|
|
|
@@ -5412,7 +5222,7 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
|
5412
5222
|
}
|
|
5413
5223
|
|
|
5414
5224
|
function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
|
|
5415
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5225
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5416
5226
|
return deserializeBoxTSTypeParameterDeclaration(pos);
|
|
5417
5227
|
}
|
|
5418
5228
|
|
|
@@ -5421,7 +5231,7 @@ function deserializeBoxTSThisParameter(pos) {
|
|
|
5421
5231
|
}
|
|
5422
5232
|
|
|
5423
5233
|
function deserializeOptionBoxTSThisParameter(pos) {
|
|
5424
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5234
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5425
5235
|
return deserializeBoxTSThisParameter(pos);
|
|
5426
5236
|
}
|
|
5427
5237
|
|
|
@@ -5434,15 +5244,16 @@ function deserializeBoxFunctionBody(pos) {
|
|
|
5434
5244
|
}
|
|
5435
5245
|
|
|
5436
5246
|
function deserializeOptionBoxFunctionBody(pos) {
|
|
5437
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5247
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5438
5248
|
return deserializeBoxFunctionBody(pos);
|
|
5439
5249
|
}
|
|
5440
5250
|
|
|
5441
5251
|
function deserializeVecFormalParameter(pos) {
|
|
5442
|
-
let arr = [],
|
|
5252
|
+
let arr = [],
|
|
5253
|
+
pos32 = pos >> 2;
|
|
5443
5254
|
pos = uint32[pos32];
|
|
5444
5255
|
let endPos = pos + uint32[pos32 + 2] * 72;
|
|
5445
|
-
for (; pos !== endPos;) {
|
|
5256
|
+
for (; pos !== endPos; ) {
|
|
5446
5257
|
arr.push(deserializeFormalParameter(pos));
|
|
5447
5258
|
pos += 72;
|
|
5448
5259
|
}
|
|
@@ -5450,10 +5261,11 @@ function deserializeVecFormalParameter(pos) {
|
|
|
5450
5261
|
}
|
|
5451
5262
|
|
|
5452
5263
|
function deserializeVecDecorator(pos) {
|
|
5453
|
-
let arr = [],
|
|
5264
|
+
let arr = [],
|
|
5265
|
+
pos32 = pos >> 2;
|
|
5454
5266
|
pos = uint32[pos32];
|
|
5455
5267
|
let endPos = pos + uint32[pos32 + 2] * 24;
|
|
5456
|
-
for (; pos !== endPos;) {
|
|
5268
|
+
for (; pos !== endPos; ) {
|
|
5457
5269
|
arr.push(deserializeDecorator(pos));
|
|
5458
5270
|
pos += 24;
|
|
5459
5271
|
}
|
|
@@ -5465,10 +5277,11 @@ function deserializeBoxClassBody(pos) {
|
|
|
5465
5277
|
}
|
|
5466
5278
|
|
|
5467
5279
|
function deserializeVecClassElement(pos) {
|
|
5468
|
-
let arr = [],
|
|
5280
|
+
let arr = [],
|
|
5281
|
+
pos32 = pos >> 2;
|
|
5469
5282
|
pos = uint32[pos32];
|
|
5470
5283
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5471
|
-
for (; pos !== endPos;) {
|
|
5284
|
+
for (; pos !== endPos; ) {
|
|
5472
5285
|
arr.push(deserializeClassElement(pos));
|
|
5473
5286
|
pos += 16;
|
|
5474
5287
|
}
|
|
@@ -5525,10 +5338,11 @@ function deserializeOptionImportPhase(pos) {
|
|
|
5525
5338
|
}
|
|
5526
5339
|
|
|
5527
5340
|
function deserializeVecImportDeclarationSpecifier(pos) {
|
|
5528
|
-
let arr = [],
|
|
5341
|
+
let arr = [],
|
|
5342
|
+
pos32 = pos >> 2;
|
|
5529
5343
|
pos = uint32[pos32];
|
|
5530
5344
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5531
|
-
for (; pos !== endPos;) {
|
|
5345
|
+
for (; pos !== endPos; ) {
|
|
5532
5346
|
arr.push(deserializeImportDeclarationSpecifier(pos));
|
|
5533
5347
|
pos += 16;
|
|
5534
5348
|
}
|
|
@@ -5536,7 +5350,7 @@ function deserializeVecImportDeclarationSpecifier(pos) {
|
|
|
5536
5350
|
}
|
|
5537
5351
|
|
|
5538
5352
|
function deserializeOptionVecImportDeclarationSpecifier(pos) {
|
|
5539
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5353
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5540
5354
|
return deserializeVecImportDeclarationSpecifier(pos);
|
|
5541
5355
|
}
|
|
5542
5356
|
|
|
@@ -5545,7 +5359,7 @@ function deserializeBoxWithClause(pos) {
|
|
|
5545
5359
|
}
|
|
5546
5360
|
|
|
5547
5361
|
function deserializeOptionBoxWithClause(pos) {
|
|
5548
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5362
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5549
5363
|
return deserializeBoxWithClause(pos);
|
|
5550
5364
|
}
|
|
5551
5365
|
|
|
@@ -5562,10 +5376,11 @@ function deserializeBoxImportNamespaceSpecifier(pos) {
|
|
|
5562
5376
|
}
|
|
5563
5377
|
|
|
5564
5378
|
function deserializeVecImportAttribute(pos) {
|
|
5565
|
-
let arr = [],
|
|
5379
|
+
let arr = [],
|
|
5380
|
+
pos32 = pos >> 2;
|
|
5566
5381
|
pos = uint32[pos32];
|
|
5567
5382
|
let endPos = pos + uint32[pos32 + 2] * 112;
|
|
5568
|
-
for (; pos !== endPos;) {
|
|
5383
|
+
for (; pos !== endPos; ) {
|
|
5569
5384
|
arr.push(deserializeImportAttribute(pos));
|
|
5570
5385
|
pos += 112;
|
|
5571
5386
|
}
|
|
@@ -5578,10 +5393,11 @@ function deserializeOptionDeclaration(pos) {
|
|
|
5578
5393
|
}
|
|
5579
5394
|
|
|
5580
5395
|
function deserializeVecExportSpecifier(pos) {
|
|
5581
|
-
let arr = [],
|
|
5396
|
+
let arr = [],
|
|
5397
|
+
pos32 = pos >> 2;
|
|
5582
5398
|
pos = uint32[pos32];
|
|
5583
5399
|
let endPos = pos + uint32[pos32 + 2] * 128;
|
|
5584
|
-
for (; pos !== endPos;) {
|
|
5400
|
+
for (; pos !== endPos; ) {
|
|
5585
5401
|
arr.push(deserializeExportSpecifier(pos));
|
|
5586
5402
|
pos += 128;
|
|
5587
5403
|
}
|
|
@@ -5607,10 +5423,11 @@ function deserializeBoxJSXOpeningElement(pos) {
|
|
|
5607
5423
|
}
|
|
5608
5424
|
|
|
5609
5425
|
function deserializeVecJSXChild(pos) {
|
|
5610
|
-
let arr = [],
|
|
5426
|
+
let arr = [],
|
|
5427
|
+
pos32 = pos >> 2;
|
|
5611
5428
|
pos = uint32[pos32];
|
|
5612
5429
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5613
|
-
for (; pos !== endPos;) {
|
|
5430
|
+
for (; pos !== endPos; ) {
|
|
5614
5431
|
arr.push(deserializeJSXChild(pos));
|
|
5615
5432
|
pos += 16;
|
|
5616
5433
|
}
|
|
@@ -5622,15 +5439,16 @@ function deserializeBoxJSXClosingElement(pos) {
|
|
|
5622
5439
|
}
|
|
5623
5440
|
|
|
5624
5441
|
function deserializeOptionBoxJSXClosingElement(pos) {
|
|
5625
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5442
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5626
5443
|
return deserializeBoxJSXClosingElement(pos);
|
|
5627
5444
|
}
|
|
5628
5445
|
|
|
5629
5446
|
function deserializeVecJSXAttributeItem(pos) {
|
|
5630
|
-
let arr = [],
|
|
5447
|
+
let arr = [],
|
|
5448
|
+
pos32 = pos >> 2;
|
|
5631
5449
|
pos = uint32[pos32];
|
|
5632
5450
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5633
|
-
for (; pos !== endPos;) {
|
|
5451
|
+
for (; pos !== endPos; ) {
|
|
5634
5452
|
arr.push(deserializeJSXAttributeItem(pos));
|
|
5635
5453
|
pos += 16;
|
|
5636
5454
|
}
|
|
@@ -5675,10 +5493,11 @@ function deserializeBoxJSXSpreadChild(pos) {
|
|
|
5675
5493
|
}
|
|
5676
5494
|
|
|
5677
5495
|
function deserializeVecTSEnumMember(pos) {
|
|
5678
|
-
let arr = [],
|
|
5496
|
+
let arr = [],
|
|
5497
|
+
pos32 = pos >> 2;
|
|
5679
5498
|
pos = uint32[pos32];
|
|
5680
5499
|
let endPos = pos + uint32[pos32 + 2] * 40;
|
|
5681
|
-
for (; pos !== endPos;) {
|
|
5500
|
+
for (; pos !== endPos; ) {
|
|
5682
5501
|
arr.push(deserializeTSEnumMember(pos));
|
|
5683
5502
|
pos += 40;
|
|
5684
5503
|
}
|
|
@@ -5834,10 +5653,11 @@ function deserializeBoxJSDocUnknownType(pos) {
|
|
|
5834
5653
|
}
|
|
5835
5654
|
|
|
5836
5655
|
function deserializeVecTSType(pos) {
|
|
5837
|
-
let arr = [],
|
|
5656
|
+
let arr = [],
|
|
5657
|
+
pos32 = pos >> 2;
|
|
5838
5658
|
pos = uint32[pos32];
|
|
5839
5659
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5840
|
-
for (; pos !== endPos;) {
|
|
5660
|
+
for (; pos !== endPos; ) {
|
|
5841
5661
|
arr.push(deserializeTSType(pos));
|
|
5842
5662
|
pos += 16;
|
|
5843
5663
|
}
|
|
@@ -5845,10 +5665,11 @@ function deserializeVecTSType(pos) {
|
|
|
5845
5665
|
}
|
|
5846
5666
|
|
|
5847
5667
|
function deserializeVecTSTupleElement(pos) {
|
|
5848
|
-
let arr = [],
|
|
5668
|
+
let arr = [],
|
|
5669
|
+
pos32 = pos >> 2;
|
|
5849
5670
|
pos = uint32[pos32];
|
|
5850
5671
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5851
|
-
for (; pos !== endPos;) {
|
|
5672
|
+
for (; pos !== endPos; ) {
|
|
5852
5673
|
arr.push(deserializeTSTupleElement(pos));
|
|
5853
5674
|
pos += 16;
|
|
5854
5675
|
}
|
|
@@ -5873,10 +5694,11 @@ function deserializeOptionTSType(pos) {
|
|
|
5873
5694
|
}
|
|
5874
5695
|
|
|
5875
5696
|
function deserializeVecTSTypeParameter(pos) {
|
|
5876
|
-
let arr = [],
|
|
5697
|
+
let arr = [],
|
|
5698
|
+
pos32 = pos >> 2;
|
|
5877
5699
|
pos = uint32[pos32];
|
|
5878
5700
|
let endPos = pos + uint32[pos32 + 2] * 80;
|
|
5879
|
-
for (; pos !== endPos;) {
|
|
5701
|
+
for (; pos !== endPos; ) {
|
|
5880
5702
|
arr.push(deserializeTSTypeParameter(pos));
|
|
5881
5703
|
pos += 80;
|
|
5882
5704
|
}
|
|
@@ -5884,10 +5706,11 @@ function deserializeVecTSTypeParameter(pos) {
|
|
|
5884
5706
|
}
|
|
5885
5707
|
|
|
5886
5708
|
function deserializeVecTSInterfaceHeritage(pos) {
|
|
5887
|
-
let arr = [],
|
|
5709
|
+
let arr = [],
|
|
5710
|
+
pos32 = pos >> 2;
|
|
5888
5711
|
pos = uint32[pos32];
|
|
5889
5712
|
let endPos = pos + uint32[pos32 + 2] * 32;
|
|
5890
|
-
for (; pos !== endPos;) {
|
|
5713
|
+
for (; pos !== endPos; ) {
|
|
5891
5714
|
arr.push(deserializeTSInterfaceHeritage(pos));
|
|
5892
5715
|
pos += 32;
|
|
5893
5716
|
}
|
|
@@ -5899,10 +5722,11 @@ function deserializeBoxTSInterfaceBody(pos) {
|
|
|
5899
5722
|
}
|
|
5900
5723
|
|
|
5901
5724
|
function deserializeVecTSSignature(pos) {
|
|
5902
|
-
let arr = [],
|
|
5725
|
+
let arr = [],
|
|
5726
|
+
pos32 = pos >> 2;
|
|
5903
5727
|
pos = uint32[pos32];
|
|
5904
5728
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
5905
|
-
for (; pos !== endPos;) {
|
|
5729
|
+
for (; pos !== endPos; ) {
|
|
5906
5730
|
arr.push(deserializeTSSignature(pos));
|
|
5907
5731
|
pos += 16;
|
|
5908
5732
|
}
|
|
@@ -5926,10 +5750,11 @@ function deserializeBoxTSMethodSignature(pos) {
|
|
|
5926
5750
|
}
|
|
5927
5751
|
|
|
5928
5752
|
function deserializeVecTSIndexSignatureName(pos) {
|
|
5929
|
-
let arr = [],
|
|
5753
|
+
let arr = [],
|
|
5754
|
+
pos32 = pos >> 2;
|
|
5930
5755
|
pos = uint32[pos32];
|
|
5931
5756
|
let endPos = pos + uint32[pos32 + 2] * 32;
|
|
5932
|
-
for (; pos !== endPos;) {
|
|
5757
|
+
for (; pos !== endPos; ) {
|
|
5933
5758
|
arr.push(deserializeTSIndexSignatureName(pos));
|
|
5934
5759
|
pos += 32;
|
|
5935
5760
|
}
|
|
@@ -5950,7 +5775,7 @@ function deserializeBoxTSTypeParameter(pos) {
|
|
|
5950
5775
|
}
|
|
5951
5776
|
|
|
5952
5777
|
function deserializeOptionBoxObjectExpression(pos) {
|
|
5953
|
-
if (uint32[pos >> 2] === 0 && uint32[pos + 4 >> 2] === 0) return null;
|
|
5778
|
+
if (uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0) return null;
|
|
5954
5779
|
return deserializeBoxObjectExpression(pos);
|
|
5955
5780
|
}
|
|
5956
5781
|
|
|
@@ -5973,15 +5798,16 @@ function deserializeBoxTSExternalModuleReference(pos) {
|
|
|
5973
5798
|
}
|
|
5974
5799
|
|
|
5975
5800
|
function deserializeOptionNameSpan(pos) {
|
|
5976
|
-
if (uint32[pos + 8 >> 2] === 0 && uint32[pos + 12 >> 2] === 0) return null;
|
|
5801
|
+
if (uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0) return null;
|
|
5977
5802
|
return deserializeNameSpan(pos);
|
|
5978
5803
|
}
|
|
5979
5804
|
|
|
5980
5805
|
function deserializeVecError(pos) {
|
|
5981
|
-
let arr = [],
|
|
5806
|
+
let arr = [],
|
|
5807
|
+
pos32 = pos >> 2;
|
|
5982
5808
|
pos = uint32[pos32];
|
|
5983
5809
|
let endPos = pos + uint32[pos32 + 2] * 80;
|
|
5984
|
-
for (; pos !== endPos;) {
|
|
5810
|
+
for (; pos !== endPos; ) {
|
|
5985
5811
|
arr.push(deserializeError(pos));
|
|
5986
5812
|
pos += 80;
|
|
5987
5813
|
}
|
|
@@ -5989,10 +5815,11 @@ function deserializeVecError(pos) {
|
|
|
5989
5815
|
}
|
|
5990
5816
|
|
|
5991
5817
|
function deserializeVecErrorLabel(pos) {
|
|
5992
|
-
let arr = [],
|
|
5818
|
+
let arr = [],
|
|
5819
|
+
pos32 = pos >> 2;
|
|
5993
5820
|
pos = uint32[pos32];
|
|
5994
5821
|
let endPos = pos + uint32[pos32 + 2] * 24;
|
|
5995
|
-
for (; pos !== endPos;) {
|
|
5822
|
+
for (; pos !== endPos; ) {
|
|
5996
5823
|
arr.push(deserializeErrorLabel(pos));
|
|
5997
5824
|
pos += 24;
|
|
5998
5825
|
}
|
|
@@ -6000,10 +5827,11 @@ function deserializeVecErrorLabel(pos) {
|
|
|
6000
5827
|
}
|
|
6001
5828
|
|
|
6002
5829
|
function deserializeVecStaticImport(pos) {
|
|
6003
|
-
let arr = [],
|
|
5830
|
+
let arr = [],
|
|
5831
|
+
pos32 = pos >> 2;
|
|
6004
5832
|
pos = uint32[pos32];
|
|
6005
5833
|
let endPos = pos + uint32[pos32 + 2] * 56;
|
|
6006
|
-
for (; pos !== endPos;) {
|
|
5834
|
+
for (; pos !== endPos; ) {
|
|
6007
5835
|
arr.push(deserializeStaticImport(pos));
|
|
6008
5836
|
pos += 56;
|
|
6009
5837
|
}
|
|
@@ -6011,10 +5839,11 @@ function deserializeVecStaticImport(pos) {
|
|
|
6011
5839
|
}
|
|
6012
5840
|
|
|
6013
5841
|
function deserializeVecStaticExport(pos) {
|
|
6014
|
-
let arr = [],
|
|
5842
|
+
let arr = [],
|
|
5843
|
+
pos32 = pos >> 2;
|
|
6015
5844
|
pos = uint32[pos32];
|
|
6016
5845
|
let endPos = pos + uint32[pos32 + 2] * 32;
|
|
6017
|
-
for (; pos !== endPos;) {
|
|
5846
|
+
for (; pos !== endPos; ) {
|
|
6018
5847
|
arr.push(deserializeStaticExport(pos));
|
|
6019
5848
|
pos += 32;
|
|
6020
5849
|
}
|
|
@@ -6022,10 +5851,11 @@ function deserializeVecStaticExport(pos) {
|
|
|
6022
5851
|
}
|
|
6023
5852
|
|
|
6024
5853
|
function deserializeVecDynamicImport(pos) {
|
|
6025
|
-
let arr = [],
|
|
5854
|
+
let arr = [],
|
|
5855
|
+
pos32 = pos >> 2;
|
|
6026
5856
|
pos = uint32[pos32];
|
|
6027
5857
|
let endPos = pos + uint32[pos32 + 2] * 16;
|
|
6028
|
-
for (; pos !== endPos;) {
|
|
5858
|
+
for (; pos !== endPos; ) {
|
|
6029
5859
|
arr.push(deserializeDynamicImport(pos));
|
|
6030
5860
|
pos += 16;
|
|
6031
5861
|
}
|
|
@@ -6033,10 +5863,11 @@ function deserializeVecDynamicImport(pos) {
|
|
|
6033
5863
|
}
|
|
6034
5864
|
|
|
6035
5865
|
function deserializeVecSpan(pos) {
|
|
6036
|
-
let arr = [],
|
|
5866
|
+
let arr = [],
|
|
5867
|
+
pos32 = pos >> 2;
|
|
6037
5868
|
pos = uint32[pos32];
|
|
6038
5869
|
let endPos = pos + uint32[pos32 + 2] * 8;
|
|
6039
|
-
for (; pos !== endPos;) {
|
|
5870
|
+
for (; pos !== endPos; ) {
|
|
6040
5871
|
arr.push(deserializeSpan(pos));
|
|
6041
5872
|
pos += 8;
|
|
6042
5873
|
}
|
|
@@ -6044,10 +5875,11 @@ function deserializeVecSpan(pos) {
|
|
|
6044
5875
|
}
|
|
6045
5876
|
|
|
6046
5877
|
function deserializeVecImportEntry(pos) {
|
|
6047
|
-
let arr = [],
|
|
5878
|
+
let arr = [],
|
|
5879
|
+
pos32 = pos >> 2;
|
|
6048
5880
|
pos = uint32[pos32];
|
|
6049
5881
|
let endPos = pos + uint32[pos32 + 2] * 96;
|
|
6050
|
-
for (; pos !== endPos;) {
|
|
5882
|
+
for (; pos !== endPos; ) {
|
|
6051
5883
|
arr.push(deserializeImportEntry(pos));
|
|
6052
5884
|
pos += 96;
|
|
6053
5885
|
}
|
|
@@ -6055,10 +5887,11 @@ function deserializeVecImportEntry(pos) {
|
|
|
6055
5887
|
}
|
|
6056
5888
|
|
|
6057
5889
|
function deserializeVecExportEntry(pos) {
|
|
6058
|
-
let arr = [],
|
|
5890
|
+
let arr = [],
|
|
5891
|
+
pos32 = pos >> 2;
|
|
6059
5892
|
pos = uint32[pos32];
|
|
6060
5893
|
let endPos = pos + uint32[pos32 + 2] * 144;
|
|
6061
|
-
for (; pos !== endPos;) {
|
|
5894
|
+
for (; pos !== endPos; ) {
|
|
6062
5895
|
arr.push(deserializeExportEntry(pos));
|
|
6063
5896
|
pos += 144;
|
|
6064
5897
|
}
|