hermes-transform 0.10.0 → 0.11.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/detachedNode.js +16 -0
- package/dist/detachedNode.js.flow +17 -3
- package/dist/generated/TransformCloneSignatures.js.flow +469 -318
- package/dist/generated/TransformModifySignatures.js.flow +256 -158
- package/dist/generated/TransformReplaceSignatures.js.flow +99 -1
- package/dist/generated/node-types.js +420 -482
- package/dist/generated/node-types.js.flow +555 -491
- package/dist/generated/special-case-node-types/misc.js +15 -0
- package/dist/generated/special-case-node-types/misc.js.flow +23 -0
- package/dist/index.js +2 -1
- package/dist/index.js.flow +4 -1
- package/dist/transform/comments/comments.js +22 -15
- package/dist/transform/comments/comments.js.flow +24 -13
- package/dist/transform/transformAST.js +1 -1
- package/dist/transform/transformAST.js.flow +1 -1
- package/dist/traverse/NodeEventGenerator.js +3 -3
- package/dist/traverse/NodeEventGenerator.js.flow +3 -3
- package/package.json +4 -4
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
20
|
|
|
21
|
-
/* global $NonMaybeType,
|
|
21
|
+
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray */
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -45,11 +45,18 @@ var _exportNames = {
|
|
|
45
45
|
ClassBody: true,
|
|
46
46
|
ClassExpression: true,
|
|
47
47
|
ClassImplements: true,
|
|
48
|
+
ComponentDeclaration: true,
|
|
49
|
+
ComponentParameter: true,
|
|
50
|
+
ComponentTypeAnnotation: true,
|
|
51
|
+
ComponentTypeParameter: true,
|
|
48
52
|
ConditionalExpression: true,
|
|
53
|
+
ConditionalTypeAnnotation: true,
|
|
49
54
|
ContinueStatement: true,
|
|
50
55
|
DebuggerStatement: true,
|
|
51
56
|
DeclareClass: true,
|
|
57
|
+
DeclareComponent: true,
|
|
52
58
|
DeclaredPredicate: true,
|
|
59
|
+
DeclareEnum: true,
|
|
53
60
|
DeclareExportAllDeclaration: true,
|
|
54
61
|
DeclareInterface: true,
|
|
55
62
|
DeclareModule: true,
|
|
@@ -91,6 +98,7 @@ var _exportNames = {
|
|
|
91
98
|
ImportSpecifier: true,
|
|
92
99
|
IndexedAccessType: true,
|
|
93
100
|
InferredPredicate: true,
|
|
101
|
+
InferTypeAnnotation: true,
|
|
94
102
|
InterfaceDeclaration: true,
|
|
95
103
|
InterfaceExtends: true,
|
|
96
104
|
InterfaceTypeAnnotation: true,
|
|
@@ -110,9 +118,9 @@ var _exportNames = {
|
|
|
110
118
|
JSXSpreadAttribute: true,
|
|
111
119
|
JSXSpreadChild: true,
|
|
112
120
|
JSXText: true,
|
|
121
|
+
KeyofTypeAnnotation: true,
|
|
113
122
|
LabeledStatement: true,
|
|
114
123
|
LogicalExpression: true,
|
|
115
|
-
MemberExpression: true,
|
|
116
124
|
MetaProperty: true,
|
|
117
125
|
MethodDefinition: true,
|
|
118
126
|
MixedTypeAnnotation: true,
|
|
@@ -127,6 +135,7 @@ var _exportNames = {
|
|
|
127
135
|
ObjectTypeCallProperty: true,
|
|
128
136
|
ObjectTypeIndexer: true,
|
|
129
137
|
ObjectTypeInternalSlot: true,
|
|
138
|
+
ObjectTypeMappedTypeProperty: true,
|
|
130
139
|
ObjectTypeSpreadProperty: true,
|
|
131
140
|
OpaqueType: true,
|
|
132
141
|
OptionalIndexedAccessType: true,
|
|
@@ -134,6 +143,7 @@ var _exportNames = {
|
|
|
134
143
|
Property: true,
|
|
135
144
|
PropertyDefinition: true,
|
|
136
145
|
QualifiedTypeIdentifier: true,
|
|
146
|
+
QualifiedTypeofIdentifier: true,
|
|
137
147
|
RestElement: true,
|
|
138
148
|
ReturnStatement: true,
|
|
139
149
|
SequenceExpression: true,
|
|
@@ -151,6 +161,8 @@ var _exportNames = {
|
|
|
151
161
|
ThrowStatement: true,
|
|
152
162
|
TryStatement: true,
|
|
153
163
|
TupleTypeAnnotation: true,
|
|
164
|
+
TupleTypeLabeledElement: true,
|
|
165
|
+
TupleTypeSpreadElement: true,
|
|
154
166
|
TypeAlias: true,
|
|
155
167
|
TypeAnnotation: true,
|
|
156
168
|
TypeCastExpression: true,
|
|
@@ -158,6 +170,7 @@ var _exportNames = {
|
|
|
158
170
|
TypeParameter: true,
|
|
159
171
|
TypeParameterDeclaration: true,
|
|
160
172
|
TypeParameterInstantiation: true,
|
|
173
|
+
TypePredicate: true,
|
|
161
174
|
UnaryExpression: true,
|
|
162
175
|
UnionTypeAnnotation: true,
|
|
163
176
|
UpdateExpression: true,
|
|
@@ -189,10 +202,17 @@ exports.ChainExpression = ChainExpression;
|
|
|
189
202
|
exports.ClassBody = ClassBody;
|
|
190
203
|
exports.ClassExpression = ClassExpression;
|
|
191
204
|
exports.ClassImplements = ClassImplements;
|
|
205
|
+
exports.ComponentDeclaration = ComponentDeclaration;
|
|
206
|
+
exports.ComponentParameter = ComponentParameter;
|
|
207
|
+
exports.ComponentTypeAnnotation = ComponentTypeAnnotation;
|
|
208
|
+
exports.ComponentTypeParameter = ComponentTypeParameter;
|
|
192
209
|
exports.ConditionalExpression = ConditionalExpression;
|
|
210
|
+
exports.ConditionalTypeAnnotation = ConditionalTypeAnnotation;
|
|
193
211
|
exports.ContinueStatement = ContinueStatement;
|
|
194
212
|
exports.DebuggerStatement = DebuggerStatement;
|
|
195
213
|
exports.DeclareClass = DeclareClass;
|
|
214
|
+
exports.DeclareComponent = DeclareComponent;
|
|
215
|
+
exports.DeclareEnum = DeclareEnum;
|
|
196
216
|
exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
|
|
197
217
|
exports.DeclareInterface = DeclareInterface;
|
|
198
218
|
exports.DeclareModule = DeclareModule;
|
|
@@ -234,6 +254,7 @@ exports.ImportExpression = ImportExpression;
|
|
|
234
254
|
exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
|
235
255
|
exports.ImportSpecifier = ImportSpecifier;
|
|
236
256
|
exports.IndexedAccessType = IndexedAccessType;
|
|
257
|
+
exports.InferTypeAnnotation = InferTypeAnnotation;
|
|
237
258
|
exports.InferredPredicate = InferredPredicate;
|
|
238
259
|
exports.InterfaceDeclaration = InterfaceDeclaration;
|
|
239
260
|
exports.InterfaceExtends = InterfaceExtends;
|
|
@@ -254,9 +275,9 @@ exports.JSXOpeningFragment = JSXOpeningFragment;
|
|
|
254
275
|
exports.JSXSpreadAttribute = JSXSpreadAttribute;
|
|
255
276
|
exports.JSXSpreadChild = JSXSpreadChild;
|
|
256
277
|
exports.JSXText = JSXText;
|
|
278
|
+
exports.KeyofTypeAnnotation = KeyofTypeAnnotation;
|
|
257
279
|
exports.LabeledStatement = LabeledStatement;
|
|
258
280
|
exports.LogicalExpression = LogicalExpression;
|
|
259
|
-
exports.MemberExpression = MemberExpression;
|
|
260
281
|
exports.MetaProperty = MetaProperty;
|
|
261
282
|
exports.MethodDefinition = MethodDefinition;
|
|
262
283
|
exports.MixedTypeAnnotation = MixedTypeAnnotation;
|
|
@@ -271,6 +292,7 @@ exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
|
|
|
271
292
|
exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
|
|
272
293
|
exports.ObjectTypeIndexer = ObjectTypeIndexer;
|
|
273
294
|
exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
|
|
295
|
+
exports.ObjectTypeMappedTypeProperty = ObjectTypeMappedTypeProperty;
|
|
274
296
|
exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
|
|
275
297
|
exports.OpaqueType = OpaqueType;
|
|
276
298
|
exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
|
|
@@ -278,6 +300,7 @@ exports.PrivateIdentifier = PrivateIdentifier;
|
|
|
278
300
|
exports.Property = Property;
|
|
279
301
|
exports.PropertyDefinition = PropertyDefinition;
|
|
280
302
|
exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
|
|
303
|
+
exports.QualifiedTypeofIdentifier = QualifiedTypeofIdentifier;
|
|
281
304
|
exports.RestElement = RestElement;
|
|
282
305
|
exports.ReturnStatement = ReturnStatement;
|
|
283
306
|
exports.SequenceExpression = SequenceExpression;
|
|
@@ -295,12 +318,15 @@ exports.ThisTypeAnnotation = ThisTypeAnnotation;
|
|
|
295
318
|
exports.ThrowStatement = ThrowStatement;
|
|
296
319
|
exports.TryStatement = TryStatement;
|
|
297
320
|
exports.TupleTypeAnnotation = TupleTypeAnnotation;
|
|
321
|
+
exports.TupleTypeLabeledElement = TupleTypeLabeledElement;
|
|
322
|
+
exports.TupleTypeSpreadElement = TupleTypeSpreadElement;
|
|
298
323
|
exports.TypeAlias = TypeAlias;
|
|
299
324
|
exports.TypeAnnotation = TypeAnnotation;
|
|
300
325
|
exports.TypeCastExpression = TypeCastExpression;
|
|
301
326
|
exports.TypeParameter = TypeParameter;
|
|
302
327
|
exports.TypeParameterDeclaration = TypeParameterDeclaration;
|
|
303
328
|
exports.TypeParameterInstantiation = TypeParameterInstantiation;
|
|
329
|
+
exports.TypePredicate = TypePredicate;
|
|
304
330
|
exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
|
|
305
331
|
exports.UnaryExpression = UnaryExpression;
|
|
306
332
|
exports.UnionTypeAnnotation = UnionTypeAnnotation;
|
|
@@ -334,8 +360,7 @@ function AnyTypeAnnotation(props = { ...null
|
|
|
334
360
|
function ArrayExpression(props) {
|
|
335
361
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
336
362
|
type: 'ArrayExpression',
|
|
337
|
-
|
|
338
|
-
elements: props.elements.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
363
|
+
elements: props.elements.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
339
364
|
trailingComma: props.trailingComma
|
|
340
365
|
});
|
|
341
366
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -345,10 +370,8 @@ function ArrayExpression(props) {
|
|
|
345
370
|
function ArrayPattern(props) {
|
|
346
371
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
347
372
|
type: 'ArrayPattern',
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
// $FlowFixMe[incompatible-call],
|
|
351
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
373
|
+
elements: props.elements.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
374
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
352
375
|
});
|
|
353
376
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
354
377
|
return node;
|
|
@@ -357,8 +380,7 @@ function ArrayPattern(props) {
|
|
|
357
380
|
function ArrayTypeAnnotation(props) {
|
|
358
381
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
359
382
|
type: 'ArrayTypeAnnotation',
|
|
360
|
-
|
|
361
|
-
elementType: (0, _detachedNode.asDetachedNode)(props.elementType)
|
|
383
|
+
elementType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.elementType)
|
|
362
384
|
});
|
|
363
385
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
364
386
|
return node;
|
|
@@ -368,10 +390,8 @@ function AssignmentExpression(props) {
|
|
|
368
390
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
369
391
|
type: 'AssignmentExpression',
|
|
370
392
|
operator: props.operator,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
// $FlowFixMe[incompatible-call],
|
|
374
|
-
right: (0, _detachedNode.asDetachedNode)(props.right)
|
|
393
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
394
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right)
|
|
375
395
|
});
|
|
376
396
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
377
397
|
return node;
|
|
@@ -380,10 +400,8 @@ function AssignmentExpression(props) {
|
|
|
380
400
|
function AssignmentPattern(props) {
|
|
381
401
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
382
402
|
type: 'AssignmentPattern',
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
// $FlowFixMe[incompatible-call],
|
|
386
|
-
right: (0, _detachedNode.asDetachedNode)(props.right)
|
|
403
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
404
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right)
|
|
387
405
|
});
|
|
388
406
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
389
407
|
return node;
|
|
@@ -392,8 +410,7 @@ function AssignmentPattern(props) {
|
|
|
392
410
|
function AwaitExpression(props) {
|
|
393
411
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
394
412
|
type: 'AwaitExpression',
|
|
395
|
-
|
|
396
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
413
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
397
414
|
});
|
|
398
415
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
399
416
|
return node;
|
|
@@ -418,10 +435,8 @@ function BigIntTypeAnnotation(props = { ...null
|
|
|
418
435
|
function BinaryExpression(props) {
|
|
419
436
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
420
437
|
type: 'BinaryExpression',
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
// $FlowFixMe[incompatible-call],
|
|
424
|
-
right: (0, _detachedNode.asDetachedNode)(props.right),
|
|
438
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
439
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right),
|
|
425
440
|
operator: props.operator
|
|
426
441
|
});
|
|
427
442
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -431,8 +446,7 @@ function BinaryExpression(props) {
|
|
|
431
446
|
function BlockStatement(props) {
|
|
432
447
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
433
448
|
type: 'BlockStatement',
|
|
434
|
-
|
|
435
|
-
body: props.body.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
449
|
+
body: props.body.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
436
450
|
});
|
|
437
451
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
438
452
|
return node;
|
|
@@ -458,8 +472,7 @@ function BooleanTypeAnnotation(props = { ...null
|
|
|
458
472
|
function BreakStatement(props) {
|
|
459
473
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
460
474
|
type: 'BreakStatement',
|
|
461
|
-
|
|
462
|
-
label: (0, _detachedNode.asDetachedNode)(props.label)
|
|
475
|
+
label: (0, _detachedNode.asDetachedNodeForCodeGen)(props.label)
|
|
463
476
|
});
|
|
464
477
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
465
478
|
return node;
|
|
@@ -468,12 +481,9 @@ function BreakStatement(props) {
|
|
|
468
481
|
function CallExpression(props) {
|
|
469
482
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
470
483
|
type: 'CallExpression',
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
typeArguments: (0, _detachedNode.asDetachedNode)(props.typeArguments),
|
|
475
|
-
// $FlowFixMe[incompatible-call],
|
|
476
|
-
arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
484
|
+
callee: (0, _detachedNode.asDetachedNodeForCodeGen)(props.callee),
|
|
485
|
+
typeArguments: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeArguments),
|
|
486
|
+
arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
477
487
|
});
|
|
478
488
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
479
489
|
return node;
|
|
@@ -482,10 +492,8 @@ function CallExpression(props) {
|
|
|
482
492
|
function CatchClause(props) {
|
|
483
493
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
484
494
|
type: 'CatchClause',
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
// $FlowFixMe[incompatible-call],
|
|
488
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
495
|
+
param: (0, _detachedNode.asDetachedNodeForCodeGen)(props.param),
|
|
496
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
489
497
|
});
|
|
490
498
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
491
499
|
return node;
|
|
@@ -494,8 +502,7 @@ function CatchClause(props) {
|
|
|
494
502
|
function ChainExpression(props) {
|
|
495
503
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
496
504
|
type: 'ChainExpression',
|
|
497
|
-
|
|
498
|
-
expression: (0, _detachedNode.asDetachedNode)(props.expression)
|
|
505
|
+
expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression)
|
|
499
506
|
});
|
|
500
507
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
501
508
|
return node;
|
|
@@ -504,8 +511,7 @@ function ChainExpression(props) {
|
|
|
504
511
|
function ClassBody(props) {
|
|
505
512
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
506
513
|
type: 'ClassBody',
|
|
507
|
-
|
|
508
|
-
body: props.body.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
514
|
+
body: props.body.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
509
515
|
});
|
|
510
516
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
511
517
|
return node;
|
|
@@ -514,20 +520,13 @@ function ClassBody(props) {
|
|
|
514
520
|
function ClassExpression(props) {
|
|
515
521
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
516
522
|
type: 'ClassExpression',
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
superTypeParameters: (0, _detachedNode.asDetachedNode)(props.superTypeParameters),
|
|
525
|
-
// $FlowFixMe[incompatible-call],
|
|
526
|
-
implements: props.implements.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
527
|
-
// $FlowFixMe[incompatible-call],
|
|
528
|
-
decorators: props.decorators.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
529
|
-
// $FlowFixMe[incompatible-call],
|
|
530
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
523
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
524
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
525
|
+
superClass: (0, _detachedNode.asDetachedNodeForCodeGen)(props.superClass),
|
|
526
|
+
superTypeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.superTypeParameters),
|
|
527
|
+
implements: props.implements.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
528
|
+
decorators: props.decorators.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
529
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
531
530
|
});
|
|
532
531
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
533
532
|
return node;
|
|
@@ -536,10 +535,55 @@ function ClassExpression(props) {
|
|
|
536
535
|
function ClassImplements(props) {
|
|
537
536
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
538
537
|
type: 'ClassImplements',
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
538
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
539
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters)
|
|
540
|
+
});
|
|
541
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
542
|
+
return node;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
function ComponentDeclaration(props) {
|
|
546
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
547
|
+
type: 'ComponentDeclaration',
|
|
548
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
549
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
550
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
551
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
552
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType)
|
|
553
|
+
});
|
|
554
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
555
|
+
return node;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
function ComponentParameter(props) {
|
|
559
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
560
|
+
type: 'ComponentParameter',
|
|
561
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name),
|
|
562
|
+
local: (0, _detachedNode.asDetachedNodeForCodeGen)(props.local),
|
|
563
|
+
shorthand: props.shorthand
|
|
564
|
+
});
|
|
565
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
566
|
+
return node;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function ComponentTypeAnnotation(props) {
|
|
570
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
571
|
+
type: 'ComponentTypeAnnotation',
|
|
572
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
573
|
+
rest: (0, _detachedNode.asDetachedNodeForCodeGen)(props.rest),
|
|
574
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
575
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType)
|
|
576
|
+
});
|
|
577
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
578
|
+
return node;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
function ComponentTypeParameter(props) {
|
|
582
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
583
|
+
type: 'ComponentTypeParameter',
|
|
584
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name),
|
|
585
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation),
|
|
586
|
+
optional: props.optional
|
|
543
587
|
});
|
|
544
588
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
545
589
|
return node;
|
|
@@ -548,12 +592,21 @@ function ClassImplements(props) {
|
|
|
548
592
|
function ConditionalExpression(props) {
|
|
549
593
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
550
594
|
type: 'ConditionalExpression',
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
595
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test),
|
|
596
|
+
alternate: (0, _detachedNode.asDetachedNodeForCodeGen)(props.alternate),
|
|
597
|
+
consequent: (0, _detachedNode.asDetachedNodeForCodeGen)(props.consequent)
|
|
598
|
+
});
|
|
599
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
600
|
+
return node;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
function ConditionalTypeAnnotation(props) {
|
|
604
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
605
|
+
type: 'ConditionalTypeAnnotation',
|
|
606
|
+
checkType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.checkType),
|
|
607
|
+
extendsType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.extendsType),
|
|
608
|
+
trueType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.trueType),
|
|
609
|
+
falseType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.falseType)
|
|
557
610
|
});
|
|
558
611
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
559
612
|
return node;
|
|
@@ -562,8 +615,7 @@ function ConditionalExpression(props) {
|
|
|
562
615
|
function ContinueStatement(props) {
|
|
563
616
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
564
617
|
type: 'ContinueStatement',
|
|
565
|
-
|
|
566
|
-
label: (0, _detachedNode.asDetachedNode)(props.label)
|
|
618
|
+
label: (0, _detachedNode.asDetachedNodeForCodeGen)(props.label)
|
|
567
619
|
});
|
|
568
620
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
569
621
|
return node;
|
|
@@ -579,18 +631,25 @@ function DebuggerStatement(props = { ...null
|
|
|
579
631
|
function DeclareClass(props) {
|
|
580
632
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
581
633
|
type: 'DeclareClass',
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
634
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
635
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
636
|
+
extends: props.extends.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
637
|
+
implements: props.implements.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
638
|
+
mixins: props.mixins.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
639
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
640
|
+
});
|
|
641
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
642
|
+
return node;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
function DeclareComponent(props) {
|
|
646
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
647
|
+
type: 'DeclareComponent',
|
|
648
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
649
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
650
|
+
rest: (0, _detachedNode.asDetachedNodeForCodeGen)(props.rest),
|
|
651
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
652
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType)
|
|
594
653
|
});
|
|
595
654
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
596
655
|
return node;
|
|
@@ -599,8 +658,17 @@ function DeclareClass(props) {
|
|
|
599
658
|
function DeclaredPredicate(props) {
|
|
600
659
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
601
660
|
type: 'DeclaredPredicate',
|
|
602
|
-
|
|
603
|
-
|
|
661
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value)
|
|
662
|
+
});
|
|
663
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
664
|
+
return node;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function DeclareEnum(props) {
|
|
668
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
669
|
+
type: 'DeclareEnum',
|
|
670
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
671
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
604
672
|
});
|
|
605
673
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
606
674
|
return node;
|
|
@@ -609,8 +677,7 @@ function DeclaredPredicate(props) {
|
|
|
609
677
|
function DeclareExportAllDeclaration(props) {
|
|
610
678
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
611
679
|
type: 'DeclareExportAllDeclaration',
|
|
612
|
-
|
|
613
|
-
source: (0, _detachedNode.asDetachedNode)(props.source)
|
|
680
|
+
source: (0, _detachedNode.asDetachedNodeForCodeGen)(props.source)
|
|
614
681
|
});
|
|
615
682
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
616
683
|
return node;
|
|
@@ -619,14 +686,10 @@ function DeclareExportAllDeclaration(props) {
|
|
|
619
686
|
function DeclareInterface(props) {
|
|
620
687
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
621
688
|
type: 'DeclareInterface',
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
// $FlowFixMe[incompatible-call],
|
|
627
|
-
extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
628
|
-
// $FlowFixMe[incompatible-call],
|
|
629
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
689
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
690
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
691
|
+
extends: props.extends.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
692
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
630
693
|
});
|
|
631
694
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
632
695
|
return node;
|
|
@@ -635,10 +698,8 @@ function DeclareInterface(props) {
|
|
|
635
698
|
function DeclareModule(props) {
|
|
636
699
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
637
700
|
type: 'DeclareModule',
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
// $FlowFixMe[incompatible-call],
|
|
641
|
-
body: (0, _detachedNode.asDetachedNode)(props.body),
|
|
701
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
702
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
642
703
|
kind: props.kind
|
|
643
704
|
});
|
|
644
705
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -648,8 +709,7 @@ function DeclareModule(props) {
|
|
|
648
709
|
function DeclareModuleExports(props) {
|
|
649
710
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
650
711
|
type: 'DeclareModuleExports',
|
|
651
|
-
|
|
652
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
712
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
653
713
|
});
|
|
654
714
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
655
715
|
return node;
|
|
@@ -658,14 +718,10 @@ function DeclareModuleExports(props) {
|
|
|
658
718
|
function DeclareOpaqueType(props) {
|
|
659
719
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
660
720
|
type: 'DeclareOpaqueType',
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
// $FlowFixMe[incompatible-call],
|
|
666
|
-
impltype: (0, _detachedNode.asDetachedNode)(props.impltype),
|
|
667
|
-
// $FlowFixMe[incompatible-call],
|
|
668
|
-
supertype: (0, _detachedNode.asDetachedNode)(props.supertype)
|
|
721
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
722
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
723
|
+
impltype: (0, _detachedNode.asDetachedNodeForCodeGen)(props.impltype),
|
|
724
|
+
supertype: (0, _detachedNode.asDetachedNodeForCodeGen)(props.supertype)
|
|
669
725
|
});
|
|
670
726
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
671
727
|
return node;
|
|
@@ -674,12 +730,9 @@ function DeclareOpaqueType(props) {
|
|
|
674
730
|
function DeclareTypeAlias(props) {
|
|
675
731
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
676
732
|
type: 'DeclareTypeAlias',
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
|
|
681
|
-
// $FlowFixMe[incompatible-call],
|
|
682
|
-
right: (0, _detachedNode.asDetachedNode)(props.right)
|
|
733
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
734
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
735
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right)
|
|
683
736
|
});
|
|
684
737
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
685
738
|
return node;
|
|
@@ -688,8 +741,8 @@ function DeclareTypeAlias(props) {
|
|
|
688
741
|
function DeclareVariable(props) {
|
|
689
742
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
690
743
|
type: 'DeclareVariable',
|
|
691
|
-
|
|
692
|
-
|
|
744
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
745
|
+
kind: props.kind
|
|
693
746
|
});
|
|
694
747
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
695
748
|
return node;
|
|
@@ -698,10 +751,8 @@ function DeclareVariable(props) {
|
|
|
698
751
|
function DoWhileStatement(props) {
|
|
699
752
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
700
753
|
type: 'DoWhileStatement',
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
// $FlowFixMe[incompatible-call],
|
|
704
|
-
test: (0, _detachedNode.asDetachedNode)(props.test)
|
|
754
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
755
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test)
|
|
705
756
|
});
|
|
706
757
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
707
758
|
return node;
|
|
@@ -724,8 +775,7 @@ function EmptyTypeAnnotation(props = { ...null
|
|
|
724
775
|
function EnumBooleanBody(props) {
|
|
725
776
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
726
777
|
type: 'EnumBooleanBody',
|
|
727
|
-
|
|
728
|
-
members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
778
|
+
members: props.members.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
729
779
|
explicitType: props.explicitType,
|
|
730
780
|
hasUnknownMembers: props.hasUnknownMembers
|
|
731
781
|
});
|
|
@@ -736,10 +786,8 @@ function EnumBooleanBody(props) {
|
|
|
736
786
|
function EnumBooleanMember(props) {
|
|
737
787
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
738
788
|
type: 'EnumBooleanMember',
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
// $FlowFixMe[incompatible-call],
|
|
742
|
-
init: (0, _detachedNode.asDetachedNode)(props.init)
|
|
789
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
790
|
+
init: (0, _detachedNode.asDetachedNodeForCodeGen)(props.init)
|
|
743
791
|
});
|
|
744
792
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
745
793
|
return node;
|
|
@@ -748,10 +796,8 @@ function EnumBooleanMember(props) {
|
|
|
748
796
|
function EnumDeclaration(props) {
|
|
749
797
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
750
798
|
type: 'EnumDeclaration',
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
// $FlowFixMe[incompatible-call],
|
|
754
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
799
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
800
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
755
801
|
});
|
|
756
802
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
757
803
|
return node;
|
|
@@ -760,8 +806,7 @@ function EnumDeclaration(props) {
|
|
|
760
806
|
function EnumDefaultedMember(props) {
|
|
761
807
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
762
808
|
type: 'EnumDefaultedMember',
|
|
763
|
-
|
|
764
|
-
id: (0, _detachedNode.asDetachedNode)(props.id)
|
|
809
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id)
|
|
765
810
|
});
|
|
766
811
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
767
812
|
return node;
|
|
@@ -770,8 +815,7 @@ function EnumDefaultedMember(props) {
|
|
|
770
815
|
function EnumNumberBody(props) {
|
|
771
816
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
772
817
|
type: 'EnumNumberBody',
|
|
773
|
-
|
|
774
|
-
members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
818
|
+
members: props.members.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
775
819
|
explicitType: props.explicitType,
|
|
776
820
|
hasUnknownMembers: props.hasUnknownMembers
|
|
777
821
|
});
|
|
@@ -782,10 +826,8 @@ function EnumNumberBody(props) {
|
|
|
782
826
|
function EnumNumberMember(props) {
|
|
783
827
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
784
828
|
type: 'EnumNumberMember',
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
// $FlowFixMe[incompatible-call],
|
|
788
|
-
init: (0, _detachedNode.asDetachedNode)(props.init)
|
|
829
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
830
|
+
init: (0, _detachedNode.asDetachedNodeForCodeGen)(props.init)
|
|
789
831
|
});
|
|
790
832
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
791
833
|
return node;
|
|
@@ -794,8 +836,7 @@ function EnumNumberMember(props) {
|
|
|
794
836
|
function EnumStringBody(props) {
|
|
795
837
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
796
838
|
type: 'EnumStringBody',
|
|
797
|
-
|
|
798
|
-
members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
839
|
+
members: props.members.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
799
840
|
explicitType: props.explicitType,
|
|
800
841
|
hasUnknownMembers: props.hasUnknownMembers
|
|
801
842
|
});
|
|
@@ -806,10 +847,8 @@ function EnumStringBody(props) {
|
|
|
806
847
|
function EnumStringMember(props) {
|
|
807
848
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
808
849
|
type: 'EnumStringMember',
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
// $FlowFixMe[incompatible-call],
|
|
812
|
-
init: (0, _detachedNode.asDetachedNode)(props.init)
|
|
850
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
851
|
+
init: (0, _detachedNode.asDetachedNodeForCodeGen)(props.init)
|
|
813
852
|
});
|
|
814
853
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
815
854
|
return node;
|
|
@@ -818,8 +857,7 @@ function EnumStringMember(props) {
|
|
|
818
857
|
function EnumSymbolBody(props) {
|
|
819
858
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
820
859
|
type: 'EnumSymbolBody',
|
|
821
|
-
|
|
822
|
-
members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
860
|
+
members: props.members.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
823
861
|
hasUnknownMembers: props.hasUnknownMembers
|
|
824
862
|
});
|
|
825
863
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -836,10 +874,8 @@ function ExistsTypeAnnotation(props = { ...null
|
|
|
836
874
|
function ExportAllDeclaration(props) {
|
|
837
875
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
838
876
|
type: 'ExportAllDeclaration',
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
// $FlowFixMe[incompatible-call],
|
|
842
|
-
source: (0, _detachedNode.asDetachedNode)(props.source),
|
|
877
|
+
exported: (0, _detachedNode.asDetachedNodeForCodeGen)(props.exported),
|
|
878
|
+
source: (0, _detachedNode.asDetachedNodeForCodeGen)(props.source),
|
|
843
879
|
exportKind: props.exportKind
|
|
844
880
|
});
|
|
845
881
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -849,8 +885,7 @@ function ExportAllDeclaration(props) {
|
|
|
849
885
|
function ExportDefaultDeclaration(props) {
|
|
850
886
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
851
887
|
type: 'ExportDefaultDeclaration',
|
|
852
|
-
|
|
853
|
-
declaration: (0, _detachedNode.asDetachedNode)(props.declaration)
|
|
888
|
+
declaration: (0, _detachedNode.asDetachedNodeForCodeGen)(props.declaration)
|
|
854
889
|
});
|
|
855
890
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
856
891
|
return node;
|
|
@@ -859,10 +894,8 @@ function ExportDefaultDeclaration(props) {
|
|
|
859
894
|
function ExportSpecifier(props) {
|
|
860
895
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
861
896
|
type: 'ExportSpecifier',
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
// $FlowFixMe[incompatible-call],
|
|
865
|
-
local: (0, _detachedNode.asDetachedNode)(props.local)
|
|
897
|
+
exported: (0, _detachedNode.asDetachedNodeForCodeGen)(props.exported),
|
|
898
|
+
local: (0, _detachedNode.asDetachedNodeForCodeGen)(props.local)
|
|
866
899
|
});
|
|
867
900
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
868
901
|
return node;
|
|
@@ -871,8 +904,7 @@ function ExportSpecifier(props) {
|
|
|
871
904
|
function ExpressionStatement(props) {
|
|
872
905
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
873
906
|
type: 'ExpressionStatement',
|
|
874
|
-
|
|
875
|
-
expression: (0, _detachedNode.asDetachedNode)(props.expression),
|
|
907
|
+
expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression),
|
|
876
908
|
directive: props.directive
|
|
877
909
|
});
|
|
878
910
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -882,12 +914,9 @@ function ExpressionStatement(props) {
|
|
|
882
914
|
function ForInStatement(props) {
|
|
883
915
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
884
916
|
type: 'ForInStatement',
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
right: (0, _detachedNode.asDetachedNode)(props.right),
|
|
889
|
-
// $FlowFixMe[incompatible-call],
|
|
890
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
917
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
918
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right),
|
|
919
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
891
920
|
});
|
|
892
921
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
893
922
|
return node;
|
|
@@ -896,12 +925,9 @@ function ForInStatement(props) {
|
|
|
896
925
|
function ForOfStatement(props) {
|
|
897
926
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
898
927
|
type: 'ForOfStatement',
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
right: (0, _detachedNode.asDetachedNode)(props.right),
|
|
903
|
-
// $FlowFixMe[incompatible-call],
|
|
904
|
-
body: (0, _detachedNode.asDetachedNode)(props.body),
|
|
928
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
929
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right),
|
|
930
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
905
931
|
await: props.await
|
|
906
932
|
});
|
|
907
933
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -911,14 +937,10 @@ function ForOfStatement(props) {
|
|
|
911
937
|
function ForStatement(props) {
|
|
912
938
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
913
939
|
type: 'ForStatement',
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
// $FlowFixMe[incompatible-call],
|
|
919
|
-
update: (0, _detachedNode.asDetachedNode)(props.update),
|
|
920
|
-
// $FlowFixMe[incompatible-call],
|
|
921
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
940
|
+
init: (0, _detachedNode.asDetachedNodeForCodeGen)(props.init),
|
|
941
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test),
|
|
942
|
+
update: (0, _detachedNode.asDetachedNodeForCodeGen)(props.update),
|
|
943
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
922
944
|
});
|
|
923
945
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
924
946
|
return node;
|
|
@@ -927,18 +949,12 @@ function ForStatement(props) {
|
|
|
927
949
|
function FunctionDeclaration(props) {
|
|
928
950
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
929
951
|
type: 'FunctionDeclaration',
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
// $FlowFixMe[incompatible-call],
|
|
937
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
|
|
938
|
-
// $FlowFixMe[incompatible-call],
|
|
939
|
-
returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
|
|
940
|
-
// $FlowFixMe[incompatible-call],
|
|
941
|
-
predicate: (0, _detachedNode.asDetachedNode)(props.predicate),
|
|
952
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
953
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
954
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
955
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
956
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType),
|
|
957
|
+
predicate: (0, _detachedNode.asDetachedNodeForCodeGen)(props.predicate),
|
|
942
958
|
generator: props.generator,
|
|
943
959
|
async: props.async
|
|
944
960
|
});
|
|
@@ -949,18 +965,12 @@ function FunctionDeclaration(props) {
|
|
|
949
965
|
function FunctionExpression(props) {
|
|
950
966
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
951
967
|
type: 'FunctionExpression',
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
// $FlowFixMe[incompatible-call],
|
|
959
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
|
|
960
|
-
// $FlowFixMe[incompatible-call],
|
|
961
|
-
returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
|
|
962
|
-
// $FlowFixMe[incompatible-call],
|
|
963
|
-
predicate: (0, _detachedNode.asDetachedNode)(props.predicate),
|
|
968
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
969
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
970
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
971
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
972
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType),
|
|
973
|
+
predicate: (0, _detachedNode.asDetachedNodeForCodeGen)(props.predicate),
|
|
964
974
|
generator: props.generator,
|
|
965
975
|
async: props.async
|
|
966
976
|
});
|
|
@@ -971,16 +981,11 @@ function FunctionExpression(props) {
|
|
|
971
981
|
function FunctionTypeAnnotation(props) {
|
|
972
982
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
973
983
|
type: 'FunctionTypeAnnotation',
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
|
|
980
|
-
// $FlowFixMe[incompatible-call],
|
|
981
|
-
rest: (0, _detachedNode.asDetachedNode)(props.rest),
|
|
982
|
-
// $FlowFixMe[incompatible-call],
|
|
983
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
|
|
984
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
985
|
+
this: (0, _detachedNode.asDetachedNodeForCodeGen)(props.this),
|
|
986
|
+
returnType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.returnType),
|
|
987
|
+
rest: (0, _detachedNode.asDetachedNodeForCodeGen)(props.rest),
|
|
988
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters)
|
|
984
989
|
});
|
|
985
990
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
986
991
|
return node;
|
|
@@ -989,10 +994,8 @@ function FunctionTypeAnnotation(props) {
|
|
|
989
994
|
function FunctionTypeParam(props) {
|
|
990
995
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
991
996
|
type: 'FunctionTypeParam',
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
// $FlowFixMe[incompatible-call],
|
|
995
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation),
|
|
997
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name),
|
|
998
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation),
|
|
996
999
|
optional: props.optional
|
|
997
1000
|
});
|
|
998
1001
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1002,10 +1005,8 @@ function FunctionTypeParam(props) {
|
|
|
1002
1005
|
function GenericTypeAnnotation(props) {
|
|
1003
1006
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1004
1007
|
type: 'GenericTypeAnnotation',
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
// $FlowFixMe[incompatible-call],
|
|
1008
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
|
|
1008
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1009
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters)
|
|
1009
1010
|
});
|
|
1010
1011
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1011
1012
|
return node;
|
|
@@ -1014,12 +1015,9 @@ function GenericTypeAnnotation(props) {
|
|
|
1014
1015
|
function IfStatement(props) {
|
|
1015
1016
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1016
1017
|
type: 'IfStatement',
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
consequent: (0, _detachedNode.asDetachedNode)(props.consequent),
|
|
1021
|
-
// $FlowFixMe[incompatible-call],
|
|
1022
|
-
alternate: (0, _detachedNode.asDetachedNode)(props.alternate)
|
|
1018
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test),
|
|
1019
|
+
consequent: (0, _detachedNode.asDetachedNodeForCodeGen)(props.consequent),
|
|
1020
|
+
alternate: (0, _detachedNode.asDetachedNodeForCodeGen)(props.alternate)
|
|
1023
1021
|
});
|
|
1024
1022
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1025
1023
|
return node;
|
|
@@ -1028,10 +1026,8 @@ function IfStatement(props) {
|
|
|
1028
1026
|
function ImportAttribute(props) {
|
|
1029
1027
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1030
1028
|
type: 'ImportAttribute',
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
// $FlowFixMe[incompatible-call],
|
|
1034
|
-
value: (0, _detachedNode.asDetachedNode)(props.value)
|
|
1029
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1030
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value)
|
|
1035
1031
|
});
|
|
1036
1032
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1037
1033
|
return node;
|
|
@@ -1042,12 +1038,9 @@ function ImportDeclaration(props) {
|
|
|
1042
1038
|
|
|
1043
1039
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1044
1040
|
type: 'ImportDeclaration',
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
source: (0, _detachedNode.asDetachedNode)(props.source),
|
|
1049
|
-
// $FlowFixMe[incompatible-call],
|
|
1050
|
-
assertions: (_props$assertions = props.assertions) == null ? void 0 : _props$assertions.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1041
|
+
specifiers: props.specifiers.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1042
|
+
source: (0, _detachedNode.asDetachedNodeForCodeGen)(props.source),
|
|
1043
|
+
assertions: (_props$assertions = props.assertions) == null ? void 0 : _props$assertions.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1051
1044
|
importKind: props.importKind
|
|
1052
1045
|
});
|
|
1053
1046
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1057,8 +1050,7 @@ function ImportDeclaration(props) {
|
|
|
1057
1050
|
function ImportDefaultSpecifier(props) {
|
|
1058
1051
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1059
1052
|
type: 'ImportDefaultSpecifier',
|
|
1060
|
-
|
|
1061
|
-
local: (0, _detachedNode.asDetachedNode)(props.local)
|
|
1053
|
+
local: (0, _detachedNode.asDetachedNodeForCodeGen)(props.local)
|
|
1062
1054
|
});
|
|
1063
1055
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1064
1056
|
return node;
|
|
@@ -1067,10 +1059,8 @@ function ImportDefaultSpecifier(props) {
|
|
|
1067
1059
|
function ImportExpression(props) {
|
|
1068
1060
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1069
1061
|
type: 'ImportExpression',
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
// $FlowFixMe[incompatible-call],
|
|
1073
|
-
attributes: (0, _detachedNode.asDetachedNode)(props.attributes)
|
|
1062
|
+
source: (0, _detachedNode.asDetachedNodeForCodeGen)(props.source),
|
|
1063
|
+
attributes: (0, _detachedNode.asDetachedNodeForCodeGen)(props.attributes)
|
|
1074
1064
|
});
|
|
1075
1065
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1076
1066
|
return node;
|
|
@@ -1079,8 +1069,7 @@ function ImportExpression(props) {
|
|
|
1079
1069
|
function ImportNamespaceSpecifier(props) {
|
|
1080
1070
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1081
1071
|
type: 'ImportNamespaceSpecifier',
|
|
1082
|
-
|
|
1083
|
-
local: (0, _detachedNode.asDetachedNode)(props.local)
|
|
1072
|
+
local: (0, _detachedNode.asDetachedNodeForCodeGen)(props.local)
|
|
1084
1073
|
});
|
|
1085
1074
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1086
1075
|
return node;
|
|
@@ -1089,10 +1078,8 @@ function ImportNamespaceSpecifier(props) {
|
|
|
1089
1078
|
function ImportSpecifier(props) {
|
|
1090
1079
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1091
1080
|
type: 'ImportSpecifier',
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
// $FlowFixMe[incompatible-call],
|
|
1095
|
-
local: (0, _detachedNode.asDetachedNode)(props.local),
|
|
1081
|
+
imported: (0, _detachedNode.asDetachedNodeForCodeGen)(props.imported),
|
|
1082
|
+
local: (0, _detachedNode.asDetachedNodeForCodeGen)(props.local),
|
|
1096
1083
|
importKind: props.importKind
|
|
1097
1084
|
});
|
|
1098
1085
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1102,10 +1089,8 @@ function ImportSpecifier(props) {
|
|
|
1102
1089
|
function IndexedAccessType(props) {
|
|
1103
1090
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1104
1091
|
type: 'IndexedAccessType',
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
// $FlowFixMe[incompatible-call],
|
|
1108
|
-
indexType: (0, _detachedNode.asDetachedNode)(props.indexType)
|
|
1092
|
+
objectType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.objectType),
|
|
1093
|
+
indexType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.indexType)
|
|
1109
1094
|
});
|
|
1110
1095
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1111
1096
|
return node;
|
|
@@ -1118,17 +1103,22 @@ function InferredPredicate(props = { ...null
|
|
|
1118
1103
|
});
|
|
1119
1104
|
}
|
|
1120
1105
|
|
|
1106
|
+
function InferTypeAnnotation(props) {
|
|
1107
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1108
|
+
type: 'InferTypeAnnotation',
|
|
1109
|
+
typeParameter: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameter)
|
|
1110
|
+
});
|
|
1111
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1112
|
+
return node;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1121
1115
|
function InterfaceDeclaration(props) {
|
|
1122
1116
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1123
1117
|
type: 'InterfaceDeclaration',
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
// $FlowFixMe[incompatible-call],
|
|
1129
|
-
extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1130
|
-
// $FlowFixMe[incompatible-call],
|
|
1131
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
1118
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1119
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
1120
|
+
extends: props.extends.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1121
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
1132
1122
|
});
|
|
1133
1123
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1134
1124
|
return node;
|
|
@@ -1137,10 +1127,8 @@ function InterfaceDeclaration(props) {
|
|
|
1137
1127
|
function InterfaceExtends(props) {
|
|
1138
1128
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1139
1129
|
type: 'InterfaceExtends',
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
// $FlowFixMe[incompatible-call],
|
|
1143
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
|
|
1130
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1131
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters)
|
|
1144
1132
|
});
|
|
1145
1133
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1146
1134
|
return node;
|
|
@@ -1149,10 +1137,8 @@ function InterfaceExtends(props) {
|
|
|
1149
1137
|
function InterfaceTypeAnnotation(props) {
|
|
1150
1138
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1151
1139
|
type: 'InterfaceTypeAnnotation',
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
// $FlowFixMe[incompatible-call],
|
|
1155
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
1140
|
+
extends: props.extends.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1141
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
1156
1142
|
});
|
|
1157
1143
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1158
1144
|
return node;
|
|
@@ -1161,8 +1147,7 @@ function InterfaceTypeAnnotation(props) {
|
|
|
1161
1147
|
function IntersectionTypeAnnotation(props) {
|
|
1162
1148
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1163
1149
|
type: 'IntersectionTypeAnnotation',
|
|
1164
|
-
|
|
1165
|
-
types: props.types.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1150
|
+
types: props.types.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1166
1151
|
});
|
|
1167
1152
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1168
1153
|
return node;
|
|
@@ -1171,10 +1156,8 @@ function IntersectionTypeAnnotation(props) {
|
|
|
1171
1156
|
function JSXAttribute(props) {
|
|
1172
1157
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1173
1158
|
type: 'JSXAttribute',
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
// $FlowFixMe[incompatible-call],
|
|
1177
|
-
value: (0, _detachedNode.asDetachedNode)(props.value)
|
|
1159
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name),
|
|
1160
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value)
|
|
1178
1161
|
});
|
|
1179
1162
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1180
1163
|
return node;
|
|
@@ -1183,8 +1166,7 @@ function JSXAttribute(props) {
|
|
|
1183
1166
|
function JSXClosingElement(props) {
|
|
1184
1167
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1185
1168
|
type: 'JSXClosingElement',
|
|
1186
|
-
|
|
1187
|
-
name: (0, _detachedNode.asDetachedNode)(props.name)
|
|
1169
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name)
|
|
1188
1170
|
});
|
|
1189
1171
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1190
1172
|
return node;
|
|
@@ -1200,12 +1182,9 @@ function JSXClosingFragment(props = { ...null
|
|
|
1200
1182
|
function JSXElement(props) {
|
|
1201
1183
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1202
1184
|
type: 'JSXElement',
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
children: props.children.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1207
|
-
// $FlowFixMe[incompatible-call],
|
|
1208
|
-
closingElement: (0, _detachedNode.asDetachedNode)(props.closingElement)
|
|
1185
|
+
openingElement: (0, _detachedNode.asDetachedNodeForCodeGen)(props.openingElement),
|
|
1186
|
+
children: props.children.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1187
|
+
closingElement: (0, _detachedNode.asDetachedNodeForCodeGen)(props.closingElement)
|
|
1209
1188
|
});
|
|
1210
1189
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1211
1190
|
return node;
|
|
@@ -1221,8 +1200,7 @@ function JSXEmptyExpression(props = { ...null
|
|
|
1221
1200
|
function JSXExpressionContainer(props) {
|
|
1222
1201
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1223
1202
|
type: 'JSXExpressionContainer',
|
|
1224
|
-
|
|
1225
|
-
expression: (0, _detachedNode.asDetachedNode)(props.expression)
|
|
1203
|
+
expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression)
|
|
1226
1204
|
});
|
|
1227
1205
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1228
1206
|
return node;
|
|
@@ -1231,12 +1209,9 @@ function JSXExpressionContainer(props) {
|
|
|
1231
1209
|
function JSXFragment(props) {
|
|
1232
1210
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1233
1211
|
type: 'JSXFragment',
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
children: props.children.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1238
|
-
// $FlowFixMe[incompatible-call],
|
|
1239
|
-
closingFragment: (0, _detachedNode.asDetachedNode)(props.closingFragment)
|
|
1212
|
+
openingFragment: (0, _detachedNode.asDetachedNodeForCodeGen)(props.openingFragment),
|
|
1213
|
+
children: props.children.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1214
|
+
closingFragment: (0, _detachedNode.asDetachedNodeForCodeGen)(props.closingFragment)
|
|
1240
1215
|
});
|
|
1241
1216
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1242
1217
|
return node;
|
|
@@ -1254,10 +1229,8 @@ function JSXIdentifier(props) {
|
|
|
1254
1229
|
function JSXMemberExpression(props) {
|
|
1255
1230
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1256
1231
|
type: 'JSXMemberExpression',
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
// $FlowFixMe[incompatible-call],
|
|
1260
|
-
property: (0, _detachedNode.asDetachedNode)(props.property)
|
|
1232
|
+
object: (0, _detachedNode.asDetachedNodeForCodeGen)(props.object),
|
|
1233
|
+
property: (0, _detachedNode.asDetachedNodeForCodeGen)(props.property)
|
|
1261
1234
|
});
|
|
1262
1235
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1263
1236
|
return node;
|
|
@@ -1266,10 +1239,8 @@ function JSXMemberExpression(props) {
|
|
|
1266
1239
|
function JSXNamespacedName(props) {
|
|
1267
1240
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1268
1241
|
type: 'JSXNamespacedName',
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
// $FlowFixMe[incompatible-call],
|
|
1272
|
-
name: (0, _detachedNode.asDetachedNode)(props.name)
|
|
1242
|
+
namespace: (0, _detachedNode.asDetachedNodeForCodeGen)(props.namespace),
|
|
1243
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name)
|
|
1273
1244
|
});
|
|
1274
1245
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1275
1246
|
return node;
|
|
@@ -1278,11 +1249,10 @@ function JSXNamespacedName(props) {
|
|
|
1278
1249
|
function JSXOpeningElement(props) {
|
|
1279
1250
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1280
1251
|
type: 'JSXOpeningElement',
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
selfClosing: props.selfClosing
|
|
1252
|
+
name: (0, _detachedNode.asDetachedNodeForCodeGen)(props.name),
|
|
1253
|
+
attributes: props.attributes.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1254
|
+
selfClosing: props.selfClosing,
|
|
1255
|
+
typeArguments: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeArguments)
|
|
1286
1256
|
});
|
|
1287
1257
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1288
1258
|
return node;
|
|
@@ -1298,8 +1268,7 @@ function JSXOpeningFragment(props = { ...null
|
|
|
1298
1268
|
function JSXSpreadAttribute(props) {
|
|
1299
1269
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1300
1270
|
type: 'JSXSpreadAttribute',
|
|
1301
|
-
|
|
1302
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1271
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1303
1272
|
});
|
|
1304
1273
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1305
1274
|
return node;
|
|
@@ -1308,8 +1277,7 @@ function JSXSpreadAttribute(props) {
|
|
|
1308
1277
|
function JSXSpreadChild(props) {
|
|
1309
1278
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1310
1279
|
type: 'JSXSpreadChild',
|
|
1311
|
-
|
|
1312
|
-
expression: (0, _detachedNode.asDetachedNode)(props.expression)
|
|
1280
|
+
expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression)
|
|
1313
1281
|
});
|
|
1314
1282
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1315
1283
|
return node;
|
|
@@ -1325,39 +1293,31 @@ function JSXText(props) {
|
|
|
1325
1293
|
return node;
|
|
1326
1294
|
}
|
|
1327
1295
|
|
|
1328
|
-
function
|
|
1296
|
+
function KeyofTypeAnnotation(props) {
|
|
1329
1297
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1330
|
-
type: '
|
|
1331
|
-
|
|
1332
|
-
label: (0, _detachedNode.asDetachedNode)(props.label),
|
|
1333
|
-
// $FlowFixMe[incompatible-call],
|
|
1334
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
1298
|
+
type: 'KeyofTypeAnnotation',
|
|
1299
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1335
1300
|
});
|
|
1336
1301
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1337
1302
|
return node;
|
|
1338
1303
|
}
|
|
1339
1304
|
|
|
1340
|
-
function
|
|
1305
|
+
function LabeledStatement(props) {
|
|
1341
1306
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1342
|
-
type: '
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
// $FlowFixMe[incompatible-call],
|
|
1346
|
-
right: (0, _detachedNode.asDetachedNode)(props.right),
|
|
1347
|
-
operator: props.operator
|
|
1307
|
+
type: 'LabeledStatement',
|
|
1308
|
+
label: (0, _detachedNode.asDetachedNodeForCodeGen)(props.label),
|
|
1309
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
1348
1310
|
});
|
|
1349
1311
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1350
1312
|
return node;
|
|
1351
1313
|
}
|
|
1352
1314
|
|
|
1353
|
-
function
|
|
1315
|
+
function LogicalExpression(props) {
|
|
1354
1316
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1355
|
-
type: '
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
property: (0, _detachedNode.asDetachedNode)(props.property),
|
|
1360
|
-
computed: props.computed
|
|
1317
|
+
type: 'LogicalExpression',
|
|
1318
|
+
left: (0, _detachedNode.asDetachedNodeForCodeGen)(props.left),
|
|
1319
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right),
|
|
1320
|
+
operator: props.operator
|
|
1361
1321
|
});
|
|
1362
1322
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1363
1323
|
return node;
|
|
@@ -1366,10 +1326,8 @@ function MemberExpression(props) {
|
|
|
1366
1326
|
function MetaProperty(props) {
|
|
1367
1327
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1368
1328
|
type: 'MetaProperty',
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
// $FlowFixMe[incompatible-call],
|
|
1372
|
-
property: (0, _detachedNode.asDetachedNode)(props.property)
|
|
1329
|
+
meta: (0, _detachedNode.asDetachedNodeForCodeGen)(props.meta),
|
|
1330
|
+
property: (0, _detachedNode.asDetachedNodeForCodeGen)(props.property)
|
|
1373
1331
|
});
|
|
1374
1332
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1375
1333
|
return node;
|
|
@@ -1378,10 +1336,8 @@ function MetaProperty(props) {
|
|
|
1378
1336
|
function MethodDefinition(props) {
|
|
1379
1337
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1380
1338
|
type: 'MethodDefinition',
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
// $FlowFixMe[incompatible-call],
|
|
1384
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1339
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1340
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1385
1341
|
kind: props.kind,
|
|
1386
1342
|
computed: props.computed,
|
|
1387
1343
|
static: props.static
|
|
@@ -1400,12 +1356,9 @@ function MixedTypeAnnotation(props = { ...null
|
|
|
1400
1356
|
function NewExpression(props) {
|
|
1401
1357
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1402
1358
|
type: 'NewExpression',
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
typeArguments: (0, _detachedNode.asDetachedNode)(props.typeArguments),
|
|
1407
|
-
// $FlowFixMe[incompatible-call],
|
|
1408
|
-
arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1359
|
+
callee: (0, _detachedNode.asDetachedNodeForCodeGen)(props.callee),
|
|
1360
|
+
typeArguments: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeArguments),
|
|
1361
|
+
arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1409
1362
|
});
|
|
1410
1363
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1411
1364
|
return node;
|
|
@@ -1414,8 +1367,7 @@ function NewExpression(props) {
|
|
|
1414
1367
|
function NullableTypeAnnotation(props) {
|
|
1415
1368
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1416
1369
|
type: 'NullableTypeAnnotation',
|
|
1417
|
-
|
|
1418
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
1370
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
1419
1371
|
});
|
|
1420
1372
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1421
1373
|
return node;
|
|
@@ -1448,8 +1400,7 @@ function NumberTypeAnnotation(props = { ...null
|
|
|
1448
1400
|
function ObjectExpression(props) {
|
|
1449
1401
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1450
1402
|
type: 'ObjectExpression',
|
|
1451
|
-
|
|
1452
|
-
properties: props.properties.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1403
|
+
properties: props.properties.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1453
1404
|
});
|
|
1454
1405
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1455
1406
|
return node;
|
|
@@ -1458,10 +1409,8 @@ function ObjectExpression(props) {
|
|
|
1458
1409
|
function ObjectPattern(props) {
|
|
1459
1410
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1460
1411
|
type: 'ObjectPattern',
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
// $FlowFixMe[incompatible-call],
|
|
1464
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
1412
|
+
properties: props.properties.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1413
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
1465
1414
|
});
|
|
1466
1415
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1467
1416
|
return node;
|
|
@@ -1470,14 +1419,10 @@ function ObjectPattern(props) {
|
|
|
1470
1419
|
function ObjectTypeAnnotation(props) {
|
|
1471
1420
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1472
1421
|
type: 'ObjectTypeAnnotation',
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
// $FlowFixMe[incompatible-call],
|
|
1478
|
-
callProperties: props.callProperties.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1479
|
-
// $FlowFixMe[incompatible-call],
|
|
1480
|
-
internalSlots: props.internalSlots.map(n => (0, _detachedNode.asDetachedNode)(n)),
|
|
1422
|
+
properties: props.properties.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1423
|
+
indexers: props.indexers.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1424
|
+
callProperties: props.callProperties.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1425
|
+
internalSlots: props.internalSlots.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1481
1426
|
inexact: props.inexact,
|
|
1482
1427
|
exact: props.exact
|
|
1483
1428
|
});
|
|
@@ -1488,8 +1433,7 @@ function ObjectTypeAnnotation(props) {
|
|
|
1488
1433
|
function ObjectTypeCallProperty(props) {
|
|
1489
1434
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1490
1435
|
type: 'ObjectTypeCallProperty',
|
|
1491
|
-
|
|
1492
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1436
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1493
1437
|
static: props.static
|
|
1494
1438
|
});
|
|
1495
1439
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1499,15 +1443,11 @@ function ObjectTypeCallProperty(props) {
|
|
|
1499
1443
|
function ObjectTypeIndexer(props) {
|
|
1500
1444
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1501
1445
|
type: 'ObjectTypeIndexer',
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
key: (0, _detachedNode.asDetachedNode)(props.key),
|
|
1506
|
-
// $FlowFixMe[incompatible-call],
|
|
1507
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1446
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1447
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1448
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1508
1449
|
static: props.static,
|
|
1509
|
-
|
|
1510
|
-
variance: (0, _detachedNode.asDetachedNode)(props.variance)
|
|
1450
|
+
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance)
|
|
1511
1451
|
});
|
|
1512
1452
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1513
1453
|
return node;
|
|
@@ -1516,10 +1456,8 @@ function ObjectTypeIndexer(props) {
|
|
|
1516
1456
|
function ObjectTypeInternalSlot(props) {
|
|
1517
1457
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1518
1458
|
type: 'ObjectTypeInternalSlot',
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
// $FlowFixMe[incompatible-call],
|
|
1522
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1459
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1460
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1523
1461
|
optional: props.optional,
|
|
1524
1462
|
static: props.static,
|
|
1525
1463
|
method: props.method
|
|
@@ -1528,11 +1466,23 @@ function ObjectTypeInternalSlot(props) {
|
|
|
1528
1466
|
return node;
|
|
1529
1467
|
}
|
|
1530
1468
|
|
|
1469
|
+
function ObjectTypeMappedTypeProperty(props) {
|
|
1470
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1471
|
+
type: 'ObjectTypeMappedTypeProperty',
|
|
1472
|
+
keyTparam: (0, _detachedNode.asDetachedNodeForCodeGen)(props.keyTparam),
|
|
1473
|
+
propType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.propType),
|
|
1474
|
+
sourceType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.sourceType),
|
|
1475
|
+
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance),
|
|
1476
|
+
optional: props.optional
|
|
1477
|
+
});
|
|
1478
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1479
|
+
return node;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1531
1482
|
function ObjectTypeSpreadProperty(props) {
|
|
1532
1483
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1533
1484
|
type: 'ObjectTypeSpreadProperty',
|
|
1534
|
-
|
|
1535
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1485
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1536
1486
|
});
|
|
1537
1487
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1538
1488
|
return node;
|
|
@@ -1541,14 +1491,10 @@ function ObjectTypeSpreadProperty(props) {
|
|
|
1541
1491
|
function OpaqueType(props) {
|
|
1542
1492
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1543
1493
|
type: 'OpaqueType',
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
// $FlowFixMe[incompatible-call],
|
|
1549
|
-
impltype: (0, _detachedNode.asDetachedNode)(props.impltype),
|
|
1550
|
-
// $FlowFixMe[incompatible-call],
|
|
1551
|
-
supertype: (0, _detachedNode.asDetachedNode)(props.supertype)
|
|
1494
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1495
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
1496
|
+
impltype: (0, _detachedNode.asDetachedNodeForCodeGen)(props.impltype),
|
|
1497
|
+
supertype: (0, _detachedNode.asDetachedNodeForCodeGen)(props.supertype)
|
|
1552
1498
|
});
|
|
1553
1499
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1554
1500
|
return node;
|
|
@@ -1557,10 +1503,8 @@ function OpaqueType(props) {
|
|
|
1557
1503
|
function OptionalIndexedAccessType(props) {
|
|
1558
1504
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1559
1505
|
type: 'OptionalIndexedAccessType',
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
// $FlowFixMe[incompatible-call],
|
|
1563
|
-
indexType: (0, _detachedNode.asDetachedNode)(props.indexType),
|
|
1506
|
+
objectType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.objectType),
|
|
1507
|
+
indexType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.indexType),
|
|
1564
1508
|
optional: props.optional
|
|
1565
1509
|
});
|
|
1566
1510
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1579,10 +1523,8 @@ function PrivateIdentifier(props) {
|
|
|
1579
1523
|
function Property(props) {
|
|
1580
1524
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1581
1525
|
type: 'Property',
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
// $FlowFixMe[incompatible-call],
|
|
1585
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1526
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1527
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1586
1528
|
kind: props.kind,
|
|
1587
1529
|
computed: props.computed,
|
|
1588
1530
|
method: props.method,
|
|
@@ -1595,20 +1537,15 @@ function Property(props) {
|
|
|
1595
1537
|
function PropertyDefinition(props) {
|
|
1596
1538
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1597
1539
|
type: 'PropertyDefinition',
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
// $FlowFixMe[incompatible-call],
|
|
1601
|
-
value: (0, _detachedNode.asDetachedNode)(props.value),
|
|
1540
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1541
|
+
value: (0, _detachedNode.asDetachedNodeForCodeGen)(props.value),
|
|
1602
1542
|
computed: props.computed,
|
|
1603
1543
|
static: props.static,
|
|
1604
1544
|
declare: props.declare,
|
|
1605
1545
|
optional: props.optional,
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation),
|
|
1610
|
-
// $FlowFixMe[incompatible-call],
|
|
1611
|
-
tsModifiers: (0, _detachedNode.asDetachedNode)(props.tsModifiers)
|
|
1546
|
+
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance),
|
|
1547
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation),
|
|
1548
|
+
tsModifiers: (0, _detachedNode.asDetachedNodeForCodeGen)(props.tsModifiers)
|
|
1612
1549
|
});
|
|
1613
1550
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1614
1551
|
return node;
|
|
@@ -1617,10 +1554,18 @@ function PropertyDefinition(props) {
|
|
|
1617
1554
|
function QualifiedTypeIdentifier(props) {
|
|
1618
1555
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1619
1556
|
type: 'QualifiedTypeIdentifier',
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1557
|
+
qualification: (0, _detachedNode.asDetachedNodeForCodeGen)(props.qualification),
|
|
1558
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id)
|
|
1559
|
+
});
|
|
1560
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1561
|
+
return node;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
function QualifiedTypeofIdentifier(props) {
|
|
1565
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1566
|
+
type: 'QualifiedTypeofIdentifier',
|
|
1567
|
+
qualification: (0, _detachedNode.asDetachedNodeForCodeGen)(props.qualification),
|
|
1568
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id)
|
|
1624
1569
|
});
|
|
1625
1570
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1626
1571
|
return node;
|
|
@@ -1629,8 +1574,7 @@ function QualifiedTypeIdentifier(props) {
|
|
|
1629
1574
|
function RestElement(props) {
|
|
1630
1575
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1631
1576
|
type: 'RestElement',
|
|
1632
|
-
|
|
1633
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1577
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1634
1578
|
});
|
|
1635
1579
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1636
1580
|
return node;
|
|
@@ -1639,8 +1583,7 @@ function RestElement(props) {
|
|
|
1639
1583
|
function ReturnStatement(props) {
|
|
1640
1584
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1641
1585
|
type: 'ReturnStatement',
|
|
1642
|
-
|
|
1643
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1586
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1644
1587
|
});
|
|
1645
1588
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1646
1589
|
return node;
|
|
@@ -1649,8 +1592,7 @@ function ReturnStatement(props) {
|
|
|
1649
1592
|
function SequenceExpression(props) {
|
|
1650
1593
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1651
1594
|
type: 'SequenceExpression',
|
|
1652
|
-
|
|
1653
|
-
expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1595
|
+
expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1654
1596
|
});
|
|
1655
1597
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1656
1598
|
return node;
|
|
@@ -1659,8 +1601,7 @@ function SequenceExpression(props) {
|
|
|
1659
1601
|
function SpreadElement(props) {
|
|
1660
1602
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1661
1603
|
type: 'SpreadElement',
|
|
1662
|
-
|
|
1663
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1604
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1664
1605
|
});
|
|
1665
1606
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1666
1607
|
return node;
|
|
@@ -1693,10 +1634,8 @@ function Super(props = { ...null
|
|
|
1693
1634
|
function SwitchCase(props) {
|
|
1694
1635
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1695
1636
|
type: 'SwitchCase',
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
// $FlowFixMe[incompatible-call],
|
|
1699
|
-
consequent: props.consequent.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1637
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test),
|
|
1638
|
+
consequent: props.consequent.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1700
1639
|
});
|
|
1701
1640
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1702
1641
|
return node;
|
|
@@ -1705,10 +1644,8 @@ function SwitchCase(props) {
|
|
|
1705
1644
|
function SwitchStatement(props) {
|
|
1706
1645
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1707
1646
|
type: 'SwitchStatement',
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
// $FlowFixMe[incompatible-call],
|
|
1711
|
-
cases: props.cases.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1647
|
+
discriminant: (0, _detachedNode.asDetachedNodeForCodeGen)(props.discriminant),
|
|
1648
|
+
cases: props.cases.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1712
1649
|
});
|
|
1713
1650
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1714
1651
|
return node;
|
|
@@ -1724,10 +1661,8 @@ function SymbolTypeAnnotation(props = { ...null
|
|
|
1724
1661
|
function TaggedTemplateExpression(props) {
|
|
1725
1662
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1726
1663
|
type: 'TaggedTemplateExpression',
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
// $FlowFixMe[incompatible-call],
|
|
1730
|
-
quasi: (0, _detachedNode.asDetachedNode)(props.quasi)
|
|
1664
|
+
tag: (0, _detachedNode.asDetachedNodeForCodeGen)(props.tag),
|
|
1665
|
+
quasi: (0, _detachedNode.asDetachedNodeForCodeGen)(props.quasi)
|
|
1731
1666
|
});
|
|
1732
1667
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1733
1668
|
return node;
|
|
@@ -1736,10 +1671,8 @@ function TaggedTemplateExpression(props) {
|
|
|
1736
1671
|
function TemplateLiteral(props) {
|
|
1737
1672
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1738
1673
|
type: 'TemplateLiteral',
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
// $FlowFixMe[incompatible-call],
|
|
1742
|
-
expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1674
|
+
quasis: props.quasis.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1675
|
+
expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1743
1676
|
});
|
|
1744
1677
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1745
1678
|
return node;
|
|
@@ -1762,8 +1695,7 @@ function ThisTypeAnnotation(props = { ...null
|
|
|
1762
1695
|
function ThrowStatement(props) {
|
|
1763
1696
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1764
1697
|
type: 'ThrowStatement',
|
|
1765
|
-
|
|
1766
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1698
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1767
1699
|
});
|
|
1768
1700
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1769
1701
|
return node;
|
|
@@ -1772,12 +1704,9 @@ function ThrowStatement(props) {
|
|
|
1772
1704
|
function TryStatement(props) {
|
|
1773
1705
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1774
1706
|
type: 'TryStatement',
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
handler: (0, _detachedNode.asDetachedNode)(props.handler),
|
|
1779
|
-
// $FlowFixMe[incompatible-call],
|
|
1780
|
-
finalizer: (0, _detachedNode.asDetachedNode)(props.finalizer)
|
|
1707
|
+
block: (0, _detachedNode.asDetachedNodeForCodeGen)(props.block),
|
|
1708
|
+
handler: (0, _detachedNode.asDetachedNodeForCodeGen)(props.handler),
|
|
1709
|
+
finalizer: (0, _detachedNode.asDetachedNodeForCodeGen)(props.finalizer)
|
|
1781
1710
|
});
|
|
1782
1711
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1783
1712
|
return node;
|
|
@@ -1786,8 +1715,29 @@ function TryStatement(props) {
|
|
|
1786
1715
|
function TupleTypeAnnotation(props) {
|
|
1787
1716
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1788
1717
|
type: 'TupleTypeAnnotation',
|
|
1789
|
-
|
|
1790
|
-
|
|
1718
|
+
types: props.types.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1719
|
+
});
|
|
1720
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1721
|
+
return node;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
function TupleTypeLabeledElement(props) {
|
|
1725
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1726
|
+
type: 'TupleTypeLabeledElement',
|
|
1727
|
+
label: (0, _detachedNode.asDetachedNodeForCodeGen)(props.label),
|
|
1728
|
+
elementType: (0, _detachedNode.asDetachedNodeForCodeGen)(props.elementType),
|
|
1729
|
+
optional: props.optional,
|
|
1730
|
+
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance)
|
|
1731
|
+
});
|
|
1732
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1733
|
+
return node;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
function TupleTypeSpreadElement(props) {
|
|
1737
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1738
|
+
type: 'TupleTypeSpreadElement',
|
|
1739
|
+
label: (0, _detachedNode.asDetachedNodeForCodeGen)(props.label),
|
|
1740
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
1791
1741
|
});
|
|
1792
1742
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1793
1743
|
return node;
|
|
@@ -1796,12 +1746,9 @@ function TupleTypeAnnotation(props) {
|
|
|
1796
1746
|
function TypeAlias(props) {
|
|
1797
1747
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1798
1748
|
type: 'TypeAlias',
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
|
|
1803
|
-
// $FlowFixMe[incompatible-call],
|
|
1804
|
-
right: (0, _detachedNode.asDetachedNode)(props.right)
|
|
1749
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1750
|
+
typeParameters: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeParameters),
|
|
1751
|
+
right: (0, _detachedNode.asDetachedNodeForCodeGen)(props.right)
|
|
1805
1752
|
});
|
|
1806
1753
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1807
1754
|
return node;
|
|
@@ -1810,8 +1757,7 @@ function TypeAlias(props) {
|
|
|
1810
1757
|
function TypeAnnotation(props) {
|
|
1811
1758
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1812
1759
|
type: 'TypeAnnotation',
|
|
1813
|
-
|
|
1814
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
1760
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
1815
1761
|
});
|
|
1816
1762
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1817
1763
|
return node;
|
|
@@ -1820,10 +1766,8 @@ function TypeAnnotation(props) {
|
|
|
1820
1766
|
function TypeCastExpression(props) {
|
|
1821
1767
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1822
1768
|
type: 'TypeCastExpression',
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
// $FlowFixMe[incompatible-call],
|
|
1826
|
-
typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
|
|
1769
|
+
expression: (0, _detachedNode.asDetachedNodeForCodeGen)(props.expression),
|
|
1770
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation)
|
|
1827
1771
|
});
|
|
1828
1772
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1829
1773
|
return node;
|
|
@@ -1832,8 +1776,7 @@ function TypeCastExpression(props) {
|
|
|
1832
1776
|
function TypeofTypeAnnotation(props) {
|
|
1833
1777
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1834
1778
|
type: 'TypeofTypeAnnotation',
|
|
1835
|
-
|
|
1836
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument)
|
|
1779
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1837
1780
|
});
|
|
1838
1781
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1839
1782
|
return node;
|
|
@@ -1843,12 +1786,9 @@ function TypeParameter(props) {
|
|
|
1843
1786
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1844
1787
|
type: 'TypeParameter',
|
|
1845
1788
|
name: props.name,
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
variance: (0, _detachedNode.asDetachedNode)(props.variance),
|
|
1850
|
-
// $FlowFixMe[incompatible-call],
|
|
1851
|
-
default: (0, _detachedNode.asDetachedNode)(props.default)
|
|
1789
|
+
bound: (0, _detachedNode.asDetachedNodeForCodeGen)(props.bound),
|
|
1790
|
+
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance),
|
|
1791
|
+
default: (0, _detachedNode.asDetachedNodeForCodeGen)(props.default)
|
|
1852
1792
|
});
|
|
1853
1793
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1854
1794
|
return node;
|
|
@@ -1857,8 +1797,7 @@ function TypeParameter(props) {
|
|
|
1857
1797
|
function TypeParameterDeclaration(props) {
|
|
1858
1798
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1859
1799
|
type: 'TypeParameterDeclaration',
|
|
1860
|
-
|
|
1861
|
-
params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1800
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1862
1801
|
});
|
|
1863
1802
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1864
1803
|
return node;
|
|
@@ -1867,8 +1806,18 @@ function TypeParameterDeclaration(props) {
|
|
|
1867
1806
|
function TypeParameterInstantiation(props) {
|
|
1868
1807
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1869
1808
|
type: 'TypeParameterInstantiation',
|
|
1870
|
-
|
|
1871
|
-
|
|
1809
|
+
params: props.params.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1810
|
+
});
|
|
1811
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1812
|
+
return node;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
function TypePredicate(props) {
|
|
1816
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1817
|
+
type: 'TypePredicate',
|
|
1818
|
+
parameterName: (0, _detachedNode.asDetachedNodeForCodeGen)(props.parameterName),
|
|
1819
|
+
typeAnnotation: (0, _detachedNode.asDetachedNodeForCodeGen)(props.typeAnnotation),
|
|
1820
|
+
asserts: props.asserts
|
|
1872
1821
|
});
|
|
1873
1822
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1874
1823
|
return node;
|
|
@@ -1878,8 +1827,7 @@ function UnaryExpression(props) {
|
|
|
1878
1827
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1879
1828
|
type: 'UnaryExpression',
|
|
1880
1829
|
operator: props.operator,
|
|
1881
|
-
|
|
1882
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument),
|
|
1830
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1883
1831
|
prefix: props.prefix
|
|
1884
1832
|
});
|
|
1885
1833
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1889,8 +1837,7 @@ function UnaryExpression(props) {
|
|
|
1889
1837
|
function UnionTypeAnnotation(props) {
|
|
1890
1838
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1891
1839
|
type: 'UnionTypeAnnotation',
|
|
1892
|
-
|
|
1893
|
-
types: props.types.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1840
|
+
types: props.types.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1894
1841
|
});
|
|
1895
1842
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1896
1843
|
return node;
|
|
@@ -1900,8 +1847,7 @@ function UpdateExpression(props) {
|
|
|
1900
1847
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1901
1848
|
type: 'UpdateExpression',
|
|
1902
1849
|
operator: props.operator,
|
|
1903
|
-
|
|
1904
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument),
|
|
1850
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1905
1851
|
prefix: props.prefix
|
|
1906
1852
|
});
|
|
1907
1853
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
@@ -1912,8 +1858,7 @@ function VariableDeclaration(props) {
|
|
|
1912
1858
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1913
1859
|
type: 'VariableDeclaration',
|
|
1914
1860
|
kind: props.kind,
|
|
1915
|
-
|
|
1916
|
-
declarations: props.declarations.map(n => (0, _detachedNode.asDetachedNode)(n))
|
|
1861
|
+
declarations: props.declarations.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1917
1862
|
});
|
|
1918
1863
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1919
1864
|
return node;
|
|
@@ -1922,10 +1867,8 @@ function VariableDeclaration(props) {
|
|
|
1922
1867
|
function VariableDeclarator(props) {
|
|
1923
1868
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1924
1869
|
type: 'VariableDeclarator',
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
// $FlowFixMe[incompatible-call],
|
|
1928
|
-
id: (0, _detachedNode.asDetachedNode)(props.id)
|
|
1870
|
+
init: (0, _detachedNode.asDetachedNodeForCodeGen)(props.init),
|
|
1871
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id)
|
|
1929
1872
|
});
|
|
1930
1873
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1931
1874
|
return node;
|
|
@@ -1950,10 +1893,8 @@ function VoidTypeAnnotation(props = { ...null
|
|
|
1950
1893
|
function WhileStatement(props) {
|
|
1951
1894
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1952
1895
|
type: 'WhileStatement',
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
// $FlowFixMe[incompatible-call],
|
|
1956
|
-
test: (0, _detachedNode.asDetachedNode)(props.test)
|
|
1896
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
1897
|
+
test: (0, _detachedNode.asDetachedNodeForCodeGen)(props.test)
|
|
1957
1898
|
});
|
|
1958
1899
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1959
1900
|
return node;
|
|
@@ -1962,10 +1903,8 @@ function WhileStatement(props) {
|
|
|
1962
1903
|
function WithStatement(props) {
|
|
1963
1904
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1964
1905
|
type: 'WithStatement',
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
// $FlowFixMe[incompatible-call],
|
|
1968
|
-
body: (0, _detachedNode.asDetachedNode)(props.body)
|
|
1906
|
+
object: (0, _detachedNode.asDetachedNodeForCodeGen)(props.object),
|
|
1907
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body)
|
|
1969
1908
|
});
|
|
1970
1909
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1971
1910
|
return node;
|
|
@@ -1974,8 +1913,7 @@ function WithStatement(props) {
|
|
|
1974
1913
|
function YieldExpression(props) {
|
|
1975
1914
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1976
1915
|
type: 'YieldExpression',
|
|
1977
|
-
|
|
1978
|
-
argument: (0, _detachedNode.asDetachedNode)(props.argument),
|
|
1916
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1979
1917
|
delegate: props.delegate
|
|
1980
1918
|
});
|
|
1981
1919
|
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|