oxc-parser 0.121.0 → 0.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +27 -27
- package/src-js/bindings.js +52 -52
- package/src-js/generated/constants.js +12 -4
- package/src-js/generated/deserialize/js.js +543 -501
- package/src-js/generated/deserialize/js_range.js +549 -515
- package/src-js/generated/deserialize/ts.js +599 -556
- package/src-js/generated/deserialize/ts_range.js +597 -565
- package/src-js/generated/lazy/constructors.js +462 -474
- package/src-js/generated/lazy/walk.js +285 -285
|
@@ -1,31 +1,46 @@
|
|
|
1
1
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
|
|
3
3
|
|
|
4
|
-
let uint8,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
let uint8,
|
|
5
|
+
uint32,
|
|
6
|
+
float64,
|
|
7
|
+
sourceText,
|
|
8
|
+
sourceTextLatin,
|
|
9
|
+
sourceEndPos = 0,
|
|
10
|
+
firstNonAsciiPos = 0;
|
|
11
|
+
|
|
12
|
+
const { fromCharCode } = String,
|
|
13
|
+
{ utf8Slice, latin1Slice } = Buffer.prototype,
|
|
14
|
+
stringDecodeArrays = Array(65).fill(null);
|
|
15
|
+
for (let i = 0; i <= 64; i++) stringDecodeArrays[i] = Array(i).fill(0);
|
|
9
16
|
|
|
10
17
|
export function deserialize(buffer, sourceText, sourceByteLen) {
|
|
11
18
|
sourceEndPos = sourceByteLen;
|
|
12
|
-
|
|
13
|
-
resetBuffer();
|
|
14
|
-
return data;
|
|
19
|
+
return deserializeWith(buffer, sourceText, sourceByteLen, deserializeRawTransferData);
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
function deserializeWith(buffer, sourceTextInput, sourceByteLen,
|
|
22
|
+
function deserializeWith(buffer, sourceTextInput, sourceByteLen, deserialize) {
|
|
18
23
|
uint8 = buffer;
|
|
19
24
|
uint32 = buffer.uint32;
|
|
20
25
|
float64 = buffer.float64;
|
|
21
26
|
sourceText = sourceTextInput;
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
if (sourceText.length === sourceByteLen) {
|
|
28
|
+
firstNonAsciiPos = sourceByteLen;
|
|
29
|
+
sourceTextLatin = sourceText;
|
|
30
|
+
} else {
|
|
31
|
+
let i = 0;
|
|
32
|
+
for (; i < sourceByteLen && uint8[i] < 128; i++);
|
|
33
|
+
firstNonAsciiPos = i;
|
|
34
|
+
sourceTextLatin = latin1Slice.call(uint8, 0, sourceByteLen);
|
|
35
|
+
}
|
|
36
|
+
let data = deserialize(uint32[536870900]);
|
|
37
|
+
resetBuffer();
|
|
38
|
+
return data;
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
export function resetBuffer() {
|
|
27
|
-
// Clear buffer and source text
|
|
28
|
-
uint8 = uint32 = float64 = sourceText = void 0;
|
|
42
|
+
// Clear buffer and source text strings to allow them to be garbage collected
|
|
43
|
+
uint8 = uint32 = float64 = sourceText = sourceTextLatin = void 0;
|
|
29
44
|
}
|
|
30
45
|
|
|
31
46
|
function deserializeProgram(pos) {
|
|
@@ -40,8 +55,8 @@ function deserializeProgram(pos) {
|
|
|
40
55
|
end,
|
|
41
56
|
range: [start, end],
|
|
42
57
|
};
|
|
43
|
-
program.hashbang = deserializeOptionHashbang(pos +
|
|
44
|
-
(program.body = deserializeVecDirective(pos +
|
|
58
|
+
program.hashbang = deserializeOptionHashbang(pos + 56);
|
|
59
|
+
(program.body = deserializeVecDirective(pos + 88)).push(...deserializeVecStatement(pos + 112));
|
|
45
60
|
return program;
|
|
46
61
|
}
|
|
47
62
|
|
|
@@ -142,7 +157,7 @@ function deserializeIdentifierName(pos) {
|
|
|
142
157
|
let start, end;
|
|
143
158
|
return {
|
|
144
159
|
type: "Identifier",
|
|
145
|
-
name: deserializeStr(pos +
|
|
160
|
+
name: deserializeStr(pos + 16),
|
|
146
161
|
start: (start = deserializeU32(pos)),
|
|
147
162
|
end: (end = deserializeU32(pos + 4)),
|
|
148
163
|
range: [start, end],
|
|
@@ -153,7 +168,7 @@ function deserializeIdentifierReference(pos) {
|
|
|
153
168
|
let start, end;
|
|
154
169
|
return {
|
|
155
170
|
type: "Identifier",
|
|
156
|
-
name: deserializeStr(pos +
|
|
171
|
+
name: deserializeStr(pos + 16),
|
|
157
172
|
start: (start = deserializeU32(pos)),
|
|
158
173
|
end: (end = deserializeU32(pos + 4)),
|
|
159
174
|
range: [start, end],
|
|
@@ -164,7 +179,7 @@ function deserializeBindingIdentifier(pos) {
|
|
|
164
179
|
let start, end;
|
|
165
180
|
return {
|
|
166
181
|
type: "Identifier",
|
|
167
|
-
name: deserializeStr(pos +
|
|
182
|
+
name: deserializeStr(pos + 16),
|
|
168
183
|
start: (start = deserializeU32(pos)),
|
|
169
184
|
end: (end = deserializeU32(pos + 4)),
|
|
170
185
|
range: [start, end],
|
|
@@ -175,7 +190,7 @@ function deserializeLabelIdentifier(pos) {
|
|
|
175
190
|
let start, end;
|
|
176
191
|
return {
|
|
177
192
|
type: "Identifier",
|
|
178
|
-
name: deserializeStr(pos +
|
|
193
|
+
name: deserializeStr(pos + 16),
|
|
179
194
|
start: (start = deserializeU32(pos)),
|
|
180
195
|
end: (end = deserializeU32(pos + 4)),
|
|
181
196
|
range: [start, end],
|
|
@@ -202,7 +217,7 @@ function deserializeArrayExpression(pos) {
|
|
|
202
217
|
end: (end = deserializeU32(pos + 4)),
|
|
203
218
|
range: [start, end],
|
|
204
219
|
};
|
|
205
|
-
node.elements = deserializeVecArrayExpressionElement(pos +
|
|
220
|
+
node.elements = deserializeVecArrayExpressionElement(pos + 16);
|
|
206
221
|
return node;
|
|
207
222
|
}
|
|
208
223
|
|
|
@@ -317,7 +332,7 @@ function deserializeObjectExpression(pos) {
|
|
|
317
332
|
end: (end = deserializeU32(pos + 4)),
|
|
318
333
|
range: [start, end],
|
|
319
334
|
};
|
|
320
|
-
node.properties = deserializeVecObjectPropertyKind(pos +
|
|
335
|
+
node.properties = deserializeVecObjectPropertyKind(pos + 16);
|
|
321
336
|
return node;
|
|
322
337
|
}
|
|
323
338
|
|
|
@@ -337,18 +352,18 @@ function deserializeObjectProperty(pos) {
|
|
|
337
352
|
end,
|
|
338
353
|
node = {
|
|
339
354
|
type: "Property",
|
|
340
|
-
kind: deserializePropertyKind(pos +
|
|
355
|
+
kind: deserializePropertyKind(pos + 12),
|
|
341
356
|
key: null,
|
|
342
357
|
value: null,
|
|
343
|
-
method: deserializeBool(pos +
|
|
344
|
-
shorthand: deserializeBool(pos +
|
|
345
|
-
computed: deserializeBool(pos +
|
|
358
|
+
method: deserializeBool(pos + 13),
|
|
359
|
+
shorthand: deserializeBool(pos + 14),
|
|
360
|
+
computed: deserializeBool(pos + 15),
|
|
346
361
|
start: (start = deserializeU32(pos)),
|
|
347
362
|
end: (end = deserializeU32(pos + 4)),
|
|
348
363
|
range: [start, end],
|
|
349
364
|
};
|
|
350
|
-
node.key = deserializePropertyKey(pos +
|
|
351
|
-
node.value = deserializeExpression(pos +
|
|
365
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
366
|
+
node.value = deserializeExpression(pos + 32);
|
|
352
367
|
return node;
|
|
353
368
|
}
|
|
354
369
|
|
|
@@ -473,8 +488,8 @@ function deserializeTemplateLiteral(pos) {
|
|
|
473
488
|
end: (end = deserializeU32(pos + 4)),
|
|
474
489
|
range: [start, end],
|
|
475
490
|
};
|
|
476
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
477
|
-
node.expressions = deserializeVecExpression(pos +
|
|
491
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
492
|
+
node.expressions = deserializeVecExpression(pos + 40);
|
|
478
493
|
return node;
|
|
479
494
|
}
|
|
480
495
|
|
|
@@ -489,18 +504,18 @@ function deserializeTaggedTemplateExpression(pos) {
|
|
|
489
504
|
end: (end = deserializeU32(pos + 4)),
|
|
490
505
|
range: [start, end],
|
|
491
506
|
};
|
|
492
|
-
node.tag = deserializeExpression(pos +
|
|
493
|
-
node.quasi = deserializeTemplateLiteral(pos +
|
|
507
|
+
node.tag = deserializeExpression(pos + 16);
|
|
508
|
+
node.quasi = deserializeTemplateLiteral(pos + 40);
|
|
494
509
|
return node;
|
|
495
510
|
}
|
|
496
511
|
|
|
497
512
|
function deserializeTemplateElement(pos) {
|
|
498
|
-
let tail = deserializeBool(pos +
|
|
513
|
+
let tail = deserializeBool(pos + 12),
|
|
499
514
|
start = deserializeU32(pos),
|
|
500
515
|
end = deserializeU32(pos + 4),
|
|
501
|
-
value = deserializeTemplateElementValue(pos +
|
|
516
|
+
value = deserializeTemplateElementValue(pos + 16);
|
|
502
517
|
value.cooked !== null &&
|
|
503
|
-
deserializeBool(pos +
|
|
518
|
+
deserializeBool(pos + 13) &&
|
|
504
519
|
(value.cooked = value.cooked.replace(/\uFFFD(.{4})/g, (_, hex) =>
|
|
505
520
|
String.fromCodePoint(parseInt(hex, 16)),
|
|
506
521
|
));
|
|
@@ -528,14 +543,14 @@ function deserializeComputedMemberExpression(pos) {
|
|
|
528
543
|
type: "MemberExpression",
|
|
529
544
|
object: null,
|
|
530
545
|
property: null,
|
|
531
|
-
optional: deserializeBool(pos +
|
|
546
|
+
optional: deserializeBool(pos + 12),
|
|
532
547
|
computed: null,
|
|
533
548
|
start: (start = deserializeU32(pos)),
|
|
534
549
|
end: (end = deserializeU32(pos + 4)),
|
|
535
550
|
range: [start, end],
|
|
536
551
|
};
|
|
537
|
-
node.object = deserializeExpression(pos +
|
|
538
|
-
node.property = deserializeExpression(pos +
|
|
552
|
+
node.object = deserializeExpression(pos + 16);
|
|
553
|
+
node.property = deserializeExpression(pos + 32);
|
|
539
554
|
node.computed = true;
|
|
540
555
|
return node;
|
|
541
556
|
}
|
|
@@ -547,14 +562,14 @@ function deserializeStaticMemberExpression(pos) {
|
|
|
547
562
|
type: "MemberExpression",
|
|
548
563
|
object: null,
|
|
549
564
|
property: null,
|
|
550
|
-
optional: deserializeBool(pos +
|
|
565
|
+
optional: deserializeBool(pos + 12),
|
|
551
566
|
computed: null,
|
|
552
567
|
start: (start = deserializeU32(pos)),
|
|
553
568
|
end: (end = deserializeU32(pos + 4)),
|
|
554
569
|
range: [start, end],
|
|
555
570
|
};
|
|
556
|
-
node.object = deserializeExpression(pos +
|
|
557
|
-
node.property = deserializeIdentifierName(pos +
|
|
571
|
+
node.object = deserializeExpression(pos + 16);
|
|
572
|
+
node.property = deserializeIdentifierName(pos + 32);
|
|
558
573
|
node.computed = false;
|
|
559
574
|
return node;
|
|
560
575
|
}
|
|
@@ -566,14 +581,14 @@ function deserializePrivateFieldExpression(pos) {
|
|
|
566
581
|
type: "MemberExpression",
|
|
567
582
|
object: null,
|
|
568
583
|
property: null,
|
|
569
|
-
optional: deserializeBool(pos +
|
|
584
|
+
optional: deserializeBool(pos + 12),
|
|
570
585
|
computed: null,
|
|
571
586
|
start: (start = deserializeU32(pos)),
|
|
572
587
|
end: (end = deserializeU32(pos + 4)),
|
|
573
588
|
range: [start, end],
|
|
574
589
|
};
|
|
575
|
-
node.object = deserializeExpression(pos +
|
|
576
|
-
node.property = deserializePrivateIdentifier(pos +
|
|
590
|
+
node.object = deserializeExpression(pos + 16);
|
|
591
|
+
node.property = deserializePrivateIdentifier(pos + 32);
|
|
577
592
|
node.computed = false;
|
|
578
593
|
return node;
|
|
579
594
|
}
|
|
@@ -585,13 +600,13 @@ function deserializeCallExpression(pos) {
|
|
|
585
600
|
type: "CallExpression",
|
|
586
601
|
callee: null,
|
|
587
602
|
arguments: null,
|
|
588
|
-
optional: deserializeBool(pos +
|
|
603
|
+
optional: deserializeBool(pos + 12),
|
|
589
604
|
start: (start = deserializeU32(pos)),
|
|
590
605
|
end: (end = deserializeU32(pos + 4)),
|
|
591
606
|
range: [start, end],
|
|
592
607
|
};
|
|
593
|
-
node.callee = deserializeExpression(pos +
|
|
594
|
-
node.arguments = deserializeVecArgument(pos +
|
|
608
|
+
node.callee = deserializeExpression(pos + 16);
|
|
609
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
595
610
|
return node;
|
|
596
611
|
}
|
|
597
612
|
|
|
@@ -606,8 +621,8 @@ function deserializeNewExpression(pos) {
|
|
|
606
621
|
end: (end = deserializeU32(pos + 4)),
|
|
607
622
|
range: [start, end],
|
|
608
623
|
};
|
|
609
|
-
node.callee = deserializeExpression(pos +
|
|
610
|
-
node.arguments = deserializeVecArgument(pos +
|
|
624
|
+
node.callee = deserializeExpression(pos + 16);
|
|
625
|
+
node.arguments = deserializeVecArgument(pos + 40);
|
|
611
626
|
return node;
|
|
612
627
|
}
|
|
613
628
|
|
|
@@ -622,8 +637,8 @@ function deserializeMetaProperty(pos) {
|
|
|
622
637
|
end: (end = deserializeU32(pos + 4)),
|
|
623
638
|
range: [start, end],
|
|
624
639
|
};
|
|
625
|
-
node.meta = deserializeIdentifierName(pos +
|
|
626
|
-
node.property = deserializeIdentifierName(pos +
|
|
640
|
+
node.meta = deserializeIdentifierName(pos + 16);
|
|
641
|
+
node.property = deserializeIdentifierName(pos + 48);
|
|
627
642
|
return node;
|
|
628
643
|
}
|
|
629
644
|
|
|
@@ -637,7 +652,7 @@ function deserializeSpreadElement(pos) {
|
|
|
637
652
|
end: (end = deserializeU32(pos + 4)),
|
|
638
653
|
range: [start, end],
|
|
639
654
|
};
|
|
640
|
-
node.argument = deserializeExpression(pos +
|
|
655
|
+
node.argument = deserializeExpression(pos + 16);
|
|
641
656
|
return node;
|
|
642
657
|
}
|
|
643
658
|
|
|
@@ -741,14 +756,14 @@ function deserializeUpdateExpression(pos) {
|
|
|
741
756
|
end,
|
|
742
757
|
node = {
|
|
743
758
|
type: "UpdateExpression",
|
|
744
|
-
operator: deserializeUpdateOperator(pos +
|
|
745
|
-
prefix: deserializeBool(pos +
|
|
759
|
+
operator: deserializeUpdateOperator(pos + 12),
|
|
760
|
+
prefix: deserializeBool(pos + 13),
|
|
746
761
|
argument: null,
|
|
747
762
|
start: (start = deserializeU32(pos)),
|
|
748
763
|
end: (end = deserializeU32(pos + 4)),
|
|
749
764
|
range: [start, end],
|
|
750
765
|
};
|
|
751
|
-
node.argument = deserializeSimpleAssignmentTarget(pos +
|
|
766
|
+
node.argument = deserializeSimpleAssignmentTarget(pos + 16);
|
|
752
767
|
return node;
|
|
753
768
|
}
|
|
754
769
|
|
|
@@ -757,14 +772,14 @@ function deserializeUnaryExpression(pos) {
|
|
|
757
772
|
end,
|
|
758
773
|
node = {
|
|
759
774
|
type: "UnaryExpression",
|
|
760
|
-
operator: deserializeUnaryOperator(pos +
|
|
775
|
+
operator: deserializeUnaryOperator(pos + 12),
|
|
761
776
|
argument: null,
|
|
762
777
|
prefix: null,
|
|
763
778
|
start: (start = deserializeU32(pos)),
|
|
764
779
|
end: (end = deserializeU32(pos + 4)),
|
|
765
780
|
range: [start, end],
|
|
766
781
|
};
|
|
767
|
-
node.argument = deserializeExpression(pos +
|
|
782
|
+
node.argument = deserializeExpression(pos + 16);
|
|
768
783
|
node.prefix = true;
|
|
769
784
|
return node;
|
|
770
785
|
}
|
|
@@ -775,14 +790,14 @@ function deserializeBinaryExpression(pos) {
|
|
|
775
790
|
node = {
|
|
776
791
|
type: "BinaryExpression",
|
|
777
792
|
left: null,
|
|
778
|
-
operator: deserializeBinaryOperator(pos +
|
|
793
|
+
operator: deserializeBinaryOperator(pos + 12),
|
|
779
794
|
right: null,
|
|
780
795
|
start: (start = deserializeU32(pos)),
|
|
781
796
|
end: (end = deserializeU32(pos + 4)),
|
|
782
797
|
range: [start, end],
|
|
783
798
|
};
|
|
784
|
-
node.left = deserializeExpression(pos +
|
|
785
|
-
node.right = deserializeExpression(pos +
|
|
799
|
+
node.left = deserializeExpression(pos + 16);
|
|
800
|
+
node.right = deserializeExpression(pos + 32);
|
|
786
801
|
return node;
|
|
787
802
|
}
|
|
788
803
|
|
|
@@ -798,9 +813,9 @@ function deserializePrivateInExpression(pos) {
|
|
|
798
813
|
end: (end = deserializeU32(pos + 4)),
|
|
799
814
|
range: [start, end],
|
|
800
815
|
};
|
|
801
|
-
node.left = deserializePrivateIdentifier(pos +
|
|
816
|
+
node.left = deserializePrivateIdentifier(pos + 16);
|
|
802
817
|
node.operator = "in";
|
|
803
|
-
node.right = deserializeExpression(pos +
|
|
818
|
+
node.right = deserializeExpression(pos + 48);
|
|
804
819
|
return node;
|
|
805
820
|
}
|
|
806
821
|
|
|
@@ -810,14 +825,14 @@ function deserializeLogicalExpression(pos) {
|
|
|
810
825
|
node = {
|
|
811
826
|
type: "LogicalExpression",
|
|
812
827
|
left: null,
|
|
813
|
-
operator: deserializeLogicalOperator(pos +
|
|
828
|
+
operator: deserializeLogicalOperator(pos + 12),
|
|
814
829
|
right: null,
|
|
815
830
|
start: (start = deserializeU32(pos)),
|
|
816
831
|
end: (end = deserializeU32(pos + 4)),
|
|
817
832
|
range: [start, end],
|
|
818
833
|
};
|
|
819
|
-
node.left = deserializeExpression(pos +
|
|
820
|
-
node.right = deserializeExpression(pos +
|
|
834
|
+
node.left = deserializeExpression(pos + 16);
|
|
835
|
+
node.right = deserializeExpression(pos + 32);
|
|
821
836
|
return node;
|
|
822
837
|
}
|
|
823
838
|
|
|
@@ -833,9 +848,9 @@ function deserializeConditionalExpression(pos) {
|
|
|
833
848
|
end: (end = deserializeU32(pos + 4)),
|
|
834
849
|
range: [start, end],
|
|
835
850
|
};
|
|
836
|
-
node.test = deserializeExpression(pos +
|
|
837
|
-
node.consequent = deserializeExpression(pos +
|
|
838
|
-
node.alternate = deserializeExpression(pos +
|
|
851
|
+
node.test = deserializeExpression(pos + 16);
|
|
852
|
+
node.consequent = deserializeExpression(pos + 32);
|
|
853
|
+
node.alternate = deserializeExpression(pos + 48);
|
|
839
854
|
return node;
|
|
840
855
|
}
|
|
841
856
|
|
|
@@ -844,15 +859,15 @@ function deserializeAssignmentExpression(pos) {
|
|
|
844
859
|
end,
|
|
845
860
|
node = {
|
|
846
861
|
type: "AssignmentExpression",
|
|
847
|
-
operator: deserializeAssignmentOperator(pos +
|
|
862
|
+
operator: deserializeAssignmentOperator(pos + 12),
|
|
848
863
|
left: null,
|
|
849
864
|
right: null,
|
|
850
865
|
start: (start = deserializeU32(pos)),
|
|
851
866
|
end: (end = deserializeU32(pos + 4)),
|
|
852
867
|
range: [start, end],
|
|
853
868
|
};
|
|
854
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
855
|
-
node.right = deserializeExpression(pos +
|
|
869
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
870
|
+
node.right = deserializeExpression(pos + 32);
|
|
856
871
|
return node;
|
|
857
872
|
}
|
|
858
873
|
|
|
@@ -916,8 +931,8 @@ function deserializeArrayAssignmentTarget(pos) {
|
|
|
916
931
|
end: (end = deserializeU32(pos + 4)),
|
|
917
932
|
range: [start, end],
|
|
918
933
|
},
|
|
919
|
-
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos +
|
|
920
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
934
|
+
elements = deserializeVecOptionAssignmentTargetMaybeDefault(pos + 16),
|
|
935
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
921
936
|
rest !== null && elements.push(rest);
|
|
922
937
|
node.elements = elements;
|
|
923
938
|
return node;
|
|
@@ -933,8 +948,8 @@ function deserializeObjectAssignmentTarget(pos) {
|
|
|
933
948
|
end: (end = deserializeU32(pos + 4)),
|
|
934
949
|
range: [start, end],
|
|
935
950
|
},
|
|
936
|
-
properties = deserializeVecAssignmentTargetProperty(pos +
|
|
937
|
-
rest = deserializeOptionBoxAssignmentTargetRest(pos +
|
|
951
|
+
properties = deserializeVecAssignmentTargetProperty(pos + 16),
|
|
952
|
+
rest = deserializeOptionBoxAssignmentTargetRest(pos + 40);
|
|
938
953
|
rest !== null && properties.push(rest);
|
|
939
954
|
node.properties = properties;
|
|
940
955
|
return node;
|
|
@@ -950,7 +965,7 @@ function deserializeAssignmentTargetRest(pos) {
|
|
|
950
965
|
end: (end = deserializeU32(pos + 4)),
|
|
951
966
|
range: [start, end],
|
|
952
967
|
};
|
|
953
|
-
node.argument = deserializeAssignmentTarget(pos +
|
|
968
|
+
node.argument = deserializeAssignmentTarget(pos + 16);
|
|
954
969
|
return node;
|
|
955
970
|
}
|
|
956
971
|
|
|
@@ -994,8 +1009,8 @@ function deserializeAssignmentTargetWithDefault(pos) {
|
|
|
994
1009
|
end: (end = deserializeU32(pos + 4)),
|
|
995
1010
|
range: [start, end],
|
|
996
1011
|
};
|
|
997
|
-
node.left = deserializeAssignmentTarget(pos +
|
|
998
|
-
node.right = deserializeExpression(pos +
|
|
1012
|
+
node.left = deserializeAssignmentTarget(pos + 16);
|
|
1013
|
+
node.right = deserializeExpression(pos + 32);
|
|
999
1014
|
return node;
|
|
1000
1015
|
}
|
|
1001
1016
|
|
|
@@ -1025,7 +1040,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1025
1040
|
end,
|
|
1026
1041
|
range: [start, end],
|
|
1027
1042
|
},
|
|
1028
|
-
key = deserializeIdentifierReference(pos +
|
|
1043
|
+
key = deserializeIdentifierReference(pos + 16),
|
|
1029
1044
|
keyStart,
|
|
1030
1045
|
keyEnd,
|
|
1031
1046
|
value = {
|
|
@@ -1035,7 +1050,7 @@ function deserializeAssignmentTargetPropertyIdentifier(pos) {
|
|
|
1035
1050
|
end: (keyEnd = key.end),
|
|
1036
1051
|
range: [keyStart, keyEnd],
|
|
1037
1052
|
},
|
|
1038
|
-
init = deserializeOptionExpression(pos +
|
|
1053
|
+
init = deserializeOptionExpression(pos + 48);
|
|
1039
1054
|
init !== null &&
|
|
1040
1055
|
(value = {
|
|
1041
1056
|
type: "AssignmentPattern",
|
|
@@ -1064,14 +1079,14 @@ function deserializeAssignmentTargetPropertyProperty(pos) {
|
|
|
1064
1079
|
value: null,
|
|
1065
1080
|
method: null,
|
|
1066
1081
|
shorthand: null,
|
|
1067
|
-
computed: deserializeBool(pos +
|
|
1082
|
+
computed: deserializeBool(pos + 12),
|
|
1068
1083
|
start: (start = deserializeU32(pos)),
|
|
1069
1084
|
end: (end = deserializeU32(pos + 4)),
|
|
1070
1085
|
range: [start, end],
|
|
1071
1086
|
};
|
|
1072
1087
|
node.kind = "init";
|
|
1073
|
-
node.key = deserializePropertyKey(pos +
|
|
1074
|
-
node.value = deserializeAssignmentTargetMaybeDefault(pos +
|
|
1088
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1089
|
+
node.value = deserializeAssignmentTargetMaybeDefault(pos + 32);
|
|
1075
1090
|
node.method = false;
|
|
1076
1091
|
node.shorthand = false;
|
|
1077
1092
|
return node;
|
|
@@ -1087,7 +1102,7 @@ function deserializeSequenceExpression(pos) {
|
|
|
1087
1102
|
end: (end = deserializeU32(pos + 4)),
|
|
1088
1103
|
range: [start, end],
|
|
1089
1104
|
};
|
|
1090
|
-
node.expressions = deserializeVecExpression(pos +
|
|
1105
|
+
node.expressions = deserializeVecExpression(pos + 16);
|
|
1091
1106
|
return node;
|
|
1092
1107
|
}
|
|
1093
1108
|
|
|
@@ -1111,7 +1126,7 @@ function deserializeAwaitExpression(pos) {
|
|
|
1111
1126
|
end: (end = deserializeU32(pos + 4)),
|
|
1112
1127
|
range: [start, end],
|
|
1113
1128
|
};
|
|
1114
|
-
node.argument = deserializeExpression(pos +
|
|
1129
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1115
1130
|
return node;
|
|
1116
1131
|
}
|
|
1117
1132
|
|
|
@@ -1125,7 +1140,7 @@ function deserializeChainExpression(pos) {
|
|
|
1125
1140
|
end: (end = deserializeU32(pos + 4)),
|
|
1126
1141
|
range: [start, end],
|
|
1127
1142
|
};
|
|
1128
|
-
node.expression = deserializeChainElement(pos +
|
|
1143
|
+
node.expression = deserializeChainElement(pos + 16);
|
|
1129
1144
|
return node;
|
|
1130
1145
|
}
|
|
1131
1146
|
|
|
@@ -1157,7 +1172,7 @@ function deserializeParenthesizedExpression(pos) {
|
|
|
1157
1172
|
end: (end = deserializeU32(pos + 4)),
|
|
1158
1173
|
range: [start, end],
|
|
1159
1174
|
};
|
|
1160
|
-
node.expression = deserializeExpression(pos +
|
|
1175
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1161
1176
|
}
|
|
1162
1177
|
return node;
|
|
1163
1178
|
}
|
|
@@ -1241,12 +1256,12 @@ function deserializeDirective(pos) {
|
|
|
1241
1256
|
node = {
|
|
1242
1257
|
type: "ExpressionStatement",
|
|
1243
1258
|
expression: null,
|
|
1244
|
-
directive: deserializeStr(pos +
|
|
1259
|
+
directive: deserializeStr(pos + 64),
|
|
1245
1260
|
start: (start = deserializeU32(pos)),
|
|
1246
1261
|
end: (end = deserializeU32(pos + 4)),
|
|
1247
1262
|
range: [start, end],
|
|
1248
1263
|
};
|
|
1249
|
-
node.expression = deserializeStringLiteral(pos +
|
|
1264
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
1250
1265
|
return node;
|
|
1251
1266
|
}
|
|
1252
1267
|
|
|
@@ -1254,7 +1269,7 @@ function deserializeHashbang(pos) {
|
|
|
1254
1269
|
let start, end;
|
|
1255
1270
|
return {
|
|
1256
1271
|
type: "Hashbang",
|
|
1257
|
-
value: deserializeStr(pos +
|
|
1272
|
+
value: deserializeStr(pos + 16),
|
|
1258
1273
|
start: (start = deserializeU32(pos)),
|
|
1259
1274
|
end: (end = deserializeU32(pos + 4)),
|
|
1260
1275
|
range: [start, end],
|
|
@@ -1271,7 +1286,7 @@ function deserializeBlockStatement(pos) {
|
|
|
1271
1286
|
end: (end = deserializeU32(pos + 4)),
|
|
1272
1287
|
range: [start, end],
|
|
1273
1288
|
};
|
|
1274
|
-
node.body = deserializeVecStatement(pos +
|
|
1289
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
1275
1290
|
return node;
|
|
1276
1291
|
}
|
|
1277
1292
|
|
|
@@ -1305,13 +1320,13 @@ function deserializeVariableDeclaration(pos) {
|
|
|
1305
1320
|
end,
|
|
1306
1321
|
node = {
|
|
1307
1322
|
type: "VariableDeclaration",
|
|
1308
|
-
kind: deserializeVariableDeclarationKind(pos +
|
|
1323
|
+
kind: deserializeVariableDeclarationKind(pos + 12),
|
|
1309
1324
|
declarations: null,
|
|
1310
1325
|
start: (start = deserializeU32(pos)),
|
|
1311
1326
|
end: (end = deserializeU32(pos + 4)),
|
|
1312
1327
|
range: [start, end],
|
|
1313
1328
|
};
|
|
1314
|
-
node.declarations = deserializeVecVariableDeclarator(pos +
|
|
1329
|
+
node.declarations = deserializeVecVariableDeclarator(pos + 16);
|
|
1315
1330
|
return node;
|
|
1316
1331
|
}
|
|
1317
1332
|
|
|
@@ -1333,17 +1348,19 @@ function deserializeVariableDeclarationKind(pos) {
|
|
|
1333
1348
|
}
|
|
1334
1349
|
|
|
1335
1350
|
function deserializeVariableDeclarator(pos) {
|
|
1336
|
-
let
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1351
|
+
let start,
|
|
1352
|
+
end,
|
|
1353
|
+
node = {
|
|
1354
|
+
type: "VariableDeclarator",
|
|
1355
|
+
id: null,
|
|
1356
|
+
init: null,
|
|
1357
|
+
start: (start = deserializeU32(pos)),
|
|
1358
|
+
end: (end = deserializeU32(pos + 4)),
|
|
1359
|
+
range: [start, end],
|
|
1360
|
+
};
|
|
1361
|
+
node.id = deserializeBindingPattern(pos + 16);
|
|
1362
|
+
node.init = deserializeOptionExpression(pos + 40);
|
|
1363
|
+
return node;
|
|
1347
1364
|
}
|
|
1348
1365
|
|
|
1349
1366
|
function deserializeEmptyStatement(pos) {
|
|
@@ -1366,7 +1383,7 @@ function deserializeExpressionStatement(pos) {
|
|
|
1366
1383
|
end: (end = deserializeU32(pos + 4)),
|
|
1367
1384
|
range: [start, end],
|
|
1368
1385
|
};
|
|
1369
|
-
node.expression = deserializeExpression(pos +
|
|
1386
|
+
node.expression = deserializeExpression(pos + 16);
|
|
1370
1387
|
return node;
|
|
1371
1388
|
}
|
|
1372
1389
|
|
|
@@ -1382,9 +1399,9 @@ function deserializeIfStatement(pos) {
|
|
|
1382
1399
|
end: (end = deserializeU32(pos + 4)),
|
|
1383
1400
|
range: [start, end],
|
|
1384
1401
|
};
|
|
1385
|
-
node.test = deserializeExpression(pos +
|
|
1386
|
-
node.consequent = deserializeStatement(pos +
|
|
1387
|
-
node.alternate = deserializeOptionStatement(pos +
|
|
1402
|
+
node.test = deserializeExpression(pos + 16);
|
|
1403
|
+
node.consequent = deserializeStatement(pos + 32);
|
|
1404
|
+
node.alternate = deserializeOptionStatement(pos + 48);
|
|
1388
1405
|
return node;
|
|
1389
1406
|
}
|
|
1390
1407
|
|
|
@@ -1399,8 +1416,8 @@ function deserializeDoWhileStatement(pos) {
|
|
|
1399
1416
|
end: (end = deserializeU32(pos + 4)),
|
|
1400
1417
|
range: [start, end],
|
|
1401
1418
|
};
|
|
1402
|
-
node.body = deserializeStatement(pos +
|
|
1403
|
-
node.test = deserializeExpression(pos +
|
|
1419
|
+
node.body = deserializeStatement(pos + 16);
|
|
1420
|
+
node.test = deserializeExpression(pos + 32);
|
|
1404
1421
|
return node;
|
|
1405
1422
|
}
|
|
1406
1423
|
|
|
@@ -1415,8 +1432,8 @@ function deserializeWhileStatement(pos) {
|
|
|
1415
1432
|
end: (end = deserializeU32(pos + 4)),
|
|
1416
1433
|
range: [start, end],
|
|
1417
1434
|
};
|
|
1418
|
-
node.test = deserializeExpression(pos +
|
|
1419
|
-
node.body = deserializeStatement(pos +
|
|
1435
|
+
node.test = deserializeExpression(pos + 16);
|
|
1436
|
+
node.body = deserializeStatement(pos + 32);
|
|
1420
1437
|
return node;
|
|
1421
1438
|
}
|
|
1422
1439
|
|
|
@@ -1433,10 +1450,10 @@ function deserializeForStatement(pos) {
|
|
|
1433
1450
|
end: (end = deserializeU32(pos + 4)),
|
|
1434
1451
|
range: [start, end],
|
|
1435
1452
|
};
|
|
1436
|
-
node.init = deserializeOptionForStatementInit(pos +
|
|
1437
|
-
node.test = deserializeOptionExpression(pos +
|
|
1438
|
-
node.update = deserializeOptionExpression(pos +
|
|
1439
|
-
node.body = deserializeStatement(pos +
|
|
1453
|
+
node.init = deserializeOptionForStatementInit(pos + 16);
|
|
1454
|
+
node.test = deserializeOptionExpression(pos + 32);
|
|
1455
|
+
node.update = deserializeOptionExpression(pos + 48);
|
|
1456
|
+
node.body = deserializeStatement(pos + 64);
|
|
1440
1457
|
return node;
|
|
1441
1458
|
}
|
|
1442
1459
|
|
|
@@ -1547,9 +1564,9 @@ function deserializeForInStatement(pos) {
|
|
|
1547
1564
|
end: (end = deserializeU32(pos + 4)),
|
|
1548
1565
|
range: [start, end],
|
|
1549
1566
|
};
|
|
1550
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1551
|
-
node.right = deserializeExpression(pos +
|
|
1552
|
-
node.body = deserializeStatement(pos +
|
|
1567
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1568
|
+
node.right = deserializeExpression(pos + 32);
|
|
1569
|
+
node.body = deserializeStatement(pos + 48);
|
|
1553
1570
|
return node;
|
|
1554
1571
|
}
|
|
1555
1572
|
|
|
@@ -1595,9 +1612,9 @@ function deserializeForOfStatement(pos) {
|
|
|
1595
1612
|
end: (end = deserializeU32(pos + 4)),
|
|
1596
1613
|
range: [start, end],
|
|
1597
1614
|
};
|
|
1598
|
-
node.left = deserializeForStatementLeft(pos +
|
|
1599
|
-
node.right = deserializeExpression(pos +
|
|
1600
|
-
node.body = deserializeStatement(pos +
|
|
1615
|
+
node.left = deserializeForStatementLeft(pos + 16);
|
|
1616
|
+
node.right = deserializeExpression(pos + 32);
|
|
1617
|
+
node.body = deserializeStatement(pos + 48);
|
|
1601
1618
|
return node;
|
|
1602
1619
|
}
|
|
1603
1620
|
|
|
@@ -1611,7 +1628,7 @@ function deserializeContinueStatement(pos) {
|
|
|
1611
1628
|
end: (end = deserializeU32(pos + 4)),
|
|
1612
1629
|
range: [start, end],
|
|
1613
1630
|
};
|
|
1614
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1631
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1615
1632
|
return node;
|
|
1616
1633
|
}
|
|
1617
1634
|
|
|
@@ -1625,7 +1642,7 @@ function deserializeBreakStatement(pos) {
|
|
|
1625
1642
|
end: (end = deserializeU32(pos + 4)),
|
|
1626
1643
|
range: [start, end],
|
|
1627
1644
|
};
|
|
1628
|
-
node.label = deserializeOptionLabelIdentifier(pos +
|
|
1645
|
+
node.label = deserializeOptionLabelIdentifier(pos + 16);
|
|
1629
1646
|
return node;
|
|
1630
1647
|
}
|
|
1631
1648
|
|
|
@@ -1639,7 +1656,7 @@ function deserializeReturnStatement(pos) {
|
|
|
1639
1656
|
end: (end = deserializeU32(pos + 4)),
|
|
1640
1657
|
range: [start, end],
|
|
1641
1658
|
};
|
|
1642
|
-
node.argument = deserializeOptionExpression(pos +
|
|
1659
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
1643
1660
|
return node;
|
|
1644
1661
|
}
|
|
1645
1662
|
|
|
@@ -1654,8 +1671,8 @@ function deserializeWithStatement(pos) {
|
|
|
1654
1671
|
end: (end = deserializeU32(pos + 4)),
|
|
1655
1672
|
range: [start, end],
|
|
1656
1673
|
};
|
|
1657
|
-
node.object = deserializeExpression(pos +
|
|
1658
|
-
node.body = deserializeStatement(pos +
|
|
1674
|
+
node.object = deserializeExpression(pos + 16);
|
|
1675
|
+
node.body = deserializeStatement(pos + 32);
|
|
1659
1676
|
return node;
|
|
1660
1677
|
}
|
|
1661
1678
|
|
|
@@ -1670,8 +1687,8 @@ function deserializeSwitchStatement(pos) {
|
|
|
1670
1687
|
end: (end = deserializeU32(pos + 4)),
|
|
1671
1688
|
range: [start, end],
|
|
1672
1689
|
};
|
|
1673
|
-
node.discriminant = deserializeExpression(pos +
|
|
1674
|
-
node.cases = deserializeVecSwitchCase(pos +
|
|
1690
|
+
node.discriminant = deserializeExpression(pos + 16);
|
|
1691
|
+
node.cases = deserializeVecSwitchCase(pos + 32);
|
|
1675
1692
|
return node;
|
|
1676
1693
|
}
|
|
1677
1694
|
|
|
@@ -1686,8 +1703,8 @@ function deserializeSwitchCase(pos) {
|
|
|
1686
1703
|
end: (end = deserializeU32(pos + 4)),
|
|
1687
1704
|
range: [start, end],
|
|
1688
1705
|
};
|
|
1689
|
-
node.test = deserializeOptionExpression(pos +
|
|
1690
|
-
node.consequent = deserializeVecStatement(pos +
|
|
1706
|
+
node.test = deserializeOptionExpression(pos + 16);
|
|
1707
|
+
node.consequent = deserializeVecStatement(pos + 32);
|
|
1691
1708
|
return node;
|
|
1692
1709
|
}
|
|
1693
1710
|
|
|
@@ -1702,8 +1719,8 @@ function deserializeLabeledStatement(pos) {
|
|
|
1702
1719
|
end: (end = deserializeU32(pos + 4)),
|
|
1703
1720
|
range: [start, end],
|
|
1704
1721
|
};
|
|
1705
|
-
node.label = deserializeLabelIdentifier(pos +
|
|
1706
|
-
node.body = deserializeStatement(pos +
|
|
1722
|
+
node.label = deserializeLabelIdentifier(pos + 16);
|
|
1723
|
+
node.body = deserializeStatement(pos + 48);
|
|
1707
1724
|
return node;
|
|
1708
1725
|
}
|
|
1709
1726
|
|
|
@@ -1717,7 +1734,7 @@ function deserializeThrowStatement(pos) {
|
|
|
1717
1734
|
end: (end = deserializeU32(pos + 4)),
|
|
1718
1735
|
range: [start, end],
|
|
1719
1736
|
};
|
|
1720
|
-
node.argument = deserializeExpression(pos +
|
|
1737
|
+
node.argument = deserializeExpression(pos + 16);
|
|
1721
1738
|
return node;
|
|
1722
1739
|
}
|
|
1723
1740
|
|
|
@@ -1733,9 +1750,9 @@ function deserializeTryStatement(pos) {
|
|
|
1733
1750
|
end: (end = deserializeU32(pos + 4)),
|
|
1734
1751
|
range: [start, end],
|
|
1735
1752
|
};
|
|
1736
|
-
node.block = deserializeBoxBlockStatement(pos +
|
|
1737
|
-
node.handler = deserializeOptionBoxCatchClause(pos +
|
|
1738
|
-
node.finalizer = deserializeOptionBoxBlockStatement(pos +
|
|
1753
|
+
node.block = deserializeBoxBlockStatement(pos + 16);
|
|
1754
|
+
node.handler = deserializeOptionBoxCatchClause(pos + 24);
|
|
1755
|
+
node.finalizer = deserializeOptionBoxBlockStatement(pos + 32);
|
|
1739
1756
|
return node;
|
|
1740
1757
|
}
|
|
1741
1758
|
|
|
@@ -1750,13 +1767,13 @@ function deserializeCatchClause(pos) {
|
|
|
1750
1767
|
end: (end = deserializeU32(pos + 4)),
|
|
1751
1768
|
range: [start, end],
|
|
1752
1769
|
};
|
|
1753
|
-
node.param = deserializeOptionCatchParameter(pos +
|
|
1754
|
-
node.body = deserializeBoxBlockStatement(pos +
|
|
1770
|
+
node.param = deserializeOptionCatchParameter(pos + 16);
|
|
1771
|
+
node.body = deserializeBoxBlockStatement(pos + 56);
|
|
1755
1772
|
return node;
|
|
1756
1773
|
}
|
|
1757
1774
|
|
|
1758
1775
|
function deserializeCatchParameter(pos) {
|
|
1759
|
-
return deserializeBindingPattern(pos +
|
|
1776
|
+
return deserializeBindingPattern(pos + 16);
|
|
1760
1777
|
}
|
|
1761
1778
|
|
|
1762
1779
|
function deserializeDebuggerStatement(pos) {
|
|
@@ -1795,8 +1812,8 @@ function deserializeAssignmentPattern(pos) {
|
|
|
1795
1812
|
end: (end = deserializeU32(pos + 4)),
|
|
1796
1813
|
range: [start, end],
|
|
1797
1814
|
};
|
|
1798
|
-
node.left = deserializeBindingPattern(pos +
|
|
1799
|
-
node.right = deserializeExpression(pos +
|
|
1815
|
+
node.left = deserializeBindingPattern(pos + 16);
|
|
1816
|
+
node.right = deserializeExpression(pos + 32);
|
|
1800
1817
|
return node;
|
|
1801
1818
|
}
|
|
1802
1819
|
|
|
@@ -1810,8 +1827,8 @@ function deserializeObjectPattern(pos) {
|
|
|
1810
1827
|
end: (end = deserializeU32(pos + 4)),
|
|
1811
1828
|
range: [start, end],
|
|
1812
1829
|
},
|
|
1813
|
-
properties = deserializeVecBindingProperty(pos +
|
|
1814
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1830
|
+
properties = deserializeVecBindingProperty(pos + 16),
|
|
1831
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1815
1832
|
rest !== null && properties.push(rest);
|
|
1816
1833
|
node.properties = properties;
|
|
1817
1834
|
return node;
|
|
@@ -1826,15 +1843,15 @@ function deserializeBindingProperty(pos) {
|
|
|
1826
1843
|
key: null,
|
|
1827
1844
|
value: null,
|
|
1828
1845
|
method: null,
|
|
1829
|
-
shorthand: deserializeBool(pos +
|
|
1830
|
-
computed: deserializeBool(pos +
|
|
1846
|
+
shorthand: deserializeBool(pos + 12),
|
|
1847
|
+
computed: deserializeBool(pos + 13),
|
|
1831
1848
|
start: (start = deserializeU32(pos)),
|
|
1832
1849
|
end: (end = deserializeU32(pos + 4)),
|
|
1833
1850
|
range: [start, end],
|
|
1834
1851
|
};
|
|
1835
1852
|
node.kind = "init";
|
|
1836
|
-
node.key = deserializePropertyKey(pos +
|
|
1837
|
-
node.value = deserializeBindingPattern(pos +
|
|
1853
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
1854
|
+
node.value = deserializeBindingPattern(pos + 32);
|
|
1838
1855
|
node.method = false;
|
|
1839
1856
|
return node;
|
|
1840
1857
|
}
|
|
@@ -1849,8 +1866,8 @@ function deserializeArrayPattern(pos) {
|
|
|
1849
1866
|
end: (end = deserializeU32(pos + 4)),
|
|
1850
1867
|
range: [start, end],
|
|
1851
1868
|
},
|
|
1852
|
-
elements = deserializeVecOptionBindingPattern(pos +
|
|
1853
|
-
rest = deserializeOptionBoxBindingRestElement(pos +
|
|
1869
|
+
elements = deserializeVecOptionBindingPattern(pos + 16),
|
|
1870
|
+
rest = deserializeOptionBoxBindingRestElement(pos + 40);
|
|
1854
1871
|
rest !== null && elements.push(rest);
|
|
1855
1872
|
node.elements = elements;
|
|
1856
1873
|
return node;
|
|
@@ -1866,7 +1883,7 @@ function deserializeBindingRestElement(pos) {
|
|
|
1866
1883
|
end: (end = deserializeU32(pos + 4)),
|
|
1867
1884
|
range: [start, end],
|
|
1868
1885
|
};
|
|
1869
|
-
node.argument = deserializeBindingPattern(pos +
|
|
1886
|
+
node.argument = deserializeBindingPattern(pos + 16);
|
|
1870
1887
|
return node;
|
|
1871
1888
|
}
|
|
1872
1889
|
|
|
@@ -1885,10 +1902,10 @@ function deserializeFunction(pos) {
|
|
|
1885
1902
|
end: (end = deserializeU32(pos + 4)),
|
|
1886
1903
|
range: [start, end],
|
|
1887
1904
|
},
|
|
1888
|
-
params = deserializeBoxFormalParameters(pos +
|
|
1889
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
1905
|
+
params = deserializeBoxFormalParameters(pos + 64);
|
|
1906
|
+
node.id = deserializeOptionBindingIdentifier(pos + 16);
|
|
1890
1907
|
node.params = params;
|
|
1891
|
-
node.body = deserializeOptionBoxFunctionBody(pos +
|
|
1908
|
+
node.body = deserializeOptionBoxFunctionBody(pos + 80);
|
|
1892
1909
|
node.expression = false;
|
|
1893
1910
|
return node;
|
|
1894
1911
|
}
|
|
@@ -1909,19 +1926,19 @@ function deserializeFunctionType(pos) {
|
|
|
1909
1926
|
}
|
|
1910
1927
|
|
|
1911
1928
|
function deserializeFormalParameters(pos) {
|
|
1912
|
-
let params = deserializeVecFormalParameter(pos +
|
|
1913
|
-
if (uint32[(pos +
|
|
1914
|
-
pos = uint32[(pos +
|
|
1929
|
+
let params = deserializeVecFormalParameter(pos + 16);
|
|
1930
|
+
if (uint32[(pos + 40) >> 2] !== 0 && uint32[(pos + 44) >> 2] !== 0) {
|
|
1931
|
+
pos = uint32[(pos + 40) >> 2];
|
|
1915
1932
|
let start,
|
|
1916
1933
|
end,
|
|
1917
1934
|
rest = {
|
|
1918
1935
|
type: "RestElement",
|
|
1919
1936
|
argument: null,
|
|
1920
|
-
start: (start = deserializeU32(pos +
|
|
1921
|
-
end: (end = deserializeU32(pos +
|
|
1937
|
+
start: (start = deserializeU32(pos + 40)),
|
|
1938
|
+
end: (end = deserializeU32(pos + 44)),
|
|
1922
1939
|
range: [start, end],
|
|
1923
1940
|
};
|
|
1924
|
-
rest.argument = deserializeBindingPattern(pos +
|
|
1941
|
+
rest.argument = deserializeBindingPattern(pos + 56);
|
|
1925
1942
|
params.push(rest);
|
|
1926
1943
|
}
|
|
1927
1944
|
return params;
|
|
@@ -1929,7 +1946,7 @@ function deserializeFormalParameters(pos) {
|
|
|
1929
1946
|
|
|
1930
1947
|
function deserializeFormalParameter(pos) {
|
|
1931
1948
|
let param;
|
|
1932
|
-
if (uint32[(pos +
|
|
1949
|
+
if (uint32[(pos + 64) >> 2] !== 0 && uint32[(pos + 68) >> 2] !== 0) {
|
|
1933
1950
|
let start, end;
|
|
1934
1951
|
param = {
|
|
1935
1952
|
type: "AssignmentPattern",
|
|
@@ -1939,9 +1956,9 @@ function deserializeFormalParameter(pos) {
|
|
|
1939
1956
|
end: (end = deserializeU32(pos + 4)),
|
|
1940
1957
|
range: [start, end],
|
|
1941
1958
|
};
|
|
1942
|
-
param.left = deserializeBindingPattern(pos +
|
|
1943
|
-
param.right = deserializeOptionBoxExpression(pos +
|
|
1944
|
-
} else param = deserializeBindingPattern(pos +
|
|
1959
|
+
param.left = deserializeBindingPattern(pos + 40);
|
|
1960
|
+
param.right = deserializeOptionBoxExpression(pos + 64);
|
|
1961
|
+
} else param = deserializeBindingPattern(pos + 40);
|
|
1945
1962
|
return param;
|
|
1946
1963
|
}
|
|
1947
1964
|
|
|
@@ -1955,8 +1972,8 @@ function deserializeFunctionBody(pos) {
|
|
|
1955
1972
|
end: (end = deserializeU32(pos + 4)),
|
|
1956
1973
|
range: [start, end],
|
|
1957
1974
|
},
|
|
1958
|
-
body = deserializeVecDirective(pos +
|
|
1959
|
-
body.push(...deserializeVecStatement(pos +
|
|
1975
|
+
body = deserializeVecDirective(pos + 16);
|
|
1976
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
1960
1977
|
node.body = body;
|
|
1961
1978
|
return node;
|
|
1962
1979
|
}
|
|
@@ -1977,9 +1994,9 @@ function deserializeArrowFunctionExpression(pos) {
|
|
|
1977
1994
|
end: (end = deserializeU32(pos + 4)),
|
|
1978
1995
|
range: [start, end],
|
|
1979
1996
|
},
|
|
1980
|
-
body = deserializeBoxFunctionBody(pos +
|
|
1997
|
+
body = deserializeBoxFunctionBody(pos + 40);
|
|
1981
1998
|
expression === true && (body = body.body[0].expression);
|
|
1982
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
1999
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
1983
2000
|
node.body = body;
|
|
1984
2001
|
node.generator = false;
|
|
1985
2002
|
return node;
|
|
@@ -1990,13 +2007,13 @@ function deserializeYieldExpression(pos) {
|
|
|
1990
2007
|
end,
|
|
1991
2008
|
node = {
|
|
1992
2009
|
type: "YieldExpression",
|
|
1993
|
-
delegate: deserializeBool(pos +
|
|
2010
|
+
delegate: deserializeBool(pos + 12),
|
|
1994
2011
|
argument: null,
|
|
1995
2012
|
start: (start = deserializeU32(pos)),
|
|
1996
2013
|
end: (end = deserializeU32(pos + 4)),
|
|
1997
2014
|
range: [start, end],
|
|
1998
2015
|
};
|
|
1999
|
-
node.argument = deserializeOptionExpression(pos +
|
|
2016
|
+
node.argument = deserializeOptionExpression(pos + 16);
|
|
2000
2017
|
return node;
|
|
2001
2018
|
}
|
|
2002
2019
|
|
|
@@ -2013,10 +2030,10 @@ function deserializeClass(pos) {
|
|
|
2013
2030
|
end: (end = deserializeU32(pos + 4)),
|
|
2014
2031
|
range: [start, end],
|
|
2015
2032
|
};
|
|
2016
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2017
|
-
node.id = deserializeOptionBindingIdentifier(pos +
|
|
2018
|
-
node.superClass = deserializeOptionExpression(pos +
|
|
2019
|
-
node.body = deserializeBoxClassBody(pos +
|
|
2033
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2034
|
+
node.id = deserializeOptionBindingIdentifier(pos + 40);
|
|
2035
|
+
node.superClass = deserializeOptionExpression(pos + 80);
|
|
2036
|
+
node.body = deserializeBoxClassBody(pos + 128);
|
|
2020
2037
|
return node;
|
|
2021
2038
|
}
|
|
2022
2039
|
|
|
@@ -2041,7 +2058,7 @@ function deserializeClassBody(pos) {
|
|
|
2041
2058
|
end: (end = deserializeU32(pos + 4)),
|
|
2042
2059
|
range: [start, end],
|
|
2043
2060
|
};
|
|
2044
|
-
node.body = deserializeVecClassElement(pos +
|
|
2061
|
+
node.body = deserializeVecClassElement(pos + 16);
|
|
2045
2062
|
return node;
|
|
2046
2063
|
}
|
|
2047
2064
|
|
|
@@ -2066,20 +2083,20 @@ function deserializeMethodDefinition(pos) {
|
|
|
2066
2083
|
let start,
|
|
2067
2084
|
end,
|
|
2068
2085
|
node = {
|
|
2069
|
-
type: deserializeMethodDefinitionType(pos +
|
|
2086
|
+
type: deserializeMethodDefinitionType(pos + 12),
|
|
2070
2087
|
decorators: null,
|
|
2071
2088
|
key: null,
|
|
2072
2089
|
value: null,
|
|
2073
|
-
kind: deserializeMethodDefinitionKind(pos +
|
|
2074
|
-
computed: deserializeBool(pos +
|
|
2075
|
-
static: deserializeBool(pos +
|
|
2090
|
+
kind: deserializeMethodDefinitionKind(pos + 13),
|
|
2091
|
+
computed: deserializeBool(pos + 14),
|
|
2092
|
+
static: deserializeBool(pos + 15),
|
|
2076
2093
|
start: (start = deserializeU32(pos)),
|
|
2077
2094
|
end: (end = deserializeU32(pos + 4)),
|
|
2078
2095
|
range: [start, end],
|
|
2079
2096
|
};
|
|
2080
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2081
|
-
node.key = deserializePropertyKey(pos +
|
|
2082
|
-
node.value = deserializeBoxFunction(pos +
|
|
2097
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2098
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2099
|
+
node.value = deserializeBoxFunction(pos + 56);
|
|
2083
2100
|
return node;
|
|
2084
2101
|
}
|
|
2085
2102
|
|
|
@@ -2098,19 +2115,19 @@ function deserializePropertyDefinition(pos) {
|
|
|
2098
2115
|
let start,
|
|
2099
2116
|
end,
|
|
2100
2117
|
node = {
|
|
2101
|
-
type: deserializePropertyDefinitionType(pos +
|
|
2118
|
+
type: deserializePropertyDefinitionType(pos + 12),
|
|
2102
2119
|
decorators: null,
|
|
2103
2120
|
key: null,
|
|
2104
2121
|
value: null,
|
|
2105
|
-
computed: deserializeBool(pos +
|
|
2106
|
-
static: deserializeBool(pos +
|
|
2122
|
+
computed: deserializeBool(pos + 13),
|
|
2123
|
+
static: deserializeBool(pos + 14),
|
|
2107
2124
|
start: (start = deserializeU32(pos)),
|
|
2108
2125
|
end: (end = deserializeU32(pos + 4)),
|
|
2109
2126
|
range: [start, end],
|
|
2110
2127
|
};
|
|
2111
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2112
|
-
node.key = deserializePropertyKey(pos +
|
|
2113
|
-
node.value = deserializeOptionExpression(pos +
|
|
2128
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2129
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2130
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2114
2131
|
return node;
|
|
2115
2132
|
}
|
|
2116
2133
|
|
|
@@ -2144,7 +2161,7 @@ function deserializePrivateIdentifier(pos) {
|
|
|
2144
2161
|
let start, end;
|
|
2145
2162
|
return {
|
|
2146
2163
|
type: "PrivateIdentifier",
|
|
2147
|
-
name: deserializeStr(pos +
|
|
2164
|
+
name: deserializeStr(pos + 16),
|
|
2148
2165
|
start: (start = deserializeU32(pos)),
|
|
2149
2166
|
end: (end = deserializeU32(pos + 4)),
|
|
2150
2167
|
range: [start, end],
|
|
@@ -2161,7 +2178,7 @@ function deserializeStaticBlock(pos) {
|
|
|
2161
2178
|
end: (end = deserializeU32(pos + 4)),
|
|
2162
2179
|
range: [start, end],
|
|
2163
2180
|
};
|
|
2164
|
-
node.body = deserializeVecStatement(pos +
|
|
2181
|
+
node.body = deserializeVecStatement(pos + 16);
|
|
2165
2182
|
return node;
|
|
2166
2183
|
}
|
|
2167
2184
|
|
|
@@ -2180,19 +2197,19 @@ function deserializeAccessorProperty(pos) {
|
|
|
2180
2197
|
let start,
|
|
2181
2198
|
end,
|
|
2182
2199
|
node = {
|
|
2183
|
-
type: deserializeAccessorPropertyType(pos +
|
|
2200
|
+
type: deserializeAccessorPropertyType(pos + 12),
|
|
2184
2201
|
decorators: null,
|
|
2185
2202
|
key: null,
|
|
2186
2203
|
value: null,
|
|
2187
|
-
computed: deserializeBool(pos +
|
|
2188
|
-
static: deserializeBool(pos +
|
|
2204
|
+
computed: deserializeBool(pos + 13),
|
|
2205
|
+
static: deserializeBool(pos + 14),
|
|
2189
2206
|
start: (start = deserializeU32(pos)),
|
|
2190
2207
|
end: (end = deserializeU32(pos + 4)),
|
|
2191
2208
|
range: [start, end],
|
|
2192
2209
|
};
|
|
2193
|
-
node.decorators = deserializeVecDecorator(pos +
|
|
2194
|
-
node.key = deserializePropertyKey(pos +
|
|
2195
|
-
node.value = deserializeOptionExpression(pos +
|
|
2210
|
+
node.decorators = deserializeVecDecorator(pos + 16);
|
|
2211
|
+
node.key = deserializePropertyKey(pos + 40);
|
|
2212
|
+
node.value = deserializeOptionExpression(pos + 64);
|
|
2196
2213
|
return node;
|
|
2197
2214
|
}
|
|
2198
2215
|
|
|
@@ -2203,13 +2220,13 @@ function deserializeImportExpression(pos) {
|
|
|
2203
2220
|
type: "ImportExpression",
|
|
2204
2221
|
source: null,
|
|
2205
2222
|
options: null,
|
|
2206
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2223
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2207
2224
|
start: (start = deserializeU32(pos)),
|
|
2208
2225
|
end: (end = deserializeU32(pos + 4)),
|
|
2209
2226
|
range: [start, end],
|
|
2210
2227
|
};
|
|
2211
|
-
node.source = deserializeExpression(pos +
|
|
2212
|
-
node.options = deserializeOptionExpression(pos +
|
|
2228
|
+
node.source = deserializeExpression(pos + 16);
|
|
2229
|
+
node.options = deserializeOptionExpression(pos + 32);
|
|
2213
2230
|
return node;
|
|
2214
2231
|
}
|
|
2215
2232
|
|
|
@@ -2220,17 +2237,17 @@ function deserializeImportDeclaration(pos) {
|
|
|
2220
2237
|
type: "ImportDeclaration",
|
|
2221
2238
|
specifiers: null,
|
|
2222
2239
|
source: null,
|
|
2223
|
-
phase: deserializeOptionImportPhase(pos +
|
|
2240
|
+
phase: deserializeOptionImportPhase(pos + 12),
|
|
2224
2241
|
attributes: null,
|
|
2225
2242
|
start: (start = deserializeU32(pos)),
|
|
2226
2243
|
end: (end = deserializeU32(pos + 4)),
|
|
2227
2244
|
range: [start, end],
|
|
2228
2245
|
},
|
|
2229
|
-
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos +
|
|
2246
|
+
specifiers = deserializeOptionVecImportDeclarationSpecifier(pos + 16);
|
|
2230
2247
|
specifiers === null && (specifiers = []);
|
|
2231
|
-
let withClause = deserializeOptionBoxWithClause(pos +
|
|
2248
|
+
let withClause = deserializeOptionBoxWithClause(pos + 88);
|
|
2232
2249
|
node.specifiers = specifiers;
|
|
2233
|
-
node.source = deserializeStringLiteral(pos +
|
|
2250
|
+
node.source = deserializeStringLiteral(pos + 40);
|
|
2234
2251
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2235
2252
|
return node;
|
|
2236
2253
|
}
|
|
@@ -2270,8 +2287,8 @@ function deserializeImportSpecifier(pos) {
|
|
|
2270
2287
|
end: (end = deserializeU32(pos + 4)),
|
|
2271
2288
|
range: [start, end],
|
|
2272
2289
|
};
|
|
2273
|
-
node.imported = deserializeModuleExportName(pos +
|
|
2274
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2290
|
+
node.imported = deserializeModuleExportName(pos + 16);
|
|
2291
|
+
node.local = deserializeBindingIdentifier(pos + 72);
|
|
2275
2292
|
return node;
|
|
2276
2293
|
}
|
|
2277
2294
|
|
|
@@ -2285,7 +2302,7 @@ function deserializeImportDefaultSpecifier(pos) {
|
|
|
2285
2302
|
end: (end = deserializeU32(pos + 4)),
|
|
2286
2303
|
range: [start, end],
|
|
2287
2304
|
};
|
|
2288
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2305
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2289
2306
|
return node;
|
|
2290
2307
|
}
|
|
2291
2308
|
|
|
@@ -2299,18 +2316,12 @@ function deserializeImportNamespaceSpecifier(pos) {
|
|
|
2299
2316
|
end: (end = deserializeU32(pos + 4)),
|
|
2300
2317
|
range: [start, end],
|
|
2301
2318
|
};
|
|
2302
|
-
node.local = deserializeBindingIdentifier(pos +
|
|
2319
|
+
node.local = deserializeBindingIdentifier(pos + 16);
|
|
2303
2320
|
return node;
|
|
2304
2321
|
}
|
|
2305
2322
|
|
|
2306
2323
|
function deserializeWithClause(pos) {
|
|
2307
|
-
|
|
2308
|
-
return {
|
|
2309
|
-
attributes: deserializeVecImportAttribute(pos + 8),
|
|
2310
|
-
start: (start = deserializeU32(pos)),
|
|
2311
|
-
end: (end = deserializeU32(pos + 4)),
|
|
2312
|
-
range: [start, end],
|
|
2313
|
-
};
|
|
2324
|
+
return { attributes: deserializeVecImportAttribute(pos + 16) };
|
|
2314
2325
|
}
|
|
2315
2326
|
|
|
2316
2327
|
function deserializeImportAttribute(pos) {
|
|
@@ -2324,8 +2335,8 @@ function deserializeImportAttribute(pos) {
|
|
|
2324
2335
|
end: (end = deserializeU32(pos + 4)),
|
|
2325
2336
|
range: [start, end],
|
|
2326
2337
|
};
|
|
2327
|
-
node.key = deserializeImportAttributeKey(pos +
|
|
2328
|
-
node.value = deserializeStringLiteral(pos +
|
|
2338
|
+
node.key = deserializeImportAttributeKey(pos + 16);
|
|
2339
|
+
node.value = deserializeStringLiteral(pos + 72);
|
|
2329
2340
|
return node;
|
|
2330
2341
|
}
|
|
2331
2342
|
|
|
@@ -2353,10 +2364,10 @@ function deserializeExportNamedDeclaration(pos) {
|
|
|
2353
2364
|
end: (end = deserializeU32(pos + 4)),
|
|
2354
2365
|
range: [start, end],
|
|
2355
2366
|
},
|
|
2356
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2357
|
-
node.declaration = deserializeOptionDeclaration(pos +
|
|
2358
|
-
node.specifiers = deserializeVecExportSpecifier(pos +
|
|
2359
|
-
node.source = deserializeOptionStringLiteral(pos +
|
|
2367
|
+
withClause = deserializeOptionBoxWithClause(pos + 104);
|
|
2368
|
+
node.declaration = deserializeOptionDeclaration(pos + 16);
|
|
2369
|
+
node.specifiers = deserializeVecExportSpecifier(pos + 32);
|
|
2370
|
+
node.source = deserializeOptionStringLiteral(pos + 56);
|
|
2360
2371
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2361
2372
|
return node;
|
|
2362
2373
|
}
|
|
@@ -2371,7 +2382,7 @@ function deserializeExportDefaultDeclaration(pos) {
|
|
|
2371
2382
|
end: (end = deserializeU32(pos + 4)),
|
|
2372
2383
|
range: [start, end],
|
|
2373
2384
|
};
|
|
2374
|
-
node.declaration = deserializeExportDefaultDeclarationKind(pos +
|
|
2385
|
+
node.declaration = deserializeExportDefaultDeclarationKind(pos + 16);
|
|
2375
2386
|
return node;
|
|
2376
2387
|
}
|
|
2377
2388
|
|
|
@@ -2387,9 +2398,9 @@ function deserializeExportAllDeclaration(pos) {
|
|
|
2387
2398
|
end: (end = deserializeU32(pos + 4)),
|
|
2388
2399
|
range: [start, end],
|
|
2389
2400
|
},
|
|
2390
|
-
withClause = deserializeOptionBoxWithClause(pos +
|
|
2391
|
-
node.exported = deserializeOptionModuleExportName(pos +
|
|
2392
|
-
node.source = deserializeStringLiteral(pos +
|
|
2401
|
+
withClause = deserializeOptionBoxWithClause(pos + 120);
|
|
2402
|
+
node.exported = deserializeOptionModuleExportName(pos + 16);
|
|
2403
|
+
node.source = deserializeStringLiteral(pos + 72);
|
|
2393
2404
|
node.attributes = withClause === null ? [] : withClause.attributes;
|
|
2394
2405
|
return node;
|
|
2395
2406
|
}
|
|
@@ -2405,8 +2416,8 @@ function deserializeExportSpecifier(pos) {
|
|
|
2405
2416
|
end: (end = deserializeU32(pos + 4)),
|
|
2406
2417
|
range: [start, end],
|
|
2407
2418
|
};
|
|
2408
|
-
node.local = deserializeModuleExportName(pos +
|
|
2409
|
-
node.exported = deserializeModuleExportName(pos +
|
|
2419
|
+
node.local = deserializeModuleExportName(pos + 16);
|
|
2420
|
+
node.exported = deserializeModuleExportName(pos + 72);
|
|
2410
2421
|
return node;
|
|
2411
2422
|
}
|
|
2412
2423
|
|
|
@@ -2533,8 +2544,8 @@ function deserializeV8IntrinsicExpression(pos) {
|
|
|
2533
2544
|
end: (end = deserializeU32(pos + 4)),
|
|
2534
2545
|
range: [start, end],
|
|
2535
2546
|
};
|
|
2536
|
-
node.name = deserializeIdentifierName(pos +
|
|
2537
|
-
node.arguments = deserializeVecArgument(pos +
|
|
2547
|
+
node.name = deserializeIdentifierName(pos + 16);
|
|
2548
|
+
node.arguments = deserializeVecArgument(pos + 48);
|
|
2538
2549
|
return node;
|
|
2539
2550
|
}
|
|
2540
2551
|
|
|
@@ -2570,66 +2581,79 @@ function deserializeNullLiteral(pos) {
|
|
|
2570
2581
|
}
|
|
2571
2582
|
|
|
2572
2583
|
function deserializeNumericLiteral(pos) {
|
|
2573
|
-
let start,
|
|
2584
|
+
let start = deserializeU32(pos),
|
|
2585
|
+
end = deserializeU32(pos + 4);
|
|
2574
2586
|
return {
|
|
2575
2587
|
type: "Literal",
|
|
2576
|
-
value: deserializeF64(pos +
|
|
2577
|
-
raw:
|
|
2578
|
-
|
|
2579
|
-
|
|
2588
|
+
value: deserializeF64(pos + 32),
|
|
2589
|
+
raw:
|
|
2590
|
+
uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
2591
|
+
? null
|
|
2592
|
+
: sourceText.slice(start, end),
|
|
2593
|
+
start,
|
|
2594
|
+
end,
|
|
2580
2595
|
range: [start, end],
|
|
2581
2596
|
};
|
|
2582
2597
|
}
|
|
2583
2598
|
|
|
2584
2599
|
function deserializeStringLiteral(pos) {
|
|
2585
|
-
let start,
|
|
2586
|
-
end,
|
|
2600
|
+
let start = deserializeU32(pos),
|
|
2601
|
+
end = deserializeU32(pos + 4),
|
|
2587
2602
|
node = {
|
|
2588
2603
|
type: "Literal",
|
|
2589
2604
|
value: null,
|
|
2590
|
-
raw:
|
|
2591
|
-
|
|
2592
|
-
|
|
2605
|
+
raw:
|
|
2606
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2607
|
+
? null
|
|
2608
|
+
: sourceText.slice(start, end),
|
|
2609
|
+
start,
|
|
2610
|
+
end,
|
|
2593
2611
|
range: [start, end],
|
|
2594
2612
|
},
|
|
2595
|
-
value = deserializeStr(pos +
|
|
2596
|
-
deserializeBool(pos +
|
|
2613
|
+
value = deserializeStr(pos + 16);
|
|
2614
|
+
deserializeBool(pos + 12) &&
|
|
2597
2615
|
(value = value.replace(/\uFFFD(.{4})/g, (_, hex) => String.fromCodePoint(parseInt(hex, 16))));
|
|
2598
2616
|
node.value = value;
|
|
2599
2617
|
return node;
|
|
2600
2618
|
}
|
|
2601
2619
|
|
|
2602
2620
|
function deserializeBigIntLiteral(pos) {
|
|
2603
|
-
let start,
|
|
2604
|
-
end,
|
|
2621
|
+
let start = deserializeU32(pos),
|
|
2622
|
+
end = deserializeU32(pos + 4),
|
|
2605
2623
|
node = {
|
|
2606
2624
|
type: "Literal",
|
|
2607
2625
|
value: null,
|
|
2608
|
-
raw:
|
|
2626
|
+
raw:
|
|
2627
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
2628
|
+
? null
|
|
2629
|
+
: sourceText.slice(start, end),
|
|
2609
2630
|
bigint: null,
|
|
2610
|
-
start
|
|
2611
|
-
end
|
|
2631
|
+
start,
|
|
2632
|
+
end,
|
|
2612
2633
|
range: [start, end],
|
|
2613
2634
|
},
|
|
2614
|
-
bigint = deserializeStr(pos +
|
|
2635
|
+
bigint = deserializeStr(pos + 16);
|
|
2615
2636
|
node.value = BigInt(bigint);
|
|
2616
2637
|
node.bigint = bigint;
|
|
2617
2638
|
return node;
|
|
2618
2639
|
}
|
|
2619
2640
|
|
|
2620
2641
|
function deserializeRegExpLiteral(pos) {
|
|
2621
|
-
let start,
|
|
2622
|
-
end,
|
|
2642
|
+
let start = deserializeU32(pos),
|
|
2643
|
+
end = deserializeU32(pos + 4),
|
|
2623
2644
|
node = {
|
|
2624
2645
|
type: "Literal",
|
|
2625
2646
|
value: null,
|
|
2626
|
-
raw:
|
|
2647
|
+
raw:
|
|
2648
|
+
uint32[(pos + 48) >> 2] === 0 && uint32[(pos + 52) >> 2] === 0
|
|
2649
|
+
? null
|
|
2650
|
+
: sourceText.slice(start, end),
|
|
2627
2651
|
regex: null,
|
|
2628
|
-
start
|
|
2629
|
-
end
|
|
2652
|
+
start,
|
|
2653
|
+
end,
|
|
2630
2654
|
range: [start, end],
|
|
2631
2655
|
},
|
|
2632
|
-
regex = deserializeRegExp(pos +
|
|
2656
|
+
regex = deserializeRegExp(pos + 16),
|
|
2633
2657
|
value = null;
|
|
2634
2658
|
try {
|
|
2635
2659
|
value = new RegExp(regex.pattern, regex.flags);
|
|
@@ -2673,11 +2697,11 @@ function deserializeJSXElement(pos) {
|
|
|
2673
2697
|
end: (end = deserializeU32(pos + 4)),
|
|
2674
2698
|
range: [start, end],
|
|
2675
2699
|
},
|
|
2676
|
-
closingElement = deserializeOptionBoxJSXClosingElement(pos +
|
|
2677
|
-
openingElement = deserializeBoxJSXOpeningElement(pos +
|
|
2700
|
+
closingElement = deserializeOptionBoxJSXClosingElement(pos + 48),
|
|
2701
|
+
openingElement = deserializeBoxJSXOpeningElement(pos + 16);
|
|
2678
2702
|
closingElement === null && (openingElement.selfClosing = true);
|
|
2679
2703
|
node.openingElement = openingElement;
|
|
2680
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2704
|
+
node.children = deserializeVecJSXChild(pos + 24);
|
|
2681
2705
|
node.closingElement = closingElement;
|
|
2682
2706
|
return node;
|
|
2683
2707
|
}
|
|
@@ -2694,8 +2718,8 @@ function deserializeJSXOpeningElement(pos) {
|
|
|
2694
2718
|
end: (end = deserializeU32(pos + 4)),
|
|
2695
2719
|
range: [start, end],
|
|
2696
2720
|
};
|
|
2697
|
-
node.name = deserializeJSXElementName(pos +
|
|
2698
|
-
node.attributes = deserializeVecJSXAttributeItem(pos +
|
|
2721
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2722
|
+
node.attributes = deserializeVecJSXAttributeItem(pos + 40);
|
|
2699
2723
|
node.selfClosing = false;
|
|
2700
2724
|
return node;
|
|
2701
2725
|
}
|
|
@@ -2710,7 +2734,7 @@ function deserializeJSXClosingElement(pos) {
|
|
|
2710
2734
|
end: (end = deserializeU32(pos + 4)),
|
|
2711
2735
|
range: [start, end],
|
|
2712
2736
|
};
|
|
2713
|
-
node.name = deserializeJSXElementName(pos +
|
|
2737
|
+
node.name = deserializeJSXElementName(pos + 16);
|
|
2714
2738
|
return node;
|
|
2715
2739
|
}
|
|
2716
2740
|
|
|
@@ -2726,9 +2750,9 @@ function deserializeJSXFragment(pos) {
|
|
|
2726
2750
|
end: (end = deserializeU32(pos + 4)),
|
|
2727
2751
|
range: [start, end],
|
|
2728
2752
|
};
|
|
2729
|
-
node.openingFragment = deserializeJSXOpeningFragment(pos +
|
|
2730
|
-
node.children = deserializeVecJSXChild(pos +
|
|
2731
|
-
node.closingFragment = deserializeJSXClosingFragment(pos +
|
|
2753
|
+
node.openingFragment = deserializeJSXOpeningFragment(pos + 16);
|
|
2754
|
+
node.children = deserializeVecJSXChild(pos + 32);
|
|
2755
|
+
node.closingFragment = deserializeJSXClosingFragment(pos + 56);
|
|
2732
2756
|
return node;
|
|
2733
2757
|
}
|
|
2734
2758
|
|
|
@@ -2800,8 +2824,8 @@ function deserializeJSXNamespacedName(pos) {
|
|
|
2800
2824
|
end: (end = deserializeU32(pos + 4)),
|
|
2801
2825
|
range: [start, end],
|
|
2802
2826
|
};
|
|
2803
|
-
node.namespace = deserializeJSXIdentifier(pos +
|
|
2804
|
-
node.name = deserializeJSXIdentifier(pos +
|
|
2827
|
+
node.namespace = deserializeJSXIdentifier(pos + 16);
|
|
2828
|
+
node.name = deserializeJSXIdentifier(pos + 48);
|
|
2805
2829
|
return node;
|
|
2806
2830
|
}
|
|
2807
2831
|
|
|
@@ -2816,8 +2840,8 @@ function deserializeJSXMemberExpression(pos) {
|
|
|
2816
2840
|
end: (end = deserializeU32(pos + 4)),
|
|
2817
2841
|
range: [start, end],
|
|
2818
2842
|
};
|
|
2819
|
-
node.object = deserializeJSXMemberExpressionObject(pos +
|
|
2820
|
-
node.property = deserializeJSXIdentifier(pos +
|
|
2843
|
+
node.object = deserializeJSXMemberExpressionObject(pos + 16);
|
|
2844
|
+
node.property = deserializeJSXIdentifier(pos + 32);
|
|
2821
2845
|
return node;
|
|
2822
2846
|
}
|
|
2823
2847
|
|
|
@@ -2858,7 +2882,7 @@ function deserializeJSXExpressionContainer(pos) {
|
|
|
2858
2882
|
end: (end = deserializeU32(pos + 4)),
|
|
2859
2883
|
range: [start, end],
|
|
2860
2884
|
};
|
|
2861
|
-
node.expression = deserializeJSXExpression(pos +
|
|
2885
|
+
node.expression = deserializeJSXExpression(pos + 16);
|
|
2862
2886
|
return node;
|
|
2863
2887
|
}
|
|
2864
2888
|
|
|
@@ -2989,8 +3013,8 @@ function deserializeJSXAttribute(pos) {
|
|
|
2989
3013
|
end: (end = deserializeU32(pos + 4)),
|
|
2990
3014
|
range: [start, end],
|
|
2991
3015
|
};
|
|
2992
|
-
node.name = deserializeJSXAttributeName(pos +
|
|
2993
|
-
node.value = deserializeOptionJSXAttributeValue(pos +
|
|
3016
|
+
node.name = deserializeJSXAttributeName(pos + 16);
|
|
3017
|
+
node.value = deserializeOptionJSXAttributeValue(pos + 32);
|
|
2994
3018
|
return node;
|
|
2995
3019
|
}
|
|
2996
3020
|
|
|
@@ -3004,7 +3028,7 @@ function deserializeJSXSpreadAttribute(pos) {
|
|
|
3004
3028
|
end: (end = deserializeU32(pos + 4)),
|
|
3005
3029
|
range: [start, end],
|
|
3006
3030
|
};
|
|
3007
|
-
node.argument = deserializeExpression(pos +
|
|
3031
|
+
node.argument = deserializeExpression(pos + 16);
|
|
3008
3032
|
return node;
|
|
3009
3033
|
}
|
|
3010
3034
|
|
|
@@ -3038,7 +3062,7 @@ function deserializeJSXIdentifier(pos) {
|
|
|
3038
3062
|
let start, end;
|
|
3039
3063
|
return {
|
|
3040
3064
|
type: "JSXIdentifier",
|
|
3041
|
-
name: deserializeStr(pos +
|
|
3065
|
+
name: deserializeStr(pos + 16),
|
|
3042
3066
|
start: (start = deserializeU32(pos)),
|
|
3043
3067
|
end: (end = deserializeU32(pos + 4)),
|
|
3044
3068
|
range: [start, end],
|
|
@@ -3072,18 +3096,22 @@ function deserializeJSXSpreadChild(pos) {
|
|
|
3072
3096
|
end: (end = deserializeU32(pos + 4)),
|
|
3073
3097
|
range: [start, end],
|
|
3074
3098
|
};
|
|
3075
|
-
node.expression = deserializeExpression(pos +
|
|
3099
|
+
node.expression = deserializeExpression(pos + 16);
|
|
3076
3100
|
return node;
|
|
3077
3101
|
}
|
|
3078
3102
|
|
|
3079
3103
|
function deserializeJSXText(pos) {
|
|
3080
|
-
let start,
|
|
3104
|
+
let start = deserializeU32(pos),
|
|
3105
|
+
end = deserializeU32(pos + 4);
|
|
3081
3106
|
return {
|
|
3082
3107
|
type: "JSXText",
|
|
3083
|
-
value: deserializeStr(pos +
|
|
3084
|
-
raw:
|
|
3085
|
-
|
|
3086
|
-
|
|
3108
|
+
value: deserializeStr(pos + 16),
|
|
3109
|
+
raw:
|
|
3110
|
+
uint32[(pos + 32) >> 2] === 0 && uint32[(pos + 36) >> 2] === 0
|
|
3111
|
+
? null
|
|
3112
|
+
: sourceText.slice(start, end),
|
|
3113
|
+
start,
|
|
3114
|
+
end,
|
|
3087
3115
|
range: [start, end],
|
|
3088
3116
|
};
|
|
3089
3117
|
}
|
|
@@ -3104,7 +3132,7 @@ function deserializeTSThisParameter(pos) {
|
|
|
3104
3132
|
node.decorators = [];
|
|
3105
3133
|
node.name = "this";
|
|
3106
3134
|
node.optional = false;
|
|
3107
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3135
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 24);
|
|
3108
3136
|
return node;
|
|
3109
3137
|
}
|
|
3110
3138
|
|
|
@@ -3115,14 +3143,14 @@ function deserializeTSEnumDeclaration(pos) {
|
|
|
3115
3143
|
type: "TSEnumDeclaration",
|
|
3116
3144
|
id: null,
|
|
3117
3145
|
body: null,
|
|
3118
|
-
const: deserializeBool(pos +
|
|
3119
|
-
declare: deserializeBool(pos +
|
|
3146
|
+
const: deserializeBool(pos + 12),
|
|
3147
|
+
declare: deserializeBool(pos + 13),
|
|
3120
3148
|
start: (start = deserializeU32(pos)),
|
|
3121
3149
|
end: (end = deserializeU32(pos + 4)),
|
|
3122
3150
|
range: [start, end],
|
|
3123
3151
|
};
|
|
3124
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3125
|
-
node.body = deserializeTSEnumBody(pos +
|
|
3152
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3153
|
+
node.body = deserializeTSEnumBody(pos + 48);
|
|
3126
3154
|
return node;
|
|
3127
3155
|
}
|
|
3128
3156
|
|
|
@@ -3136,7 +3164,7 @@ function deserializeTSEnumBody(pos) {
|
|
|
3136
3164
|
end: (end = deserializeU32(pos + 4)),
|
|
3137
3165
|
range: [start, end],
|
|
3138
3166
|
};
|
|
3139
|
-
node.members = deserializeVecTSEnumMember(pos +
|
|
3167
|
+
node.members = deserializeVecTSEnumMember(pos + 16);
|
|
3140
3168
|
return node;
|
|
3141
3169
|
}
|
|
3142
3170
|
|
|
@@ -3152,9 +3180,9 @@ function deserializeTSEnumMember(pos) {
|
|
|
3152
3180
|
end: (end = deserializeU32(pos + 4)),
|
|
3153
3181
|
range: [start, end],
|
|
3154
3182
|
};
|
|
3155
|
-
node.id = deserializeTSEnumMemberName(pos +
|
|
3156
|
-
node.initializer = deserializeOptionExpression(pos +
|
|
3157
|
-
node.computed = deserializeU8(pos +
|
|
3183
|
+
node.id = deserializeTSEnumMemberName(pos + 16);
|
|
3184
|
+
node.initializer = deserializeOptionExpression(pos + 32);
|
|
3185
|
+
node.computed = deserializeU8(pos + 16) > 1;
|
|
3158
3186
|
return node;
|
|
3159
3187
|
}
|
|
3160
3188
|
|
|
@@ -3183,7 +3211,7 @@ function deserializeTSTypeAnnotation(pos) {
|
|
|
3183
3211
|
end: (end = deserializeU32(pos + 4)),
|
|
3184
3212
|
range: [start, end],
|
|
3185
3213
|
};
|
|
3186
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3214
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3187
3215
|
return node;
|
|
3188
3216
|
}
|
|
3189
3217
|
|
|
@@ -3197,7 +3225,7 @@ function deserializeTSLiteralType(pos) {
|
|
|
3197
3225
|
end: (end = deserializeU32(pos + 4)),
|
|
3198
3226
|
range: [start, end],
|
|
3199
3227
|
};
|
|
3200
|
-
node.literal = deserializeTSLiteral(pos +
|
|
3228
|
+
node.literal = deserializeTSLiteral(pos + 16);
|
|
3201
3229
|
return node;
|
|
3202
3230
|
}
|
|
3203
3231
|
|
|
@@ -3314,10 +3342,10 @@ function deserializeTSConditionalType(pos) {
|
|
|
3314
3342
|
end: (end = deserializeU32(pos + 4)),
|
|
3315
3343
|
range: [start, end],
|
|
3316
3344
|
};
|
|
3317
|
-
node.checkType = deserializeTSType(pos +
|
|
3318
|
-
node.extendsType = deserializeTSType(pos +
|
|
3319
|
-
node.trueType = deserializeTSType(pos +
|
|
3320
|
-
node.falseType = deserializeTSType(pos +
|
|
3345
|
+
node.checkType = deserializeTSType(pos + 16);
|
|
3346
|
+
node.extendsType = deserializeTSType(pos + 32);
|
|
3347
|
+
node.trueType = deserializeTSType(pos + 48);
|
|
3348
|
+
node.falseType = deserializeTSType(pos + 64);
|
|
3321
3349
|
return node;
|
|
3322
3350
|
}
|
|
3323
3351
|
|
|
@@ -3331,7 +3359,7 @@ function deserializeTSUnionType(pos) {
|
|
|
3331
3359
|
end: (end = deserializeU32(pos + 4)),
|
|
3332
3360
|
range: [start, end],
|
|
3333
3361
|
};
|
|
3334
|
-
node.types = deserializeVecTSType(pos +
|
|
3362
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3335
3363
|
return node;
|
|
3336
3364
|
}
|
|
3337
3365
|
|
|
@@ -3345,7 +3373,7 @@ function deserializeTSIntersectionType(pos) {
|
|
|
3345
3373
|
end: (end = deserializeU32(pos + 4)),
|
|
3346
3374
|
range: [start, end],
|
|
3347
3375
|
};
|
|
3348
|
-
node.types = deserializeVecTSType(pos +
|
|
3376
|
+
node.types = deserializeVecTSType(pos + 16);
|
|
3349
3377
|
return node;
|
|
3350
3378
|
}
|
|
3351
3379
|
|
|
@@ -3360,7 +3388,7 @@ function deserializeTSParenthesizedType(pos) {
|
|
|
3360
3388
|
end: (end = deserializeU32(pos + 4)),
|
|
3361
3389
|
range: [start, end],
|
|
3362
3390
|
};
|
|
3363
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3391
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3364
3392
|
}
|
|
3365
3393
|
return node;
|
|
3366
3394
|
}
|
|
@@ -3370,13 +3398,13 @@ function deserializeTSTypeOperator(pos) {
|
|
|
3370
3398
|
end,
|
|
3371
3399
|
node = {
|
|
3372
3400
|
type: "TSTypeOperator",
|
|
3373
|
-
operator: deserializeTSTypeOperatorOperator(pos +
|
|
3401
|
+
operator: deserializeTSTypeOperatorOperator(pos + 12),
|
|
3374
3402
|
typeAnnotation: null,
|
|
3375
3403
|
start: (start = deserializeU32(pos)),
|
|
3376
3404
|
end: (end = deserializeU32(pos + 4)),
|
|
3377
3405
|
range: [start, end],
|
|
3378
3406
|
};
|
|
3379
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3407
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3380
3408
|
return node;
|
|
3381
3409
|
}
|
|
3382
3410
|
|
|
@@ -3403,7 +3431,7 @@ function deserializeTSArrayType(pos) {
|
|
|
3403
3431
|
end: (end = deserializeU32(pos + 4)),
|
|
3404
3432
|
range: [start, end],
|
|
3405
3433
|
};
|
|
3406
|
-
node.elementType = deserializeTSType(pos +
|
|
3434
|
+
node.elementType = deserializeTSType(pos + 16);
|
|
3407
3435
|
return node;
|
|
3408
3436
|
}
|
|
3409
3437
|
|
|
@@ -3418,8 +3446,8 @@ function deserializeTSIndexedAccessType(pos) {
|
|
|
3418
3446
|
end: (end = deserializeU32(pos + 4)),
|
|
3419
3447
|
range: [start, end],
|
|
3420
3448
|
};
|
|
3421
|
-
node.objectType = deserializeTSType(pos +
|
|
3422
|
-
node.indexType = deserializeTSType(pos +
|
|
3449
|
+
node.objectType = deserializeTSType(pos + 16);
|
|
3450
|
+
node.indexType = deserializeTSType(pos + 32);
|
|
3423
3451
|
return node;
|
|
3424
3452
|
}
|
|
3425
3453
|
|
|
@@ -3433,7 +3461,7 @@ function deserializeTSTupleType(pos) {
|
|
|
3433
3461
|
end: (end = deserializeU32(pos + 4)),
|
|
3434
3462
|
range: [start, end],
|
|
3435
3463
|
};
|
|
3436
|
-
node.elementTypes = deserializeVecTSTupleElement(pos +
|
|
3464
|
+
node.elementTypes = deserializeVecTSTupleElement(pos + 16);
|
|
3437
3465
|
return node;
|
|
3438
3466
|
}
|
|
3439
3467
|
|
|
@@ -3444,13 +3472,13 @@ function deserializeTSNamedTupleMember(pos) {
|
|
|
3444
3472
|
type: "TSNamedTupleMember",
|
|
3445
3473
|
label: null,
|
|
3446
3474
|
elementType: null,
|
|
3447
|
-
optional: deserializeBool(pos +
|
|
3475
|
+
optional: deserializeBool(pos + 12),
|
|
3448
3476
|
start: (start = deserializeU32(pos)),
|
|
3449
3477
|
end: (end = deserializeU32(pos + 4)),
|
|
3450
3478
|
range: [start, end],
|
|
3451
3479
|
};
|
|
3452
|
-
node.label = deserializeIdentifierName(pos +
|
|
3453
|
-
node.elementType = deserializeTSTupleElement(pos +
|
|
3480
|
+
node.label = deserializeIdentifierName(pos + 16);
|
|
3481
|
+
node.elementType = deserializeTSTupleElement(pos + 48);
|
|
3454
3482
|
return node;
|
|
3455
3483
|
}
|
|
3456
3484
|
|
|
@@ -3464,7 +3492,7 @@ function deserializeTSOptionalType(pos) {
|
|
|
3464
3492
|
end: (end = deserializeU32(pos + 4)),
|
|
3465
3493
|
range: [start, end],
|
|
3466
3494
|
};
|
|
3467
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3495
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3468
3496
|
return node;
|
|
3469
3497
|
}
|
|
3470
3498
|
|
|
@@ -3478,7 +3506,7 @@ function deserializeTSRestType(pos) {
|
|
|
3478
3506
|
end: (end = deserializeU32(pos + 4)),
|
|
3479
3507
|
range: [start, end],
|
|
3480
3508
|
};
|
|
3481
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3509
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
3482
3510
|
return node;
|
|
3483
3511
|
}
|
|
3484
3512
|
|
|
@@ -3718,8 +3746,8 @@ function deserializeTSTypeReference(pos) {
|
|
|
3718
3746
|
end: (end = deserializeU32(pos + 4)),
|
|
3719
3747
|
range: [start, end],
|
|
3720
3748
|
};
|
|
3721
|
-
node.typeName = deserializeTSTypeName(pos +
|
|
3722
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
3749
|
+
node.typeName = deserializeTSTypeName(pos + 16);
|
|
3750
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
3723
3751
|
return node;
|
|
3724
3752
|
}
|
|
3725
3753
|
|
|
@@ -3747,8 +3775,8 @@ function deserializeTSQualifiedName(pos) {
|
|
|
3747
3775
|
end: (end = deserializeU32(pos + 4)),
|
|
3748
3776
|
range: [start, end],
|
|
3749
3777
|
};
|
|
3750
|
-
node.left = deserializeTSTypeName(pos +
|
|
3751
|
-
node.right = deserializeIdentifierName(pos +
|
|
3778
|
+
node.left = deserializeTSTypeName(pos + 16);
|
|
3779
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
3752
3780
|
return node;
|
|
3753
3781
|
}
|
|
3754
3782
|
|
|
@@ -3762,7 +3790,7 @@ function deserializeTSTypeParameterInstantiation(pos) {
|
|
|
3762
3790
|
end: (end = deserializeU32(pos + 4)),
|
|
3763
3791
|
range: [start, end],
|
|
3764
3792
|
};
|
|
3765
|
-
node.params = deserializeVecTSType(pos +
|
|
3793
|
+
node.params = deserializeVecTSType(pos + 16);
|
|
3766
3794
|
return node;
|
|
3767
3795
|
}
|
|
3768
3796
|
|
|
@@ -3774,16 +3802,16 @@ function deserializeTSTypeParameter(pos) {
|
|
|
3774
3802
|
name: null,
|
|
3775
3803
|
constraint: null,
|
|
3776
3804
|
default: null,
|
|
3777
|
-
in: deserializeBool(pos +
|
|
3778
|
-
out: deserializeBool(pos +
|
|
3779
|
-
const: deserializeBool(pos +
|
|
3805
|
+
in: deserializeBool(pos + 12),
|
|
3806
|
+
out: deserializeBool(pos + 13),
|
|
3807
|
+
const: deserializeBool(pos + 14),
|
|
3780
3808
|
start: (start = deserializeU32(pos)),
|
|
3781
3809
|
end: (end = deserializeU32(pos + 4)),
|
|
3782
3810
|
range: [start, end],
|
|
3783
3811
|
};
|
|
3784
|
-
node.name = deserializeBindingIdentifier(pos +
|
|
3785
|
-
node.constraint = deserializeOptionTSType(pos +
|
|
3786
|
-
node.default = deserializeOptionTSType(pos +
|
|
3812
|
+
node.name = deserializeBindingIdentifier(pos + 16);
|
|
3813
|
+
node.constraint = deserializeOptionTSType(pos + 48);
|
|
3814
|
+
node.default = deserializeOptionTSType(pos + 64);
|
|
3787
3815
|
return node;
|
|
3788
3816
|
}
|
|
3789
3817
|
|
|
@@ -3797,7 +3825,7 @@ function deserializeTSTypeParameterDeclaration(pos) {
|
|
|
3797
3825
|
end: (end = deserializeU32(pos + 4)),
|
|
3798
3826
|
range: [start, end],
|
|
3799
3827
|
};
|
|
3800
|
-
node.params = deserializeVecTSTypeParameter(pos +
|
|
3828
|
+
node.params = deserializeVecTSTypeParameter(pos + 16);
|
|
3801
3829
|
return node;
|
|
3802
3830
|
}
|
|
3803
3831
|
|
|
@@ -3814,9 +3842,9 @@ function deserializeTSTypeAliasDeclaration(pos) {
|
|
|
3814
3842
|
end: (end = deserializeU32(pos + 4)),
|
|
3815
3843
|
range: [start, end],
|
|
3816
3844
|
};
|
|
3817
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3818
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3819
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
3845
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3846
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3847
|
+
node.typeAnnotation = deserializeTSType(pos + 56);
|
|
3820
3848
|
return node;
|
|
3821
3849
|
}
|
|
3822
3850
|
|
|
@@ -3834,10 +3862,10 @@ function deserializeTSInterfaceDeclaration(pos) {
|
|
|
3834
3862
|
end: (end = deserializeU32(pos + 4)),
|
|
3835
3863
|
range: [start, end],
|
|
3836
3864
|
};
|
|
3837
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
3838
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3839
|
-
node.extends = deserializeVecTSInterfaceHeritage(pos +
|
|
3840
|
-
node.body = deserializeBoxTSInterfaceBody(pos +
|
|
3865
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
3866
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 48);
|
|
3867
|
+
node.extends = deserializeVecTSInterfaceHeritage(pos + 56);
|
|
3868
|
+
node.body = deserializeBoxTSInterfaceBody(pos + 80);
|
|
3841
3869
|
return node;
|
|
3842
3870
|
}
|
|
3843
3871
|
|
|
@@ -3851,7 +3879,7 @@ function deserializeTSInterfaceBody(pos) {
|
|
|
3851
3879
|
end: (end = deserializeU32(pos + 4)),
|
|
3852
3880
|
range: [start, end],
|
|
3853
3881
|
};
|
|
3854
|
-
node.body = deserializeVecTSSignature(pos +
|
|
3882
|
+
node.body = deserializeVecTSSignature(pos + 16);
|
|
3855
3883
|
return node;
|
|
3856
3884
|
}
|
|
3857
3885
|
|
|
@@ -3860,9 +3888,9 @@ function deserializeTSPropertySignature(pos) {
|
|
|
3860
3888
|
end,
|
|
3861
3889
|
node = {
|
|
3862
3890
|
type: "TSPropertySignature",
|
|
3863
|
-
computed: deserializeBool(pos +
|
|
3864
|
-
optional: deserializeBool(pos +
|
|
3865
|
-
readonly: deserializeBool(pos +
|
|
3891
|
+
computed: deserializeBool(pos + 12),
|
|
3892
|
+
optional: deserializeBool(pos + 13),
|
|
3893
|
+
readonly: deserializeBool(pos + 14),
|
|
3866
3894
|
key: null,
|
|
3867
3895
|
typeAnnotation: null,
|
|
3868
3896
|
accessibility: null,
|
|
@@ -3871,8 +3899,8 @@ function deserializeTSPropertySignature(pos) {
|
|
|
3871
3899
|
end: (end = deserializeU32(pos + 4)),
|
|
3872
3900
|
range: [start, end],
|
|
3873
3901
|
};
|
|
3874
|
-
node.key = deserializePropertyKey(pos +
|
|
3875
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3902
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
3903
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3876
3904
|
node.static = false;
|
|
3877
3905
|
return node;
|
|
3878
3906
|
}
|
|
@@ -3901,15 +3929,15 @@ function deserializeTSIndexSignature(pos) {
|
|
|
3901
3929
|
type: "TSIndexSignature",
|
|
3902
3930
|
parameters: null,
|
|
3903
3931
|
typeAnnotation: null,
|
|
3904
|
-
readonly: deserializeBool(pos +
|
|
3905
|
-
static: deserializeBool(pos +
|
|
3932
|
+
readonly: deserializeBool(pos + 12),
|
|
3933
|
+
static: deserializeBool(pos + 13),
|
|
3906
3934
|
accessibility: null,
|
|
3907
3935
|
start: (start = deserializeU32(pos)),
|
|
3908
3936
|
end: (end = deserializeU32(pos + 4)),
|
|
3909
3937
|
range: [start, end],
|
|
3910
3938
|
};
|
|
3911
|
-
node.parameters = deserializeVecTSIndexSignatureName(pos +
|
|
3912
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
3939
|
+
node.parameters = deserializeVecTSIndexSignatureName(pos + 16);
|
|
3940
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
3913
3941
|
return node;
|
|
3914
3942
|
}
|
|
3915
3943
|
|
|
@@ -3925,12 +3953,12 @@ function deserializeTSCallSignatureDeclaration(pos) {
|
|
|
3925
3953
|
end: (end = deserializeU32(pos + 4)),
|
|
3926
3954
|
range: [start, end],
|
|
3927
3955
|
},
|
|
3928
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3929
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3956
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
3957
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
3930
3958
|
thisParam !== null && params.unshift(thisParam);
|
|
3931
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3959
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
3932
3960
|
node.params = params;
|
|
3933
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
3961
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
3934
3962
|
return node;
|
|
3935
3963
|
}
|
|
3936
3964
|
|
|
@@ -3966,13 +3994,13 @@ function deserializeTSMethodSignature(pos) {
|
|
|
3966
3994
|
end: (end = deserializeU32(pos + 4)),
|
|
3967
3995
|
range: [start, end],
|
|
3968
3996
|
},
|
|
3969
|
-
params = deserializeBoxFormalParameters(pos +
|
|
3970
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
3997
|
+
params = deserializeBoxFormalParameters(pos + 48),
|
|
3998
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 40);
|
|
3971
3999
|
thisParam !== null && params.unshift(thisParam);
|
|
3972
|
-
node.key = deserializePropertyKey(pos +
|
|
3973
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4000
|
+
node.key = deserializePropertyKey(pos + 16);
|
|
4001
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 32);
|
|
3974
4002
|
node.params = params;
|
|
3975
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4003
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 56);
|
|
3976
4004
|
node.readonly = false;
|
|
3977
4005
|
node.static = false;
|
|
3978
4006
|
return node;
|
|
@@ -3990,9 +4018,9 @@ function deserializeTSConstructSignatureDeclaration(pos) {
|
|
|
3990
4018
|
end: (end = deserializeU32(pos + 4)),
|
|
3991
4019
|
range: [start, end],
|
|
3992
4020
|
};
|
|
3993
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
3994
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
3995
|
-
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4021
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4022
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4023
|
+
node.returnType = deserializeOptionBoxTSTypeAnnotation(pos + 32);
|
|
3996
4024
|
return node;
|
|
3997
4025
|
}
|
|
3998
4026
|
|
|
@@ -4002,7 +4030,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
4002
4030
|
node = {
|
|
4003
4031
|
type: "Identifier",
|
|
4004
4032
|
decorators: null,
|
|
4005
|
-
name: deserializeStr(pos +
|
|
4033
|
+
name: deserializeStr(pos + 16),
|
|
4006
4034
|
optional: null,
|
|
4007
4035
|
typeAnnotation: null,
|
|
4008
4036
|
start: (start = deserializeU32(pos)),
|
|
@@ -4011,7 +4039,7 @@ function deserializeTSIndexSignatureName(pos) {
|
|
|
4011
4039
|
};
|
|
4012
4040
|
node.decorators = [];
|
|
4013
4041
|
node.optional = false;
|
|
4014
|
-
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos +
|
|
4042
|
+
node.typeAnnotation = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4015
4043
|
return node;
|
|
4016
4044
|
}
|
|
4017
4045
|
|
|
@@ -4026,8 +4054,8 @@ function deserializeTSInterfaceHeritage(pos) {
|
|
|
4026
4054
|
end: (end = deserializeU32(pos + 4)),
|
|
4027
4055
|
range: [start, end],
|
|
4028
4056
|
};
|
|
4029
|
-
node.expression = deserializeExpression(pos +
|
|
4030
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4057
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4058
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4031
4059
|
return node;
|
|
4032
4060
|
}
|
|
4033
4061
|
|
|
@@ -4037,14 +4065,14 @@ function deserializeTSTypePredicate(pos) {
|
|
|
4037
4065
|
node = {
|
|
4038
4066
|
type: "TSTypePredicate",
|
|
4039
4067
|
parameterName: null,
|
|
4040
|
-
asserts: deserializeBool(pos +
|
|
4068
|
+
asserts: deserializeBool(pos + 12),
|
|
4041
4069
|
typeAnnotation: null,
|
|
4042
4070
|
start: (start = deserializeU32(pos)),
|
|
4043
4071
|
end: (end = deserializeU32(pos + 4)),
|
|
4044
4072
|
range: [start, end],
|
|
4045
4073
|
};
|
|
4046
|
-
node.parameterName = deserializeTSTypePredicateName(pos +
|
|
4047
|
-
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos +
|
|
4074
|
+
node.parameterName = deserializeTSTypePredicateName(pos + 16);
|
|
4075
|
+
node.typeAnnotation = deserializeOptionBoxTSTypeAnnotation(pos + 40);
|
|
4048
4076
|
return node;
|
|
4049
4077
|
}
|
|
4050
4078
|
|
|
@@ -4065,7 +4093,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4065
4093
|
end = deserializeU32(pos + 4),
|
|
4066
4094
|
declare = deserializeBool(pos + 89),
|
|
4067
4095
|
node,
|
|
4068
|
-
body = deserializeOptionTSModuleDeclarationBody(pos +
|
|
4096
|
+
body = deserializeOptionTSModuleDeclarationBody(pos + 72);
|
|
4069
4097
|
if (body === null) {
|
|
4070
4098
|
node = {
|
|
4071
4099
|
type: "TSModuleDeclaration",
|
|
@@ -4077,7 +4105,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4077
4105
|
end,
|
|
4078
4106
|
range: [start, end],
|
|
4079
4107
|
};
|
|
4080
|
-
node.id = deserializeTSModuleDeclarationName(pos +
|
|
4108
|
+
node.id = deserializeTSModuleDeclarationName(pos + 16);
|
|
4081
4109
|
} else {
|
|
4082
4110
|
node = {
|
|
4083
4111
|
type: "TSModuleDeclaration",
|
|
@@ -4090,7 +4118,7 @@ function deserializeTSModuleDeclaration(pos) {
|
|
|
4090
4118
|
end,
|
|
4091
4119
|
range: [start, end],
|
|
4092
4120
|
};
|
|
4093
|
-
let id = deserializeTSModuleDeclarationName(pos +
|
|
4121
|
+
let id = deserializeTSModuleDeclarationName(pos + 16);
|
|
4094
4122
|
if (body.type === "TSModuleBlock") node.id = id;
|
|
4095
4123
|
else {
|
|
4096
4124
|
let innerId = body.id;
|
|
@@ -4186,11 +4214,11 @@ function deserializeTSGlobalDeclaration(pos) {
|
|
|
4186
4214
|
node.id = {
|
|
4187
4215
|
type: "Identifier",
|
|
4188
4216
|
name: "global",
|
|
4189
|
-
start: (keywordStart = deserializeU32(pos +
|
|
4190
|
-
end: (keywordEnd = deserializeU32(pos +
|
|
4217
|
+
start: (keywordStart = deserializeU32(pos + 16)),
|
|
4218
|
+
end: (keywordEnd = deserializeU32(pos + 20)),
|
|
4191
4219
|
range: [keywordStart, keywordEnd],
|
|
4192
4220
|
};
|
|
4193
|
-
node.body = deserializeTSModuleBlock(pos +
|
|
4221
|
+
node.body = deserializeTSModuleBlock(pos + 24);
|
|
4194
4222
|
node.kind = "global";
|
|
4195
4223
|
node.global = true;
|
|
4196
4224
|
return node;
|
|
@@ -4206,8 +4234,8 @@ function deserializeTSModuleBlock(pos) {
|
|
|
4206
4234
|
end: (end = deserializeU32(pos + 4)),
|
|
4207
4235
|
range: [start, end],
|
|
4208
4236
|
},
|
|
4209
|
-
body = deserializeVecDirective(pos +
|
|
4210
|
-
body.push(...deserializeVecStatement(pos +
|
|
4237
|
+
body = deserializeVecDirective(pos + 16);
|
|
4238
|
+
body.push(...deserializeVecStatement(pos + 40));
|
|
4211
4239
|
node.body = body;
|
|
4212
4240
|
return node;
|
|
4213
4241
|
}
|
|
@@ -4222,7 +4250,7 @@ function deserializeTSTypeLiteral(pos) {
|
|
|
4222
4250
|
end: (end = deserializeU32(pos + 4)),
|
|
4223
4251
|
range: [start, end],
|
|
4224
4252
|
};
|
|
4225
|
-
node.members = deserializeVecTSSignature(pos +
|
|
4253
|
+
node.members = deserializeVecTSSignature(pos + 16);
|
|
4226
4254
|
return node;
|
|
4227
4255
|
}
|
|
4228
4256
|
|
|
@@ -4236,7 +4264,7 @@ function deserializeTSInferType(pos) {
|
|
|
4236
4264
|
end: (end = deserializeU32(pos + 4)),
|
|
4237
4265
|
range: [start, end],
|
|
4238
4266
|
};
|
|
4239
|
-
node.typeParameter = deserializeBoxTSTypeParameter(pos +
|
|
4267
|
+
node.typeParameter = deserializeBoxTSTypeParameter(pos + 16);
|
|
4240
4268
|
return node;
|
|
4241
4269
|
}
|
|
4242
4270
|
|
|
@@ -4251,8 +4279,8 @@ function deserializeTSTypeQuery(pos) {
|
|
|
4251
4279
|
end: (end = deserializeU32(pos + 4)),
|
|
4252
4280
|
range: [start, end],
|
|
4253
4281
|
};
|
|
4254
|
-
node.exprName = deserializeTSTypeQueryExprName(pos +
|
|
4255
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4282
|
+
node.exprName = deserializeTSTypeQueryExprName(pos + 16);
|
|
4283
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 32);
|
|
4256
4284
|
return node;
|
|
4257
4285
|
}
|
|
4258
4286
|
|
|
@@ -4284,10 +4312,10 @@ function deserializeTSImportType(pos) {
|
|
|
4284
4312
|
end: (end = deserializeU32(pos + 4)),
|
|
4285
4313
|
range: [start, end],
|
|
4286
4314
|
};
|
|
4287
|
-
node.source = deserializeStringLiteral(pos +
|
|
4288
|
-
node.options = deserializeOptionBoxObjectExpression(pos +
|
|
4289
|
-
node.qualifier = deserializeOptionTSImportTypeQualifier(pos +
|
|
4290
|
-
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos +
|
|
4315
|
+
node.source = deserializeStringLiteral(pos + 16);
|
|
4316
|
+
node.options = deserializeOptionBoxObjectExpression(pos + 64);
|
|
4317
|
+
node.qualifier = deserializeOptionTSImportTypeQualifier(pos + 72);
|
|
4318
|
+
node.typeArguments = deserializeOptionBoxTSTypeParameterInstantiation(pos + 88);
|
|
4291
4319
|
return node;
|
|
4292
4320
|
}
|
|
4293
4321
|
|
|
@@ -4313,8 +4341,8 @@ function deserializeTSImportTypeQualifiedName(pos) {
|
|
|
4313
4341
|
end: (end = deserializeU32(pos + 4)),
|
|
4314
4342
|
range: [start, end],
|
|
4315
4343
|
};
|
|
4316
|
-
node.left = deserializeTSImportTypeQualifier(pos +
|
|
4317
|
-
node.right = deserializeIdentifierName(pos +
|
|
4344
|
+
node.left = deserializeTSImportTypeQualifier(pos + 16);
|
|
4345
|
+
node.right = deserializeIdentifierName(pos + 32);
|
|
4318
4346
|
return node;
|
|
4319
4347
|
}
|
|
4320
4348
|
|
|
@@ -4330,12 +4358,12 @@ function deserializeTSFunctionType(pos) {
|
|
|
4330
4358
|
end: (end = deserializeU32(pos + 4)),
|
|
4331
4359
|
range: [start, end],
|
|
4332
4360
|
},
|
|
4333
|
-
params = deserializeBoxFormalParameters(pos +
|
|
4334
|
-
thisParam = deserializeOptionBoxTSThisParameter(pos +
|
|
4361
|
+
params = deserializeBoxFormalParameters(pos + 32),
|
|
4362
|
+
thisParam = deserializeOptionBoxTSThisParameter(pos + 24);
|
|
4335
4363
|
thisParam !== null && params.unshift(thisParam);
|
|
4336
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4364
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4337
4365
|
node.params = params;
|
|
4338
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4366
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 40);
|
|
4339
4367
|
return node;
|
|
4340
4368
|
}
|
|
4341
4369
|
|
|
@@ -4352,9 +4380,9 @@ function deserializeTSConstructorType(pos) {
|
|
|
4352
4380
|
end: (end = deserializeU32(pos + 4)),
|
|
4353
4381
|
range: [start, end],
|
|
4354
4382
|
};
|
|
4355
|
-
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos +
|
|
4356
|
-
node.params = deserializeBoxFormalParameters(pos +
|
|
4357
|
-
node.returnType = deserializeBoxTSTypeAnnotation(pos +
|
|
4383
|
+
node.typeParameters = deserializeOptionBoxTSTypeParameterDeclaration(pos + 16);
|
|
4384
|
+
node.params = deserializeBoxFormalParameters(pos + 24);
|
|
4385
|
+
node.returnType = deserializeBoxTSTypeAnnotation(pos + 32);
|
|
4358
4386
|
return node;
|
|
4359
4387
|
}
|
|
4360
4388
|
|
|
@@ -4375,10 +4403,10 @@ function deserializeTSMappedType(pos) {
|
|
|
4375
4403
|
},
|
|
4376
4404
|
optional = deserializeOptionTSMappedTypeModifierOperator(pos + 96);
|
|
4377
4405
|
optional === null && (optional = false);
|
|
4378
|
-
node.key = deserializeBindingIdentifier(pos +
|
|
4379
|
-
node.constraint = deserializeTSType(pos +
|
|
4380
|
-
node.nameType = deserializeOptionTSType(pos +
|
|
4381
|
-
node.typeAnnotation = deserializeOptionTSType(pos +
|
|
4406
|
+
node.key = deserializeBindingIdentifier(pos + 16);
|
|
4407
|
+
node.constraint = deserializeTSType(pos + 48);
|
|
4408
|
+
node.nameType = deserializeOptionTSType(pos + 64);
|
|
4409
|
+
node.typeAnnotation = deserializeOptionTSType(pos + 80);
|
|
4382
4410
|
node.optional = optional;
|
|
4383
4411
|
return node;
|
|
4384
4412
|
}
|
|
@@ -4407,8 +4435,8 @@ function deserializeTSTemplateLiteralType(pos) {
|
|
|
4407
4435
|
end: (end = deserializeU32(pos + 4)),
|
|
4408
4436
|
range: [start, end],
|
|
4409
4437
|
};
|
|
4410
|
-
node.quasis = deserializeVecTemplateElement(pos +
|
|
4411
|
-
node.types = deserializeVecTSType(pos +
|
|
4438
|
+
node.quasis = deserializeVecTemplateElement(pos + 16);
|
|
4439
|
+
node.types = deserializeVecTSType(pos + 40);
|
|
4412
4440
|
return node;
|
|
4413
4441
|
}
|
|
4414
4442
|
|
|
@@ -4423,8 +4451,8 @@ function deserializeTSAsExpression(pos) {
|
|
|
4423
4451
|
end: (end = deserializeU32(pos + 4)),
|
|
4424
4452
|
range: [start, end],
|
|
4425
4453
|
};
|
|
4426
|
-
node.expression = deserializeExpression(pos +
|
|
4427
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4454
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4455
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4428
4456
|
return node;
|
|
4429
4457
|
}
|
|
4430
4458
|
|
|
@@ -4439,8 +4467,8 @@ function deserializeTSSatisfiesExpression(pos) {
|
|
|
4439
4467
|
end: (end = deserializeU32(pos + 4)),
|
|
4440
4468
|
range: [start, end],
|
|
4441
4469
|
};
|
|
4442
|
-
node.expression = deserializeExpression(pos +
|
|
4443
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4470
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4471
|
+
node.typeAnnotation = deserializeTSType(pos + 32);
|
|
4444
4472
|
return node;
|
|
4445
4473
|
}
|
|
4446
4474
|
|
|
@@ -4455,8 +4483,8 @@ function deserializeTSTypeAssertion(pos) {
|
|
|
4455
4483
|
end: (end = deserializeU32(pos + 4)),
|
|
4456
4484
|
range: [start, end],
|
|
4457
4485
|
};
|
|
4458
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4459
|
-
node.expression = deserializeExpression(pos +
|
|
4486
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4487
|
+
node.expression = deserializeExpression(pos + 32);
|
|
4460
4488
|
return node;
|
|
4461
4489
|
}
|
|
4462
4490
|
|
|
@@ -4467,13 +4495,13 @@ function deserializeTSImportEqualsDeclaration(pos) {
|
|
|
4467
4495
|
type: "TSImportEqualsDeclaration",
|
|
4468
4496
|
id: null,
|
|
4469
4497
|
moduleReference: null,
|
|
4470
|
-
importKind: deserializeImportOrExportKind(pos +
|
|
4498
|
+
importKind: deserializeImportOrExportKind(pos + 12),
|
|
4471
4499
|
start: (start = deserializeU32(pos)),
|
|
4472
4500
|
end: (end = deserializeU32(pos + 4)),
|
|
4473
4501
|
range: [start, end],
|
|
4474
4502
|
};
|
|
4475
|
-
node.id = deserializeBindingIdentifier(pos +
|
|
4476
|
-
node.moduleReference = deserializeTSModuleReference(pos +
|
|
4503
|
+
node.id = deserializeBindingIdentifier(pos + 16);
|
|
4504
|
+
node.moduleReference = deserializeTSModuleReference(pos + 48);
|
|
4477
4505
|
return node;
|
|
4478
4506
|
}
|
|
4479
4507
|
|
|
@@ -4500,7 +4528,7 @@ function deserializeTSExternalModuleReference(pos) {
|
|
|
4500
4528
|
end: (end = deserializeU32(pos + 4)),
|
|
4501
4529
|
range: [start, end],
|
|
4502
4530
|
};
|
|
4503
|
-
node.expression = deserializeStringLiteral(pos +
|
|
4531
|
+
node.expression = deserializeStringLiteral(pos + 16);
|
|
4504
4532
|
return node;
|
|
4505
4533
|
}
|
|
4506
4534
|
|
|
@@ -4514,7 +4542,7 @@ function deserializeTSNonNullExpression(pos) {
|
|
|
4514
4542
|
end: (end = deserializeU32(pos + 4)),
|
|
4515
4543
|
range: [start, end],
|
|
4516
4544
|
};
|
|
4517
|
-
node.expression = deserializeExpression(pos +
|
|
4545
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4518
4546
|
return node;
|
|
4519
4547
|
}
|
|
4520
4548
|
|
|
@@ -4528,7 +4556,7 @@ function deserializeDecorator(pos) {
|
|
|
4528
4556
|
end: (end = deserializeU32(pos + 4)),
|
|
4529
4557
|
range: [start, end],
|
|
4530
4558
|
};
|
|
4531
|
-
node.expression = deserializeExpression(pos +
|
|
4559
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4532
4560
|
return node;
|
|
4533
4561
|
}
|
|
4534
4562
|
|
|
@@ -4542,7 +4570,7 @@ function deserializeTSExportAssignment(pos) {
|
|
|
4542
4570
|
end: (end = deserializeU32(pos + 4)),
|
|
4543
4571
|
range: [start, end],
|
|
4544
4572
|
};
|
|
4545
|
-
node.expression = deserializeExpression(pos +
|
|
4573
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4546
4574
|
return node;
|
|
4547
4575
|
}
|
|
4548
4576
|
|
|
@@ -4556,7 +4584,7 @@ function deserializeTSNamespaceExportDeclaration(pos) {
|
|
|
4556
4584
|
end: (end = deserializeU32(pos + 4)),
|
|
4557
4585
|
range: [start, end],
|
|
4558
4586
|
};
|
|
4559
|
-
node.id = deserializeIdentifierName(pos +
|
|
4587
|
+
node.id = deserializeIdentifierName(pos + 16);
|
|
4560
4588
|
return node;
|
|
4561
4589
|
}
|
|
4562
4590
|
|
|
@@ -4571,8 +4599,8 @@ function deserializeTSInstantiationExpression(pos) {
|
|
|
4571
4599
|
end: (end = deserializeU32(pos + 4)),
|
|
4572
4600
|
range: [start, end],
|
|
4573
4601
|
};
|
|
4574
|
-
node.expression = deserializeExpression(pos +
|
|
4575
|
-
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos +
|
|
4602
|
+
node.expression = deserializeExpression(pos + 16);
|
|
4603
|
+
node.typeArguments = deserializeBoxTSTypeParameterInstantiation(pos + 32);
|
|
4576
4604
|
return node;
|
|
4577
4605
|
}
|
|
4578
4606
|
|
|
@@ -4593,12 +4621,12 @@ function deserializeJSDocNullableType(pos) {
|
|
|
4593
4621
|
node = {
|
|
4594
4622
|
type: "TSJSDocNullableType",
|
|
4595
4623
|
typeAnnotation: null,
|
|
4596
|
-
postfix: deserializeBool(pos +
|
|
4624
|
+
postfix: deserializeBool(pos + 12),
|
|
4597
4625
|
start: (start = deserializeU32(pos)),
|
|
4598
4626
|
end: (end = deserializeU32(pos + 4)),
|
|
4599
4627
|
range: [start, end],
|
|
4600
4628
|
};
|
|
4601
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4629
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4602
4630
|
return node;
|
|
4603
4631
|
}
|
|
4604
4632
|
|
|
@@ -4608,12 +4636,12 @@ function deserializeJSDocNonNullableType(pos) {
|
|
|
4608
4636
|
node = {
|
|
4609
4637
|
type: "TSJSDocNonNullableType",
|
|
4610
4638
|
typeAnnotation: null,
|
|
4611
|
-
postfix: deserializeBool(pos +
|
|
4639
|
+
postfix: deserializeBool(pos + 12),
|
|
4612
4640
|
start: (start = deserializeU32(pos)),
|
|
4613
4641
|
end: (end = deserializeU32(pos + 4)),
|
|
4614
4642
|
range: [start, end],
|
|
4615
4643
|
};
|
|
4616
|
-
node.typeAnnotation = deserializeTSType(pos +
|
|
4644
|
+
node.typeAnnotation = deserializeTSType(pos + 16);
|
|
4617
4645
|
return node;
|
|
4618
4646
|
}
|
|
4619
4647
|
|
|
@@ -4653,6 +4681,26 @@ function deserializeComment(pos) {
|
|
|
4653
4681
|
};
|
|
4654
4682
|
}
|
|
4655
4683
|
|
|
4684
|
+
function deserializeModuleKind(pos) {
|
|
4685
|
+
switch (uint8[pos]) {
|
|
4686
|
+
case 0:
|
|
4687
|
+
return "script";
|
|
4688
|
+
case 1:
|
|
4689
|
+
return "module";
|
|
4690
|
+
case 3:
|
|
4691
|
+
return "commonjs";
|
|
4692
|
+
default:
|
|
4693
|
+
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
4694
|
+
}
|
|
4695
|
+
}
|
|
4696
|
+
|
|
4697
|
+
function deserializeSpan(pos) {
|
|
4698
|
+
return {
|
|
4699
|
+
start: deserializeU32(pos),
|
|
4700
|
+
end: deserializeU32(pos + 4),
|
|
4701
|
+
};
|
|
4702
|
+
}
|
|
4703
|
+
|
|
4656
4704
|
function deserializeNameSpan(pos) {
|
|
4657
4705
|
let start, end;
|
|
4658
4706
|
return {
|
|
@@ -4969,26 +5017,6 @@ function deserializeUpdateOperator(pos) {
|
|
|
4969
5017
|
}
|
|
4970
5018
|
}
|
|
4971
5019
|
|
|
4972
|
-
function deserializeSpan(pos) {
|
|
4973
|
-
return {
|
|
4974
|
-
start: deserializeU32(pos),
|
|
4975
|
-
end: deserializeU32(pos + 4),
|
|
4976
|
-
};
|
|
4977
|
-
}
|
|
4978
|
-
|
|
4979
|
-
function deserializeModuleKind(pos) {
|
|
4980
|
-
switch (uint8[pos]) {
|
|
4981
|
-
case 0:
|
|
4982
|
-
return "script";
|
|
4983
|
-
case 1:
|
|
4984
|
-
return "module";
|
|
4985
|
-
case 3:
|
|
4986
|
-
return "commonjs";
|
|
4987
|
-
default:
|
|
4988
|
-
throw Error(`Unexpected discriminant ${uint8[pos]} for ModuleKind`);
|
|
4989
|
-
}
|
|
4990
|
-
}
|
|
4991
|
-
|
|
4992
5020
|
function deserializeRawTransferData(pos) {
|
|
4993
5021
|
return {
|
|
4994
5022
|
program: deserializeProgram(pos),
|
|
@@ -5062,36 +5090,32 @@ function deserializeStaticExport(pos) {
|
|
|
5062
5090
|
};
|
|
5063
5091
|
}
|
|
5064
5092
|
|
|
5065
|
-
function deserializeU32(pos) {
|
|
5066
|
-
return uint32[pos >> 2];
|
|
5067
|
-
}
|
|
5068
|
-
|
|
5069
|
-
function deserializeU8(pos) {
|
|
5070
|
-
return uint8[pos];
|
|
5071
|
-
}
|
|
5072
|
-
|
|
5073
5093
|
function deserializeStr(pos) {
|
|
5074
5094
|
let pos32 = pos >> 2,
|
|
5075
5095
|
len = uint32[pos32 + 2];
|
|
5076
5096
|
if (len === 0) return "";
|
|
5077
5097
|
pos = uint32[pos32];
|
|
5078
|
-
if (sourceIsAscii && pos < sourceEndPos) return sourceText.substr(pos, len);
|
|
5079
|
-
// Longer strings use `TextDecoder`
|
|
5080
|
-
// TODO: Find best switch-over point
|
|
5081
5098
|
let end = pos + len;
|
|
5082
|
-
if (
|
|
5083
|
-
//
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5099
|
+
if (end <= firstNonAsciiPos) return sourceTextLatin.substr(pos, len);
|
|
5100
|
+
// Use `utf8Slice` for strings longer than 64 bytes
|
|
5101
|
+
if (len > 64) return utf8Slice.call(uint8, pos, end);
|
|
5102
|
+
if (pos < sourceEndPos) {
|
|
5103
|
+
// Check if all bytes are ASCII, use `utf8Slice` if not
|
|
5104
|
+
for (let i = pos; i < end; i++) if (uint8[i] >= 128) return utf8Slice.call(uint8, pos, end);
|
|
5105
|
+
// String is all ASCII, so slice from `sourceTextLatin`
|
|
5106
|
+
return sourceTextLatin.substr(pos, len);
|
|
5107
|
+
}
|
|
5108
|
+
// String is not in source region - use `fromCharCode.apply` with a temp array of correct length.
|
|
5109
|
+
// Copy bytes into temp array.
|
|
5110
|
+
// If any byte is non-ASCII, use `utf8Slice`.
|
|
5111
|
+
let arr = stringDecodeArrays[len];
|
|
5112
|
+
for (let i = 0; i < len; i++) {
|
|
5113
|
+
let b = uint8[pos + i];
|
|
5114
|
+
if (b >= 128) return utf8Slice.call(uint8, pos, end);
|
|
5115
|
+
arr[i] = b;
|
|
5116
|
+
}
|
|
5117
|
+
// Call `fromCharCode` with temp array
|
|
5118
|
+
return fromCharCode.apply(null, arr);
|
|
5095
5119
|
}
|
|
5096
5120
|
|
|
5097
5121
|
function deserializeVecComment(pos) {
|
|
@@ -5107,8 +5131,9 @@ function deserializeVecComment(pos) {
|
|
|
5107
5131
|
}
|
|
5108
5132
|
|
|
5109
5133
|
function deserializeOptionHashbang(pos) {
|
|
5110
|
-
|
|
5111
|
-
|
|
5134
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5135
|
+
? null
|
|
5136
|
+
: deserializeHashbang(pos);
|
|
5112
5137
|
}
|
|
5113
5138
|
|
|
5114
5139
|
function deserializeVecDirective(pos) {
|
|
@@ -5368,13 +5393,13 @@ function deserializeBoxTSTypeParameterInstantiation(pos) {
|
|
|
5368
5393
|
}
|
|
5369
5394
|
|
|
5370
5395
|
function deserializeOptionBoxTSTypeParameterInstantiation(pos) {
|
|
5371
|
-
|
|
5372
|
-
|
|
5396
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5397
|
+
? null
|
|
5398
|
+
: deserializeBoxTSTypeParameterInstantiation(pos);
|
|
5373
5399
|
}
|
|
5374
5400
|
|
|
5375
5401
|
function deserializeOptionStr(pos) {
|
|
5376
|
-
|
|
5377
|
-
return deserializeStr(pos);
|
|
5402
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0 ? null : deserializeStr(pos);
|
|
5378
5403
|
}
|
|
5379
5404
|
|
|
5380
5405
|
function deserializeBoxComputedMemberExpression(pos) {
|
|
@@ -5410,8 +5435,7 @@ function deserializeBoxObjectAssignmentTarget(pos) {
|
|
|
5410
5435
|
}
|
|
5411
5436
|
|
|
5412
5437
|
function deserializeOptionAssignmentTargetMaybeDefault(pos) {
|
|
5413
|
-
|
|
5414
|
-
return deserializeAssignmentTargetMaybeDefault(pos);
|
|
5438
|
+
return uint8[pos] === 51 ? null : deserializeAssignmentTargetMaybeDefault(pos);
|
|
5415
5439
|
}
|
|
5416
5440
|
|
|
5417
5441
|
function deserializeVecOptionAssignmentTargetMaybeDefault(pos) {
|
|
@@ -5431,8 +5455,9 @@ function deserializeBoxAssignmentTargetRest(pos) {
|
|
|
5431
5455
|
}
|
|
5432
5456
|
|
|
5433
5457
|
function deserializeOptionBoxAssignmentTargetRest(pos) {
|
|
5434
|
-
|
|
5435
|
-
|
|
5458
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5459
|
+
? null
|
|
5460
|
+
: deserializeBoxAssignmentTargetRest(pos);
|
|
5436
5461
|
}
|
|
5437
5462
|
|
|
5438
5463
|
function deserializeVecAssignmentTargetProperty(pos) {
|
|
@@ -5460,8 +5485,7 @@ function deserializeBoxAssignmentTargetPropertyProperty(pos) {
|
|
|
5460
5485
|
}
|
|
5461
5486
|
|
|
5462
5487
|
function deserializeOptionExpression(pos) {
|
|
5463
|
-
|
|
5464
|
-
return deserializeExpression(pos);
|
|
5488
|
+
return uint8[pos] === 51 ? null : deserializeExpression(pos);
|
|
5465
5489
|
}
|
|
5466
5490
|
|
|
5467
5491
|
function deserializeBoxBlockStatement(pos) {
|
|
@@ -5581,23 +5605,23 @@ function deserializeBoxTSTypeAnnotation(pos) {
|
|
|
5581
5605
|
}
|
|
5582
5606
|
|
|
5583
5607
|
function deserializeOptionBoxTSTypeAnnotation(pos) {
|
|
5584
|
-
|
|
5585
|
-
|
|
5608
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5609
|
+
? null
|
|
5610
|
+
: deserializeBoxTSTypeAnnotation(pos);
|
|
5586
5611
|
}
|
|
5587
5612
|
|
|
5588
5613
|
function deserializeOptionStatement(pos) {
|
|
5589
|
-
|
|
5590
|
-
return deserializeStatement(pos);
|
|
5614
|
+
return uint8[pos] === 70 ? null : deserializeStatement(pos);
|
|
5591
5615
|
}
|
|
5592
5616
|
|
|
5593
5617
|
function deserializeOptionForStatementInit(pos) {
|
|
5594
|
-
|
|
5595
|
-
return deserializeForStatementInit(pos);
|
|
5618
|
+
return uint8[pos] === 65 ? null : deserializeForStatementInit(pos);
|
|
5596
5619
|
}
|
|
5597
5620
|
|
|
5598
5621
|
function deserializeOptionLabelIdentifier(pos) {
|
|
5599
|
-
|
|
5600
|
-
|
|
5622
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5623
|
+
? null
|
|
5624
|
+
: deserializeLabelIdentifier(pos);
|
|
5601
5625
|
}
|
|
5602
5626
|
|
|
5603
5627
|
function deserializeVecSwitchCase(pos) {
|
|
@@ -5617,18 +5641,19 @@ function deserializeBoxCatchClause(pos) {
|
|
|
5617
5641
|
}
|
|
5618
5642
|
|
|
5619
5643
|
function deserializeOptionBoxCatchClause(pos) {
|
|
5620
|
-
|
|
5621
|
-
|
|
5644
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5645
|
+
? null
|
|
5646
|
+
: deserializeBoxCatchClause(pos);
|
|
5622
5647
|
}
|
|
5623
5648
|
|
|
5624
5649
|
function deserializeOptionBoxBlockStatement(pos) {
|
|
5625
|
-
|
|
5626
|
-
|
|
5650
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5651
|
+
? null
|
|
5652
|
+
: deserializeBoxBlockStatement(pos);
|
|
5627
5653
|
}
|
|
5628
5654
|
|
|
5629
5655
|
function deserializeOptionCatchParameter(pos) {
|
|
5630
|
-
|
|
5631
|
-
return deserializeCatchParameter(pos);
|
|
5656
|
+
return uint8[pos + 16] === 4 ? null : deserializeCatchParameter(pos);
|
|
5632
5657
|
}
|
|
5633
5658
|
|
|
5634
5659
|
function deserializeBoxBindingIdentifier(pos) {
|
|
@@ -5664,13 +5689,13 @@ function deserializeBoxBindingRestElement(pos) {
|
|
|
5664
5689
|
}
|
|
5665
5690
|
|
|
5666
5691
|
function deserializeOptionBoxBindingRestElement(pos) {
|
|
5667
|
-
|
|
5668
|
-
|
|
5692
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5693
|
+
? null
|
|
5694
|
+
: deserializeBoxBindingRestElement(pos);
|
|
5669
5695
|
}
|
|
5670
5696
|
|
|
5671
5697
|
function deserializeOptionBindingPattern(pos) {
|
|
5672
|
-
|
|
5673
|
-
return deserializeBindingPattern(pos);
|
|
5698
|
+
return uint8[pos] === 4 ? null : deserializeBindingPattern(pos);
|
|
5674
5699
|
}
|
|
5675
5700
|
|
|
5676
5701
|
function deserializeVecOptionBindingPattern(pos) {
|
|
@@ -5686,8 +5711,9 @@ function deserializeVecOptionBindingPattern(pos) {
|
|
|
5686
5711
|
}
|
|
5687
5712
|
|
|
5688
5713
|
function deserializeOptionBindingIdentifier(pos) {
|
|
5689
|
-
|
|
5690
|
-
|
|
5714
|
+
return uint32[(pos + 16) >> 2] === 0 && uint32[(pos + 20) >> 2] === 0
|
|
5715
|
+
? null
|
|
5716
|
+
: deserializeBindingIdentifier(pos);
|
|
5691
5717
|
}
|
|
5692
5718
|
|
|
5693
5719
|
function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
@@ -5695,8 +5721,9 @@ function deserializeBoxTSTypeParameterDeclaration(pos) {
|
|
|
5695
5721
|
}
|
|
5696
5722
|
|
|
5697
5723
|
function deserializeOptionBoxTSTypeParameterDeclaration(pos) {
|
|
5698
|
-
|
|
5699
|
-
|
|
5724
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5725
|
+
? null
|
|
5726
|
+
: deserializeBoxTSTypeParameterDeclaration(pos);
|
|
5700
5727
|
}
|
|
5701
5728
|
|
|
5702
5729
|
function deserializeBoxTSThisParameter(pos) {
|
|
@@ -5704,8 +5731,9 @@ function deserializeBoxTSThisParameter(pos) {
|
|
|
5704
5731
|
}
|
|
5705
5732
|
|
|
5706
5733
|
function deserializeOptionBoxTSThisParameter(pos) {
|
|
5707
|
-
|
|
5708
|
-
|
|
5734
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5735
|
+
? null
|
|
5736
|
+
: deserializeBoxTSThisParameter(pos);
|
|
5709
5737
|
}
|
|
5710
5738
|
|
|
5711
5739
|
function deserializeBoxFormalParameters(pos) {
|
|
@@ -5717,8 +5745,9 @@ function deserializeBoxFunctionBody(pos) {
|
|
|
5717
5745
|
}
|
|
5718
5746
|
|
|
5719
5747
|
function deserializeOptionBoxFunctionBody(pos) {
|
|
5720
|
-
|
|
5721
|
-
|
|
5748
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5749
|
+
? null
|
|
5750
|
+
: deserializeBoxFunctionBody(pos);
|
|
5722
5751
|
}
|
|
5723
5752
|
|
|
5724
5753
|
function deserializeVecFormalParameter(pos) {
|
|
@@ -5750,8 +5779,9 @@ function deserializeBoxExpression(pos) {
|
|
|
5750
5779
|
}
|
|
5751
5780
|
|
|
5752
5781
|
function deserializeOptionBoxExpression(pos) {
|
|
5753
|
-
|
|
5754
|
-
|
|
5782
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5783
|
+
? null
|
|
5784
|
+
: deserializeBoxExpression(pos);
|
|
5755
5785
|
}
|
|
5756
5786
|
|
|
5757
5787
|
function deserializeBoxClassBody(pos) {
|
|
@@ -5815,8 +5845,7 @@ function deserializeBoxTSNamespaceExportDeclaration(pos) {
|
|
|
5815
5845
|
}
|
|
5816
5846
|
|
|
5817
5847
|
function deserializeOptionImportPhase(pos) {
|
|
5818
|
-
|
|
5819
|
-
return deserializeImportPhase(pos);
|
|
5848
|
+
return uint8[pos] === 2 ? null : deserializeImportPhase(pos);
|
|
5820
5849
|
}
|
|
5821
5850
|
|
|
5822
5851
|
function deserializeVecImportDeclarationSpecifier(pos) {
|
|
@@ -5832,8 +5861,9 @@ function deserializeVecImportDeclarationSpecifier(pos) {
|
|
|
5832
5861
|
}
|
|
5833
5862
|
|
|
5834
5863
|
function deserializeOptionVecImportDeclarationSpecifier(pos) {
|
|
5835
|
-
|
|
5836
|
-
|
|
5864
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5865
|
+
? null
|
|
5866
|
+
: deserializeVecImportDeclarationSpecifier(pos);
|
|
5837
5867
|
}
|
|
5838
5868
|
|
|
5839
5869
|
function deserializeBoxWithClause(pos) {
|
|
@@ -5841,8 +5871,9 @@ function deserializeBoxWithClause(pos) {
|
|
|
5841
5871
|
}
|
|
5842
5872
|
|
|
5843
5873
|
function deserializeOptionBoxWithClause(pos) {
|
|
5844
|
-
|
|
5845
|
-
|
|
5874
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5875
|
+
? null
|
|
5876
|
+
: deserializeBoxWithClause(pos);
|
|
5846
5877
|
}
|
|
5847
5878
|
|
|
5848
5879
|
function deserializeBoxImportSpecifier(pos) {
|
|
@@ -5870,8 +5901,7 @@ function deserializeVecImportAttribute(pos) {
|
|
|
5870
5901
|
}
|
|
5871
5902
|
|
|
5872
5903
|
function deserializeOptionDeclaration(pos) {
|
|
5873
|
-
|
|
5874
|
-
return deserializeDeclaration(pos);
|
|
5904
|
+
return uint8[pos] === 31 ? null : deserializeDeclaration(pos);
|
|
5875
5905
|
}
|
|
5876
5906
|
|
|
5877
5907
|
function deserializeVecExportSpecifier(pos) {
|
|
@@ -5887,19 +5917,21 @@ function deserializeVecExportSpecifier(pos) {
|
|
|
5887
5917
|
}
|
|
5888
5918
|
|
|
5889
5919
|
function deserializeOptionStringLiteral(pos) {
|
|
5890
|
-
|
|
5891
|
-
return deserializeStringLiteral(pos);
|
|
5920
|
+
return uint8[pos + 12] === 2 ? null : deserializeStringLiteral(pos);
|
|
5892
5921
|
}
|
|
5893
5922
|
|
|
5894
5923
|
function deserializeOptionModuleExportName(pos) {
|
|
5895
|
-
|
|
5896
|
-
return deserializeModuleExportName(pos);
|
|
5924
|
+
return uint8[pos] === 3 ? null : deserializeModuleExportName(pos);
|
|
5897
5925
|
}
|
|
5898
5926
|
|
|
5899
5927
|
function deserializeF64(pos) {
|
|
5900
5928
|
return float64[pos >> 3];
|
|
5901
5929
|
}
|
|
5902
5930
|
|
|
5931
|
+
function deserializeU8(pos) {
|
|
5932
|
+
return uint8[pos];
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5903
5935
|
function deserializeBoxJSXOpeningElement(pos) {
|
|
5904
5936
|
return deserializeJSXOpeningElement(uint32[pos >> 2]);
|
|
5905
5937
|
}
|
|
@@ -5921,8 +5953,9 @@ function deserializeBoxJSXClosingElement(pos) {
|
|
|
5921
5953
|
}
|
|
5922
5954
|
|
|
5923
5955
|
function deserializeOptionBoxJSXClosingElement(pos) {
|
|
5924
|
-
|
|
5925
|
-
|
|
5956
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
5957
|
+
? null
|
|
5958
|
+
: deserializeBoxJSXClosingElement(pos);
|
|
5926
5959
|
}
|
|
5927
5960
|
|
|
5928
5961
|
function deserializeVecJSXAttributeItem(pos) {
|
|
@@ -5958,8 +5991,7 @@ function deserializeBoxJSXSpreadAttribute(pos) {
|
|
|
5958
5991
|
}
|
|
5959
5992
|
|
|
5960
5993
|
function deserializeOptionJSXAttributeValue(pos) {
|
|
5961
|
-
|
|
5962
|
-
return deserializeJSXAttributeValue(pos);
|
|
5994
|
+
return uint8[pos] === 4 ? null : deserializeJSXAttributeValue(pos);
|
|
5963
5995
|
}
|
|
5964
5996
|
|
|
5965
5997
|
function deserializeBoxJSXExpressionContainer(pos) {
|
|
@@ -6171,8 +6203,7 @@ function deserializeBoxTSQualifiedName(pos) {
|
|
|
6171
6203
|
}
|
|
6172
6204
|
|
|
6173
6205
|
function deserializeOptionTSType(pos) {
|
|
6174
|
-
|
|
6175
|
-
return deserializeTSType(pos);
|
|
6206
|
+
return uint8[pos] === 38 ? null : deserializeTSType(pos);
|
|
6176
6207
|
}
|
|
6177
6208
|
|
|
6178
6209
|
function deserializeVecTSTypeParameter(pos) {
|
|
@@ -6244,8 +6275,7 @@ function deserializeVecTSIndexSignatureName(pos) {
|
|
|
6244
6275
|
}
|
|
6245
6276
|
|
|
6246
6277
|
function deserializeOptionTSModuleDeclarationBody(pos) {
|
|
6247
|
-
|
|
6248
|
-
return deserializeTSModuleDeclarationBody(pos);
|
|
6278
|
+
return uint8[pos] === 2 ? null : deserializeTSModuleDeclarationBody(pos);
|
|
6249
6279
|
}
|
|
6250
6280
|
|
|
6251
6281
|
function deserializeBoxTSModuleBlock(pos) {
|
|
@@ -6257,13 +6287,13 @@ function deserializeBoxTSTypeParameter(pos) {
|
|
|
6257
6287
|
}
|
|
6258
6288
|
|
|
6259
6289
|
function deserializeOptionBoxObjectExpression(pos) {
|
|
6260
|
-
|
|
6261
|
-
|
|
6290
|
+
return uint32[pos >> 2] === 0 && uint32[(pos + 4) >> 2] === 0
|
|
6291
|
+
? null
|
|
6292
|
+
: deserializeBoxObjectExpression(pos);
|
|
6262
6293
|
}
|
|
6263
6294
|
|
|
6264
6295
|
function deserializeOptionTSImportTypeQualifier(pos) {
|
|
6265
|
-
|
|
6266
|
-
return deserializeTSImportTypeQualifier(pos);
|
|
6296
|
+
return uint8[pos] === 2 ? null : deserializeTSImportTypeQualifier(pos);
|
|
6267
6297
|
}
|
|
6268
6298
|
|
|
6269
6299
|
function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
@@ -6271,17 +6301,21 @@ function deserializeBoxTSImportTypeQualifiedName(pos) {
|
|
|
6271
6301
|
}
|
|
6272
6302
|
|
|
6273
6303
|
function deserializeOptionTSMappedTypeModifierOperator(pos) {
|
|
6274
|
-
|
|
6275
|
-
return deserializeTSMappedTypeModifierOperator(pos);
|
|
6304
|
+
return uint8[pos] === 3 ? null : deserializeTSMappedTypeModifierOperator(pos);
|
|
6276
6305
|
}
|
|
6277
6306
|
|
|
6278
6307
|
function deserializeBoxTSExternalModuleReference(pos) {
|
|
6279
6308
|
return deserializeTSExternalModuleReference(uint32[pos >> 2]);
|
|
6280
6309
|
}
|
|
6281
6310
|
|
|
6311
|
+
function deserializeU32(pos) {
|
|
6312
|
+
return uint32[pos >> 2];
|
|
6313
|
+
}
|
|
6314
|
+
|
|
6282
6315
|
function deserializeOptionNameSpan(pos) {
|
|
6283
|
-
|
|
6284
|
-
|
|
6316
|
+
return uint32[(pos + 8) >> 2] === 0 && uint32[(pos + 12) >> 2] === 0
|
|
6317
|
+
? null
|
|
6318
|
+
: deserializeNameSpan(pos);
|
|
6285
6319
|
}
|
|
6286
6320
|
|
|
6287
6321
|
function deserializeVecError(pos) {
|