flow-parser 0.331.0 → 0.332.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/dist/FlowParserDeserializer.js.flow +1 -0
- package/dist/FlowParserNodeDeserializers.js +101 -61
- package/dist/FlowParserWASM.js +1 -1
- package/dist/estree/TransformComponentSyntax.js +1 -0
- package/dist/estree/TransformComponentSyntax.js.flow +1 -0
- package/dist/estree/TransformRecordSyntax.js +4 -0
- package/dist/estree/TransformRecordSyntax.js.flow +4 -0
- package/dist/generated/ESTreeVisitorKeys.js +1 -1
- package/package.json +2 -2
|
@@ -160,17 +160,19 @@ module.exports = [function () {
|
|
|
160
160
|
id: this.deserializeNode()
|
|
161
161
|
};
|
|
162
162
|
}, function () {
|
|
163
|
-
|
|
163
|
+
const node = {
|
|
164
164
|
type: 'ClassDeclaration',
|
|
165
|
-
loc: this.addEmptyLoc()
|
|
166
|
-
id: this.deserializeNode(),
|
|
167
|
-
typeParameters: this.deserializeNode(),
|
|
168
|
-
superClass: this.deserializeNode(),
|
|
169
|
-
implements: this.deserializeNodeList(),
|
|
170
|
-
body: this.deserializeNode(),
|
|
171
|
-
superTypeArguments: this.deserializeNode(),
|
|
172
|
-
decorators: this.deserializeNodeList()
|
|
165
|
+
loc: this.addEmptyLoc()
|
|
173
166
|
};
|
|
167
|
+
node.id = this.deserializeNode();
|
|
168
|
+
node.typeParameters = this.deserializeNode();
|
|
169
|
+
node.superClass = this.deserializeNode();
|
|
170
|
+
node.implements = this.deserializeNodeList();
|
|
171
|
+
node.body = this.deserializeNode();
|
|
172
|
+
node.superTypeArguments = this.deserializeNode();
|
|
173
|
+
node.decorators = this.deserializeNodeList();
|
|
174
|
+
if (this.deserializeBoolean()) node['abstract'] = true;
|
|
175
|
+
return node;
|
|
174
176
|
}, function () {
|
|
175
177
|
return {
|
|
176
178
|
type: 'ComponentDeclaration',
|
|
@@ -233,7 +235,8 @@ module.exports = [function () {
|
|
|
233
235
|
specifiers: this.deserializeNodeList(),
|
|
234
236
|
source: this.deserializeNode(),
|
|
235
237
|
importKind: this.deserializeString(),
|
|
236
|
-
attributes: this.deserializeNodeList()
|
|
238
|
+
attributes: this.deserializeNodeList(),
|
|
239
|
+
phase: this.deserializeString()
|
|
237
240
|
};
|
|
238
241
|
}, function () {
|
|
239
242
|
return {
|
|
@@ -305,7 +308,8 @@ module.exports = [function () {
|
|
|
305
308
|
type: 'ExportSpecifier',
|
|
306
309
|
loc: this.addEmptyLoc(),
|
|
307
310
|
exported: this.deserializeNode(),
|
|
308
|
-
local: this.deserializeNode()
|
|
311
|
+
local: this.deserializeNode(),
|
|
312
|
+
exportKind: this.deserializeString()
|
|
309
313
|
};
|
|
310
314
|
}, function () {
|
|
311
315
|
return {
|
|
@@ -485,7 +489,8 @@ module.exports = [function () {
|
|
|
485
489
|
type: 'ImportExpression',
|
|
486
490
|
loc: this.addEmptyLoc(),
|
|
487
491
|
source: this.deserializeNode(),
|
|
488
|
-
options: this.deserializeNode()
|
|
492
|
+
options: this.deserializeNode(),
|
|
493
|
+
phase: this.deserializeString()
|
|
489
494
|
};
|
|
490
495
|
}, function () {
|
|
491
496
|
return {
|
|
@@ -672,17 +677,19 @@ module.exports = [function () {
|
|
|
672
677
|
argument: this.deserializeNode()
|
|
673
678
|
};
|
|
674
679
|
}, function () {
|
|
675
|
-
|
|
680
|
+
const node = {
|
|
676
681
|
type: 'ClassExpression',
|
|
677
|
-
loc: this.addEmptyLoc()
|
|
678
|
-
id: this.deserializeNode(),
|
|
679
|
-
typeParameters: this.deserializeNode(),
|
|
680
|
-
superClass: this.deserializeNode(),
|
|
681
|
-
implements: this.deserializeNodeList(),
|
|
682
|
-
body: this.deserializeNode(),
|
|
683
|
-
superTypeArguments: this.deserializeNode(),
|
|
684
|
-
decorators: this.deserializeNodeList()
|
|
682
|
+
loc: this.addEmptyLoc()
|
|
685
683
|
};
|
|
684
|
+
node.id = this.deserializeNode();
|
|
685
|
+
node.typeParameters = this.deserializeNode();
|
|
686
|
+
node.superClass = this.deserializeNode();
|
|
687
|
+
node.implements = this.deserializeNodeList();
|
|
688
|
+
node.body = this.deserializeNode();
|
|
689
|
+
node.superTypeArguments = this.deserializeNode();
|
|
690
|
+
node.decorators = this.deserializeNodeList();
|
|
691
|
+
if (this.deserializeBoolean()) node['abstract'] = true;
|
|
692
|
+
return node;
|
|
686
693
|
}, function () {
|
|
687
694
|
return {
|
|
688
695
|
type: 'ClassBody',
|
|
@@ -765,26 +772,34 @@ module.exports = [function () {
|
|
|
765
772
|
override: this.deserializeBoolean()
|
|
766
773
|
};
|
|
767
774
|
}, function () {
|
|
768
|
-
|
|
775
|
+
const node = {
|
|
769
776
|
type: 'AbstractMethodDefinition',
|
|
770
|
-
loc: this.addEmptyLoc()
|
|
771
|
-
key: this.deserializeNode(),
|
|
772
|
-
value: this.deserializeNode(),
|
|
773
|
-
computed: this.deserializeBoolean(),
|
|
774
|
-
override: this.deserializeBoolean(),
|
|
775
|
-
tsAccessibility: this.deserializeString()
|
|
777
|
+
loc: this.addEmptyLoc()
|
|
776
778
|
};
|
|
779
|
+
node.key = this.deserializeNode();
|
|
780
|
+
node.value = this.deserializeNode();
|
|
781
|
+
node.computed = this.deserializeBoolean();
|
|
782
|
+
if (this.deserializeBoolean()) node['override'] = true;
|
|
783
|
+
{
|
|
784
|
+
const value = this.deserializeString();
|
|
785
|
+
if (value != null) node['tsAccessibility'] = value;
|
|
786
|
+
}
|
|
787
|
+
return node;
|
|
777
788
|
}, function () {
|
|
778
|
-
|
|
789
|
+
const node = {
|
|
779
790
|
type: 'AbstractPropertyDefinition',
|
|
780
|
-
loc: this.addEmptyLoc()
|
|
781
|
-
key: this.deserializeNode(),
|
|
782
|
-
value: this.deserializeNode(),
|
|
783
|
-
computed: this.deserializeBoolean(),
|
|
784
|
-
variance: this.deserializeNode(),
|
|
785
|
-
override: this.deserializeBoolean(),
|
|
786
|
-
tsAccessibility: this.deserializeString()
|
|
791
|
+
loc: this.addEmptyLoc()
|
|
787
792
|
};
|
|
793
|
+
node.key = this.deserializeNode();
|
|
794
|
+
node.value = this.deserializeNode();
|
|
795
|
+
node.computed = this.deserializeBoolean();
|
|
796
|
+
node.variance = this.deserializeNode();
|
|
797
|
+
if (this.deserializeBoolean()) node['override'] = true;
|
|
798
|
+
{
|
|
799
|
+
const value = this.deserializeString();
|
|
800
|
+
if (value != null) node['tsAccessibility'] = value;
|
|
801
|
+
}
|
|
802
|
+
return node;
|
|
788
803
|
}, function () {
|
|
789
804
|
return {
|
|
790
805
|
type: 'SwitchCase',
|
|
@@ -816,25 +831,32 @@ module.exports = [function () {
|
|
|
816
831
|
implicitDeclare: this.deserializeBoolean()
|
|
817
832
|
};
|
|
818
833
|
}, function () {
|
|
819
|
-
|
|
834
|
+
const node = {
|
|
820
835
|
type: 'DeclareFunction',
|
|
821
|
-
loc: this.addEmptyLoc()
|
|
822
|
-
id: this.deserializeNode(),
|
|
823
|
-
implicitDeclare: this.deserializeBoolean(),
|
|
824
|
-
predicate: this.deserializeNode()
|
|
836
|
+
loc: this.addEmptyLoc()
|
|
825
837
|
};
|
|
838
|
+
node.id = this.deserializeNode();
|
|
839
|
+
{
|
|
840
|
+
const value = this.deserializeNode();
|
|
841
|
+
if (value != null) node['typeAnnotation'] = value;
|
|
842
|
+
}
|
|
843
|
+
node.implicitDeclare = this.deserializeBoolean();
|
|
844
|
+
node.predicate = this.deserializeNode();
|
|
845
|
+
return node;
|
|
826
846
|
}, function () {
|
|
827
|
-
|
|
847
|
+
const node = {
|
|
828
848
|
type: 'DeclareClass',
|
|
829
|
-
loc: this.addEmptyLoc()
|
|
830
|
-
id: this.deserializeNode(),
|
|
831
|
-
typeParameters: this.deserializeNode(),
|
|
832
|
-
extends: this.deserializeNodeList(),
|
|
833
|
-
implements: this.deserializeNodeList(),
|
|
834
|
-
mixins: this.deserializeNodeList(),
|
|
835
|
-
body: this.deserializeNode(),
|
|
836
|
-
implicitDeclare: this.deserializeBoolean()
|
|
849
|
+
loc: this.addEmptyLoc()
|
|
837
850
|
};
|
|
851
|
+
node.id = this.deserializeNode();
|
|
852
|
+
node.typeParameters = this.deserializeNode();
|
|
853
|
+
node.extends = this.deserializeNodeList();
|
|
854
|
+
node.implements = this.deserializeNodeList();
|
|
855
|
+
node.mixins = this.deserializeNodeList();
|
|
856
|
+
node.body = this.deserializeNode();
|
|
857
|
+
node.implicitDeclare = this.deserializeBoolean();
|
|
858
|
+
if (this.deserializeBoolean()) node['abstract'] = true;
|
|
859
|
+
return node;
|
|
838
860
|
}, function () {
|
|
839
861
|
return {
|
|
840
862
|
type: 'DeclareComponent',
|
|
@@ -1164,18 +1186,29 @@ module.exports = [function () {
|
|
|
1164
1186
|
exact: this.deserializeBoolean()
|
|
1165
1187
|
};
|
|
1166
1188
|
}, function () {
|
|
1167
|
-
|
|
1189
|
+
const node = {
|
|
1168
1190
|
type: 'ObjectTypeProperty',
|
|
1169
|
-
loc: this.addEmptyLoc()
|
|
1170
|
-
key: this.deserializeNode(),
|
|
1171
|
-
value: this.deserializeNode(),
|
|
1172
|
-
method: this.deserializeBoolean(),
|
|
1173
|
-
optional: this.deserializeBoolean(),
|
|
1174
|
-
static: this.deserializeBoolean(),
|
|
1175
|
-
proto: this.deserializeBoolean(),
|
|
1176
|
-
variance: this.deserializeNode(),
|
|
1177
|
-
kind: this.deserializeString()
|
|
1191
|
+
loc: this.addEmptyLoc()
|
|
1178
1192
|
};
|
|
1193
|
+
node.key = this.deserializeNode();
|
|
1194
|
+
node.value = this.deserializeNode();
|
|
1195
|
+
node.method = this.deserializeBoolean();
|
|
1196
|
+
node.optional = this.deserializeBoolean();
|
|
1197
|
+
node.static = this.deserializeBoolean();
|
|
1198
|
+
node.proto = this.deserializeBoolean();
|
|
1199
|
+
node.variance = this.deserializeNode();
|
|
1200
|
+
node.kind = this.deserializeString();
|
|
1201
|
+
if (this.deserializeBoolean()) node['abstract'] = true;
|
|
1202
|
+
if (this.deserializeBoolean()) node['override'] = true;
|
|
1203
|
+
{
|
|
1204
|
+
const value = this.deserializeString();
|
|
1205
|
+
if (value != null) node['tsAccessibility'] = value;
|
|
1206
|
+
}
|
|
1207
|
+
{
|
|
1208
|
+
const value = this.deserializeNode();
|
|
1209
|
+
if (value != null) node['init'] = value;
|
|
1210
|
+
}
|
|
1211
|
+
return node;
|
|
1179
1212
|
}, function () {
|
|
1180
1213
|
return {
|
|
1181
1214
|
type: 'ObjectTypeSpreadProperty',
|
|
@@ -1190,7 +1223,8 @@ module.exports = [function () {
|
|
|
1190
1223
|
key: this.deserializeNode(),
|
|
1191
1224
|
value: this.deserializeNode(),
|
|
1192
1225
|
static: this.deserializeBoolean(),
|
|
1193
|
-
variance: this.deserializeNode()
|
|
1226
|
+
variance: this.deserializeNode(),
|
|
1227
|
+
optional: this.deserializeBoolean()
|
|
1194
1228
|
};
|
|
1195
1229
|
}, function () {
|
|
1196
1230
|
return {
|
|
@@ -1206,7 +1240,9 @@ module.exports = [function () {
|
|
|
1206
1240
|
keyTparam: this.deserializeNode(),
|
|
1207
1241
|
propType: this.deserializeNode(),
|
|
1208
1242
|
sourceType: this.deserializeNode(),
|
|
1243
|
+
nameType: this.deserializeNode(),
|
|
1209
1244
|
variance: this.deserializeNode(),
|
|
1245
|
+
varianceOp: this.deserializeString(),
|
|
1210
1246
|
optional: this.deserializeString()
|
|
1211
1247
|
};
|
|
1212
1248
|
}, function () {
|
|
@@ -2329,6 +2365,10 @@ module.exports = [function () {
|
|
|
2329
2365
|
const value = this.deserializeNodeList();
|
|
2330
2366
|
if (value.length > 0) node['attributes'] = value;
|
|
2331
2367
|
}
|
|
2368
|
+
{
|
|
2369
|
+
const value = this.deserializeString();
|
|
2370
|
+
if (value != null) node['phase'] = value;
|
|
2371
|
+
}
|
|
2332
2372
|
return node;
|
|
2333
2373
|
}, function () {
|
|
2334
2374
|
const node = {
|