@putout/babel 5.2.6 → 5.2.8
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/README.md +2 -0
- package/bundle/index.js +1223 -1602
- package/bundle/metafile-esm.json +1 -1
- package/package.json +1 -1
package/bundle/index.js
CHANGED
|
@@ -40,91 +40,6 @@ isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
|
|
|
40
40
|
enumerable: true,
|
|
41
41
|
}) : target, mod));
|
|
42
42
|
|
|
43
|
-
// ../babel-babel/node_modules/picocolors/picocolors.js
|
|
44
|
-
var require_picocolors = __commonJS({
|
|
45
|
-
'../babel-babel/node_modules/picocolors/picocolors.js'(exports, module) {
|
|
46
|
-
var p = process || {};
|
|
47
|
-
var argv = p.argv || [];
|
|
48
|
-
var env = p.env || {};
|
|
49
|
-
var isColorSupported2 = !(!!env.NO_COLOR || argv.includes('--no-color'))
|
|
50
|
-
&& (!!env.FORCE_COLOR
|
|
51
|
-
|| argv.includes('--color')
|
|
52
|
-
|| p.platform === 'win32'
|
|
53
|
-
|| (p.stdout || {}).isTTY
|
|
54
|
-
&& env.TERM !== 'dumb'
|
|
55
|
-
|| !!env.CI);
|
|
56
|
-
|
|
57
|
-
var formatter = (open, close, replace = open) => (input) => {
|
|
58
|
-
let string = '' + input, index3 = string.indexOf(close, open.length);
|
|
59
|
-
return ~index3 ? open + replaceClose(string, close, replace, index3) + close : open + string + close;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var replaceClose = (string, close, replace, index3) => {
|
|
63
|
-
let result = '', cursor = 0;
|
|
64
|
-
|
|
65
|
-
do {
|
|
66
|
-
result += string.substring(cursor, index3) + replace;
|
|
67
|
-
cursor = index3 + close.length;
|
|
68
|
-
index3 = string.indexOf(close, cursor);
|
|
69
|
-
} while (~index3)
|
|
70
|
-
|
|
71
|
-
return result + string.substring(cursor);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
var createColors2 = (enabled2 = isColorSupported2) => {
|
|
75
|
-
let f = enabled2 ? formatter : () => String;
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
isColorSupported: enabled2,
|
|
79
|
-
reset: f('\x1B[0m', '\x1B[0m'),
|
|
80
|
-
bold: f('\x1B[1m', '\x1B[22m', '\x1B[22m\x1B[1m'),
|
|
81
|
-
dim: f('\x1B[2m', '\x1B[22m', '\x1B[22m\x1B[2m'),
|
|
82
|
-
italic: f('\x1B[3m', '\x1B[23m'),
|
|
83
|
-
underline: f('\x1B[4m', '\x1B[24m'),
|
|
84
|
-
inverse: f('\x1B[7m', '\x1B[27m'),
|
|
85
|
-
hidden: f('\x1B[8m', '\x1B[28m'),
|
|
86
|
-
strikethrough: f('\x1B[9m', '\x1B[29m'),
|
|
87
|
-
black: f('\x1B[30m', '\x1B[39m'),
|
|
88
|
-
red: f('\x1B[31m', '\x1B[39m'),
|
|
89
|
-
green: f('\x1B[32m', '\x1B[39m'),
|
|
90
|
-
yellow: f('\x1B[33m', '\x1B[39m'),
|
|
91
|
-
blue: f('\x1B[34m', '\x1B[39m'),
|
|
92
|
-
magenta: f('\x1B[35m', '\x1B[39m'),
|
|
93
|
-
cyan: f('\x1B[36m', '\x1B[39m'),
|
|
94
|
-
white: f('\x1B[37m', '\x1B[39m'),
|
|
95
|
-
gray: f('\x1B[90m', '\x1B[39m'),
|
|
96
|
-
bgBlack: f('\x1B[40m', '\x1B[49m'),
|
|
97
|
-
bgRed: f('\x1B[41m', '\x1B[49m'),
|
|
98
|
-
bgGreen: f('\x1B[42m', '\x1B[49m'),
|
|
99
|
-
bgYellow: f('\x1B[43m', '\x1B[49m'),
|
|
100
|
-
bgBlue: f('\x1B[44m', '\x1B[49m'),
|
|
101
|
-
bgMagenta: f('\x1B[45m', '\x1B[49m'),
|
|
102
|
-
bgCyan: f('\x1B[46m', '\x1B[49m'),
|
|
103
|
-
bgWhite: f('\x1B[47m', '\x1B[49m'),
|
|
104
|
-
blackBright: f('\x1B[90m', '\x1B[39m'),
|
|
105
|
-
redBright: f('\x1B[91m', '\x1B[39m'),
|
|
106
|
-
greenBright: f('\x1B[92m', '\x1B[39m'),
|
|
107
|
-
yellowBright: f('\x1B[93m', '\x1B[39m'),
|
|
108
|
-
blueBright: f('\x1B[94m', '\x1B[39m'),
|
|
109
|
-
magentaBright: f('\x1B[95m', '\x1B[39m'),
|
|
110
|
-
cyanBright: f('\x1B[96m', '\x1B[39m'),
|
|
111
|
-
whiteBright: f('\x1B[97m', '\x1B[39m'),
|
|
112
|
-
bgBlackBright: f('\x1B[100m', '\x1B[49m'),
|
|
113
|
-
bgRedBright: f('\x1B[101m', '\x1B[49m'),
|
|
114
|
-
bgGreenBright: f('\x1B[102m', '\x1B[49m'),
|
|
115
|
-
bgYellowBright: f('\x1B[103m', '\x1B[49m'),
|
|
116
|
-
bgBlueBright: f('\x1B[104m', '\x1B[49m'),
|
|
117
|
-
bgMagentaBright: f('\x1B[105m', '\x1B[49m'),
|
|
118
|
-
bgCyanBright: f('\x1B[106m', '\x1B[49m'),
|
|
119
|
-
bgWhiteBright: f('\x1B[107m', '\x1B[49m'),
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
module.exports = createColors2();
|
|
124
|
-
module.exports.createColors = createColors2;
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
|
|
128
43
|
// ../babel-babel/node_modules/jsesc/jsesc.js
|
|
129
44
|
var require_jsesc = __commonJS({
|
|
130
45
|
'../babel-babel/node_modules/jsesc/jsesc.js'(exports, module) {
|
|
@@ -676,9 +591,6 @@ __export(lib_exports, {
|
|
|
676
591
|
PROPERTY_TYPES: () => PROPERTY_TYPES,
|
|
677
592
|
PUREISH_TYPES: () => PUREISH_TYPES,
|
|
678
593
|
ParenthesizedExpression: () => ParenthesizedExpression,
|
|
679
|
-
PipelineBareFunction: () => PipelineBareFunction,
|
|
680
|
-
PipelinePrimaryTopicReference: () => PipelinePrimaryTopicReference,
|
|
681
|
-
PipelineTopicExpression: () => PipelineTopicExpression,
|
|
682
594
|
Placeholder: () => Placeholder,
|
|
683
595
|
PrivateName: () => PrivateName,
|
|
684
596
|
Program: () => Program,
|
|
@@ -992,9 +904,6 @@ __export(lib_exports, {
|
|
|
992
904
|
assertParenthesizedExpression: () => assertParenthesizedExpression,
|
|
993
905
|
assertPattern: () => assertPattern,
|
|
994
906
|
assertPatternLike: () => assertPatternLike,
|
|
995
|
-
assertPipelineBareFunction: () => assertPipelineBareFunction,
|
|
996
|
-
assertPipelinePrimaryTopicReference: () => assertPipelinePrimaryTopicReference,
|
|
997
|
-
assertPipelineTopicExpression: () => assertPipelineTopicExpression,
|
|
998
907
|
assertPlaceholder: () => assertPlaceholder,
|
|
999
908
|
assertPrivate: () => assertPrivate,
|
|
1000
909
|
assertPrivateName: () => assertPrivateName,
|
|
@@ -1409,9 +1318,6 @@ __export(lib_exports, {
|
|
|
1409
1318
|
isParenthesizedExpression: () => isParenthesizedExpression,
|
|
1410
1319
|
isPattern: () => isPattern,
|
|
1411
1320
|
isPatternLike: () => isPatternLike,
|
|
1412
|
-
isPipelineBareFunction: () => isPipelineBareFunction,
|
|
1413
|
-
isPipelinePrimaryTopicReference: () => isPipelinePrimaryTopicReference,
|
|
1414
|
-
isPipelineTopicExpression: () => isPipelineTopicExpression,
|
|
1415
1321
|
isPlaceholder: () => isPlaceholder,
|
|
1416
1322
|
isPlaceholderType: () => isPlaceholderType,
|
|
1417
1323
|
isPrivate: () => isPrivate,
|
|
@@ -1596,9 +1502,6 @@ __export(lib_exports, {
|
|
|
1596
1502
|
optionalIndexedAccessType: () => optionalIndexedAccessType,
|
|
1597
1503
|
optionalMemberExpression: () => optionalMemberExpression,
|
|
1598
1504
|
parenthesizedExpression: () => parenthesizedExpression,
|
|
1599
|
-
pipelineBareFunction: () => pipelineBareFunction,
|
|
1600
|
-
pipelinePrimaryTopicReference: () => pipelinePrimaryTopicReference,
|
|
1601
|
-
pipelineTopicExpression: () => pipelineTopicExpression,
|
|
1602
1505
|
placeholder: () => placeholder,
|
|
1603
1506
|
prependToMemberExpression: () => prependToMemberExpression,
|
|
1604
1507
|
privateName: () => privateName,
|
|
@@ -4102,16 +4005,6 @@ function isClassProperty(node, opts) {
|
|
|
4102
4005
|
return opts == null || shallowEqual(node, opts);
|
|
4103
4006
|
}
|
|
4104
4007
|
|
|
4105
|
-
function isClassAccessorProperty(node, opts) {
|
|
4106
|
-
if (!node)
|
|
4107
|
-
return false;
|
|
4108
|
-
|
|
4109
|
-
if (node.type !== 'ClassAccessorProperty')
|
|
4110
|
-
return false;
|
|
4111
|
-
|
|
4112
|
-
return opts == null || shallowEqual(node, opts);
|
|
4113
|
-
}
|
|
4114
|
-
|
|
4115
4008
|
function isClassPrivateProperty(node, opts) {
|
|
4116
4009
|
if (!node)
|
|
4117
4010
|
return false;
|
|
@@ -5002,6 +4895,16 @@ function isBindExpression(node, opts) {
|
|
|
5002
4895
|
return opts == null || shallowEqual(node, opts);
|
|
5003
4896
|
}
|
|
5004
4897
|
|
|
4898
|
+
function isClassAccessorProperty(node, opts) {
|
|
4899
|
+
if (!node)
|
|
4900
|
+
return false;
|
|
4901
|
+
|
|
4902
|
+
if (node.type !== 'ClassAccessorProperty')
|
|
4903
|
+
return false;
|
|
4904
|
+
|
|
4905
|
+
return opts == null || shallowEqual(node, opts);
|
|
4906
|
+
}
|
|
4907
|
+
|
|
5005
4908
|
function isDecorator(node, opts) {
|
|
5006
4909
|
if (!node)
|
|
5007
4910
|
return false;
|
|
@@ -5052,36 +4955,6 @@ function isTopicReference(node, opts) {
|
|
|
5052
4955
|
return opts == null || shallowEqual(node, opts);
|
|
5053
4956
|
}
|
|
5054
4957
|
|
|
5055
|
-
function isPipelineTopicExpression(node, opts) {
|
|
5056
|
-
if (!node)
|
|
5057
|
-
return false;
|
|
5058
|
-
|
|
5059
|
-
if (node.type !== 'PipelineTopicExpression')
|
|
5060
|
-
return false;
|
|
5061
|
-
|
|
5062
|
-
return opts == null || shallowEqual(node, opts);
|
|
5063
|
-
}
|
|
5064
|
-
|
|
5065
|
-
function isPipelineBareFunction(node, opts) {
|
|
5066
|
-
if (!node)
|
|
5067
|
-
return false;
|
|
5068
|
-
|
|
5069
|
-
if (node.type !== 'PipelineBareFunction')
|
|
5070
|
-
return false;
|
|
5071
|
-
|
|
5072
|
-
return opts == null || shallowEqual(node, opts);
|
|
5073
|
-
}
|
|
5074
|
-
|
|
5075
|
-
function isPipelinePrimaryTopicReference(node, opts) {
|
|
5076
|
-
if (!node)
|
|
5077
|
-
return false;
|
|
5078
|
-
|
|
5079
|
-
if (node.type !== 'PipelinePrimaryTopicReference')
|
|
5080
|
-
return false;
|
|
5081
|
-
|
|
5082
|
-
return opts == null || shallowEqual(node, opts);
|
|
5083
|
-
}
|
|
5084
|
-
|
|
5085
4958
|
function isVoidPattern(node, opts) {
|
|
5086
4959
|
if (!node)
|
|
5087
4960
|
return false;
|
|
@@ -5860,7 +5733,6 @@ function isStandardized(node, opts) {
|
|
|
5860
5733
|
case 'OptionalMemberExpression':
|
|
5861
5734
|
case 'OptionalCallExpression':
|
|
5862
5735
|
case 'ClassProperty':
|
|
5863
|
-
case 'ClassAccessorProperty':
|
|
5864
5736
|
case 'ClassPrivateProperty':
|
|
5865
5737
|
case 'ClassPrivateMethod':
|
|
5866
5738
|
case 'PrivateName':
|
|
@@ -5935,9 +5807,6 @@ function isExpression(node, opts) {
|
|
|
5935
5807
|
case 'DoExpression':
|
|
5936
5808
|
case 'ModuleExpression':
|
|
5937
5809
|
case 'TopicReference':
|
|
5938
|
-
case 'PipelineTopicExpression':
|
|
5939
|
-
case 'PipelineBareFunction':
|
|
5940
|
-
case 'PipelinePrimaryTopicReference':
|
|
5941
5810
|
case 'TSInstantiationExpression':
|
|
5942
5811
|
case 'TSAsExpression':
|
|
5943
5812
|
case 'TSSatisfiesExpression':
|
|
@@ -6629,8 +6498,8 @@ function isProperty(node, opts) {
|
|
|
6629
6498
|
switch(node.type) {
|
|
6630
6499
|
case 'ObjectProperty':
|
|
6631
6500
|
case 'ClassProperty':
|
|
6632
|
-
case '
|
|
6633
|
-
case '
|
|
6501
|
+
case 'ClassPrivateProperty':
|
|
6502
|
+
case 'ClassAccessorProperty':
|
|
6634
6503
|
break;
|
|
6635
6504
|
|
|
6636
6505
|
default:
|
|
@@ -6756,22 +6625,6 @@ function isModuleSpecifier(node, opts) {
|
|
|
6756
6625
|
return opts == null || shallowEqual(node, opts);
|
|
6757
6626
|
}
|
|
6758
6627
|
|
|
6759
|
-
function isAccessor(node, opts) {
|
|
6760
|
-
if (!node)
|
|
6761
|
-
return false;
|
|
6762
|
-
|
|
6763
|
-
switch(node.type) {
|
|
6764
|
-
case 'ClassAccessorProperty':
|
|
6765
|
-
break;
|
|
6766
|
-
|
|
6767
|
-
default:
|
|
6768
|
-
return false;
|
|
6769
|
-
}
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
return opts == null || shallowEqual(node, opts);
|
|
6773
|
-
}
|
|
6774
|
-
|
|
6775
6628
|
function isPrivate(node, opts) {
|
|
6776
6629
|
if (!node)
|
|
6777
6630
|
return false;
|
|
@@ -6885,6 +6738,22 @@ function isMiscellaneous(node, opts) {
|
|
|
6885
6738
|
return opts == null || shallowEqual(node, opts);
|
|
6886
6739
|
}
|
|
6887
6740
|
|
|
6741
|
+
function isAccessor(node, opts) {
|
|
6742
|
+
if (!node)
|
|
6743
|
+
return false;
|
|
6744
|
+
|
|
6745
|
+
switch(node.type) {
|
|
6746
|
+
case 'ClassAccessorProperty':
|
|
6747
|
+
break;
|
|
6748
|
+
|
|
6749
|
+
default:
|
|
6750
|
+
return false;
|
|
6751
|
+
}
|
|
6752
|
+
|
|
6753
|
+
|
|
6754
|
+
return opts == null || shallowEqual(node, opts);
|
|
6755
|
+
}
|
|
6756
|
+
|
|
6888
6757
|
function isTypeScript(node, opts) {
|
|
6889
6758
|
if (!node)
|
|
6890
6759
|
return false;
|
|
@@ -9177,6 +9046,7 @@ defineType$4('ExportNamedDeclaration', {
|
|
|
9177
9046
|
'declaration',
|
|
9178
9047
|
'specifiers',
|
|
9179
9048
|
'source',
|
|
9049
|
+
'attributes',
|
|
9180
9050
|
],
|
|
9181
9051
|
visitor: [
|
|
9182
9052
|
'declaration',
|
|
@@ -9306,7 +9176,11 @@ defineType$4('ForOfStatement', {
|
|
|
9306
9176
|
},
|
|
9307
9177
|
});
|
|
9308
9178
|
defineType$4('ImportDeclaration', {
|
|
9309
|
-
builder: [
|
|
9179
|
+
builder: [
|
|
9180
|
+
'specifiers',
|
|
9181
|
+
'source',
|
|
9182
|
+
'attributes',
|
|
9183
|
+
],
|
|
9310
9184
|
visitor: [
|
|
9311
9185
|
'specifiers',
|
|
9312
9186
|
'source',
|
|
@@ -9792,66 +9666,6 @@ defineType$4('ClassProperty', {
|
|
|
9792
9666
|
},
|
|
9793
9667
|
},
|
|
9794
9668
|
});
|
|
9795
|
-
defineType$4('ClassAccessorProperty', {
|
|
9796
|
-
visitor: [
|
|
9797
|
-
'decorators',
|
|
9798
|
-
'key',
|
|
9799
|
-
'typeAnnotation',
|
|
9800
|
-
'value',
|
|
9801
|
-
],
|
|
9802
|
-
builder: [
|
|
9803
|
-
'key',
|
|
9804
|
-
'value',
|
|
9805
|
-
'typeAnnotation',
|
|
9806
|
-
'decorators',
|
|
9807
|
-
'computed',
|
|
9808
|
-
'static',
|
|
9809
|
-
],
|
|
9810
|
-
aliases: ['Property', 'Accessor'],
|
|
9811
|
-
...classMethodOrPropertyUnionShapeCommon(true),
|
|
9812
|
-
fields: {
|
|
9813
|
-
...classMethodOrPropertyCommon(),
|
|
9814
|
-
key: {
|
|
9815
|
-
validate: chain((function() {
|
|
9816
|
-
const normal = assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName');
|
|
9817
|
-
const computed = assertNodeType('Expression');
|
|
9818
|
-
|
|
9819
|
-
return function(node, key, val) {
|
|
9820
|
-
const validator = node.computed ? computed : normal;
|
|
9821
|
-
validator(node, key, val);
|
|
9822
|
-
};
|
|
9823
|
-
})(), assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'Expression', 'PrivateName')),
|
|
9824
|
-
},
|
|
9825
|
-
value: {
|
|
9826
|
-
validate: assertNodeType('Expression'),
|
|
9827
|
-
optional: true,
|
|
9828
|
-
},
|
|
9829
|
-
definite: {
|
|
9830
|
-
validate: assertValueType('boolean'),
|
|
9831
|
-
optional: true,
|
|
9832
|
-
},
|
|
9833
|
-
typeAnnotation: {
|
|
9834
|
-
validate: assertNodeType('TypeAnnotation', 'TSTypeAnnotation'),
|
|
9835
|
-
optional: true,
|
|
9836
|
-
},
|
|
9837
|
-
decorators: {
|
|
9838
|
-
validate: arrayOfType('Decorator'),
|
|
9839
|
-
optional: true,
|
|
9840
|
-
},
|
|
9841
|
-
readonly: {
|
|
9842
|
-
validate: assertValueType('boolean'),
|
|
9843
|
-
optional: true,
|
|
9844
|
-
},
|
|
9845
|
-
declare: {
|
|
9846
|
-
validate: assertValueType('boolean'),
|
|
9847
|
-
optional: true,
|
|
9848
|
-
},
|
|
9849
|
-
variance: {
|
|
9850
|
-
validate: assertNodeType('Variance'),
|
|
9851
|
-
optional: true,
|
|
9852
|
-
},
|
|
9853
|
-
},
|
|
9854
|
-
});
|
|
9855
9669
|
defineType$4('ClassPrivateProperty', {
|
|
9856
9670
|
visitor: [
|
|
9857
9671
|
'decorators',
|
|
@@ -10845,6 +10659,66 @@ defineType$5('BindExpression', {
|
|
|
10845
10659
|
},
|
|
10846
10660
|
},
|
|
10847
10661
|
});
|
|
10662
|
+
defineType$5('ClassAccessorProperty', {
|
|
10663
|
+
visitor: [
|
|
10664
|
+
'decorators',
|
|
10665
|
+
'key',
|
|
10666
|
+
'typeAnnotation',
|
|
10667
|
+
'value',
|
|
10668
|
+
],
|
|
10669
|
+
builder: [
|
|
10670
|
+
'key',
|
|
10671
|
+
'value',
|
|
10672
|
+
'typeAnnotation',
|
|
10673
|
+
'decorators',
|
|
10674
|
+
'computed',
|
|
10675
|
+
'static',
|
|
10676
|
+
],
|
|
10677
|
+
aliases: ['Property', 'Accessor'],
|
|
10678
|
+
...classMethodOrPropertyUnionShapeCommon(true),
|
|
10679
|
+
fields: {
|
|
10680
|
+
...classMethodOrPropertyCommon(),
|
|
10681
|
+
key: {
|
|
10682
|
+
validate: chain((function() {
|
|
10683
|
+
const normal = assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'PrivateName');
|
|
10684
|
+
const computed = assertNodeType('Expression');
|
|
10685
|
+
|
|
10686
|
+
return function(node, key, val) {
|
|
10687
|
+
const validator = node.computed ? computed : normal;
|
|
10688
|
+
validator(node, key, val);
|
|
10689
|
+
};
|
|
10690
|
+
})(), assertNodeType('Identifier', 'StringLiteral', 'NumericLiteral', 'BigIntLiteral', 'Expression', 'PrivateName')),
|
|
10691
|
+
},
|
|
10692
|
+
value: {
|
|
10693
|
+
validate: assertNodeType('Expression'),
|
|
10694
|
+
optional: true,
|
|
10695
|
+
},
|
|
10696
|
+
definite: {
|
|
10697
|
+
validate: assertValueType('boolean'),
|
|
10698
|
+
optional: true,
|
|
10699
|
+
},
|
|
10700
|
+
typeAnnotation: {
|
|
10701
|
+
validate: assertNodeType('TypeAnnotation', 'TSTypeAnnotation'),
|
|
10702
|
+
optional: true,
|
|
10703
|
+
},
|
|
10704
|
+
decorators: {
|
|
10705
|
+
validate: arrayOfType('Decorator'),
|
|
10706
|
+
optional: true,
|
|
10707
|
+
},
|
|
10708
|
+
readonly: {
|
|
10709
|
+
validate: assertValueType('boolean'),
|
|
10710
|
+
optional: true,
|
|
10711
|
+
},
|
|
10712
|
+
declare: {
|
|
10713
|
+
validate: assertValueType('boolean'),
|
|
10714
|
+
optional: true,
|
|
10715
|
+
},
|
|
10716
|
+
variance: {
|
|
10717
|
+
validate: assertNodeType('Variance'),
|
|
10718
|
+
optional: true,
|
|
10719
|
+
},
|
|
10720
|
+
},
|
|
10721
|
+
});
|
|
10848
10722
|
defineType$5('Decorator', {
|
|
10849
10723
|
visitor: ['expression'],
|
|
10850
10724
|
fields: {
|
|
@@ -10888,29 +10762,6 @@ defineType$5('ModuleExpression', {
|
|
|
10888
10762
|
defineType$5('TopicReference', {
|
|
10889
10763
|
aliases: ['Expression'],
|
|
10890
10764
|
});
|
|
10891
|
-
defineType$5('PipelineTopicExpression', {
|
|
10892
|
-
builder: ['expression'],
|
|
10893
|
-
visitor: ['expression'],
|
|
10894
|
-
fields: {
|
|
10895
|
-
expression: {
|
|
10896
|
-
validate: assertNodeType('Expression'),
|
|
10897
|
-
},
|
|
10898
|
-
},
|
|
10899
|
-
aliases: ['Expression'],
|
|
10900
|
-
});
|
|
10901
|
-
defineType$5('PipelineBareFunction', {
|
|
10902
|
-
builder: ['callee'],
|
|
10903
|
-
visitor: ['callee'],
|
|
10904
|
-
fields: {
|
|
10905
|
-
callee: {
|
|
10906
|
-
validate: assertNodeType('Expression'),
|
|
10907
|
-
},
|
|
10908
|
-
},
|
|
10909
|
-
aliases: ['Expression'],
|
|
10910
|
-
});
|
|
10911
|
-
defineType$5('PipelinePrimaryTopicReference', {
|
|
10912
|
-
aliases: ['Expression'],
|
|
10913
|
-
});
|
|
10914
10765
|
defineType$5('VoidPattern', {
|
|
10915
10766
|
aliases: [
|
|
10916
10767
|
'Pattern',
|
|
@@ -11677,8 +11528,8 @@ function arrayExpression(elements) {
|
|
|
11677
11528
|
elements,
|
|
11678
11529
|
};
|
|
11679
11530
|
|
|
11680
|
-
const
|
|
11681
|
-
validate(
|
|
11531
|
+
const defs2 = NODE_FIELDS.ArrayExpression;
|
|
11532
|
+
validate(defs2.elements, node, 'elements', elements, 1);
|
|
11682
11533
|
return node;
|
|
11683
11534
|
}
|
|
11684
11535
|
|
|
@@ -11690,10 +11541,10 @@ function assignmentExpression(operator, left, right) {
|
|
|
11690
11541
|
right,
|
|
11691
11542
|
};
|
|
11692
11543
|
|
|
11693
|
-
const
|
|
11694
|
-
validate(
|
|
11695
|
-
validate(
|
|
11696
|
-
validate(
|
|
11544
|
+
const defs2 = NODE_FIELDS.AssignmentExpression;
|
|
11545
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11546
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11547
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11697
11548
|
return node;
|
|
11698
11549
|
}
|
|
11699
11550
|
|
|
@@ -11705,10 +11556,10 @@ function binaryExpression(operator, left, right) {
|
|
|
11705
11556
|
right,
|
|
11706
11557
|
};
|
|
11707
11558
|
|
|
11708
|
-
const
|
|
11709
|
-
validate(
|
|
11710
|
-
validate(
|
|
11711
|
-
validate(
|
|
11559
|
+
const defs2 = NODE_FIELDS.BinaryExpression;
|
|
11560
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11561
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11562
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11712
11563
|
return node;
|
|
11713
11564
|
}
|
|
11714
11565
|
|
|
@@ -11718,8 +11569,8 @@ function interpreterDirective(value) {
|
|
|
11718
11569
|
value,
|
|
11719
11570
|
};
|
|
11720
11571
|
|
|
11721
|
-
const
|
|
11722
|
-
validate(
|
|
11572
|
+
const defs2 = NODE_FIELDS.InterpreterDirective;
|
|
11573
|
+
validate(defs2.value, node, 'value', value);
|
|
11723
11574
|
return node;
|
|
11724
11575
|
}
|
|
11725
11576
|
|
|
@@ -11729,8 +11580,8 @@ function directive(value) {
|
|
|
11729
11580
|
value,
|
|
11730
11581
|
};
|
|
11731
11582
|
|
|
11732
|
-
const
|
|
11733
|
-
validate(
|
|
11583
|
+
const defs2 = NODE_FIELDS.Directive;
|
|
11584
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
11734
11585
|
return node;
|
|
11735
11586
|
}
|
|
11736
11587
|
|
|
@@ -11740,8 +11591,8 @@ function directiveLiteral(value) {
|
|
|
11740
11591
|
value,
|
|
11741
11592
|
};
|
|
11742
11593
|
|
|
11743
|
-
const
|
|
11744
|
-
validate(
|
|
11594
|
+
const defs2 = NODE_FIELDS.DirectiveLiteral;
|
|
11595
|
+
validate(defs2.value, node, 'value', value);
|
|
11745
11596
|
return node;
|
|
11746
11597
|
}
|
|
11747
11598
|
|
|
@@ -11752,9 +11603,9 @@ function blockStatement(body, directives = []) {
|
|
|
11752
11603
|
directives,
|
|
11753
11604
|
};
|
|
11754
11605
|
|
|
11755
|
-
const
|
|
11756
|
-
validate(
|
|
11757
|
-
validate(
|
|
11606
|
+
const defs2 = NODE_FIELDS.BlockStatement;
|
|
11607
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11608
|
+
validate(defs2.directives, node, 'directives', directives, 1);
|
|
11758
11609
|
return node;
|
|
11759
11610
|
}
|
|
11760
11611
|
|
|
@@ -11764,8 +11615,8 @@ function breakStatement(label = null) {
|
|
|
11764
11615
|
label,
|
|
11765
11616
|
};
|
|
11766
11617
|
|
|
11767
|
-
const
|
|
11768
|
-
validate(
|
|
11618
|
+
const defs2 = NODE_FIELDS.BreakStatement;
|
|
11619
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11769
11620
|
return node;
|
|
11770
11621
|
}
|
|
11771
11622
|
|
|
@@ -11776,9 +11627,9 @@ function callExpression(callee, _arguments) {
|
|
|
11776
11627
|
arguments: _arguments,
|
|
11777
11628
|
};
|
|
11778
11629
|
|
|
11779
|
-
const
|
|
11780
|
-
validate(
|
|
11781
|
-
validate(
|
|
11630
|
+
const defs2 = NODE_FIELDS.CallExpression;
|
|
11631
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
11632
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
11782
11633
|
return node;
|
|
11783
11634
|
}
|
|
11784
11635
|
|
|
@@ -11789,9 +11640,9 @@ function catchClause(param = null, body) {
|
|
|
11789
11640
|
body,
|
|
11790
11641
|
};
|
|
11791
11642
|
|
|
11792
|
-
const
|
|
11793
|
-
validate(
|
|
11794
|
-
validate(
|
|
11643
|
+
const defs2 = NODE_FIELDS.CatchClause;
|
|
11644
|
+
validate(defs2.param, node, 'param', param, 1);
|
|
11645
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11795
11646
|
return node;
|
|
11796
11647
|
}
|
|
11797
11648
|
|
|
@@ -11803,10 +11654,10 @@ function conditionalExpression(test, consequent, alternate) {
|
|
|
11803
11654
|
alternate,
|
|
11804
11655
|
};
|
|
11805
11656
|
|
|
11806
|
-
const
|
|
11807
|
-
validate(
|
|
11808
|
-
validate(
|
|
11809
|
-
validate(
|
|
11657
|
+
const defs2 = NODE_FIELDS.ConditionalExpression;
|
|
11658
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11659
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
11660
|
+
validate(defs2.alternate, node, 'alternate', alternate, 1);
|
|
11810
11661
|
return node;
|
|
11811
11662
|
}
|
|
11812
11663
|
|
|
@@ -11816,8 +11667,8 @@ function continueStatement(label = null) {
|
|
|
11816
11667
|
label,
|
|
11817
11668
|
};
|
|
11818
11669
|
|
|
11819
|
-
const
|
|
11820
|
-
validate(
|
|
11670
|
+
const defs2 = NODE_FIELDS.ContinueStatement;
|
|
11671
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11821
11672
|
return node;
|
|
11822
11673
|
}
|
|
11823
11674
|
|
|
@@ -11834,9 +11685,9 @@ function doWhileStatement(test, body) {
|
|
|
11834
11685
|
body,
|
|
11835
11686
|
};
|
|
11836
11687
|
|
|
11837
|
-
const
|
|
11838
|
-
validate(
|
|
11839
|
-
validate(
|
|
11688
|
+
const defs2 = NODE_FIELDS.DoWhileStatement;
|
|
11689
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11690
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11840
11691
|
return node;
|
|
11841
11692
|
}
|
|
11842
11693
|
|
|
@@ -11852,8 +11703,8 @@ function expressionStatement(expression2) {
|
|
|
11852
11703
|
expression: expression2,
|
|
11853
11704
|
};
|
|
11854
11705
|
|
|
11855
|
-
const
|
|
11856
|
-
validate(
|
|
11706
|
+
const defs2 = NODE_FIELDS.ExpressionStatement;
|
|
11707
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
11857
11708
|
return node;
|
|
11858
11709
|
}
|
|
11859
11710
|
|
|
@@ -11865,10 +11716,10 @@ function file(program3, comments = null, tokens = null) {
|
|
|
11865
11716
|
tokens,
|
|
11866
11717
|
};
|
|
11867
11718
|
|
|
11868
|
-
const
|
|
11869
|
-
validate(
|
|
11870
|
-
validate(
|
|
11871
|
-
validate(
|
|
11719
|
+
const defs2 = NODE_FIELDS.File;
|
|
11720
|
+
validate(defs2.program, node, 'program', program3, 1);
|
|
11721
|
+
validate(defs2.comments, node, 'comments', comments, 1);
|
|
11722
|
+
validate(defs2.tokens, node, 'tokens', tokens);
|
|
11872
11723
|
return node;
|
|
11873
11724
|
}
|
|
11874
11725
|
|
|
@@ -11880,10 +11731,10 @@ function forInStatement(left, right, body) {
|
|
|
11880
11731
|
body,
|
|
11881
11732
|
};
|
|
11882
11733
|
|
|
11883
|
-
const
|
|
11884
|
-
validate(
|
|
11885
|
-
validate(
|
|
11886
|
-
validate(
|
|
11734
|
+
const defs2 = NODE_FIELDS.ForInStatement;
|
|
11735
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11736
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
11737
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11887
11738
|
return node;
|
|
11888
11739
|
}
|
|
11889
11740
|
|
|
@@ -11896,11 +11747,11 @@ function forStatement(init = null, test = null, update = null, body) {
|
|
|
11896
11747
|
body,
|
|
11897
11748
|
};
|
|
11898
11749
|
|
|
11899
|
-
const
|
|
11900
|
-
validate(
|
|
11901
|
-
validate(
|
|
11902
|
-
validate(
|
|
11903
|
-
validate(
|
|
11750
|
+
const defs2 = NODE_FIELDS.ForStatement;
|
|
11751
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
11752
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11753
|
+
validate(defs2.update, node, 'update', update, 1);
|
|
11754
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11904
11755
|
return node;
|
|
11905
11756
|
}
|
|
11906
11757
|
|
|
@@ -11914,12 +11765,12 @@ function functionDeclaration(id = null, params, body, generator = false, async =
|
|
|
11914
11765
|
async,
|
|
11915
11766
|
};
|
|
11916
11767
|
|
|
11917
|
-
const
|
|
11918
|
-
validate(
|
|
11919
|
-
validate(
|
|
11920
|
-
validate(
|
|
11921
|
-
validate(
|
|
11922
|
-
validate(
|
|
11768
|
+
const defs2 = NODE_FIELDS.FunctionDeclaration;
|
|
11769
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
11770
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11771
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11772
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11773
|
+
validate(defs2.async, node, 'async', async);
|
|
11923
11774
|
return node;
|
|
11924
11775
|
}
|
|
11925
11776
|
|
|
@@ -11933,12 +11784,12 @@ function functionExpression(id = null, params, body, generator = false, async =
|
|
|
11933
11784
|
async,
|
|
11934
11785
|
};
|
|
11935
11786
|
|
|
11936
|
-
const
|
|
11937
|
-
validate(
|
|
11938
|
-
validate(
|
|
11939
|
-
validate(
|
|
11940
|
-
validate(
|
|
11941
|
-
validate(
|
|
11787
|
+
const defs2 = NODE_FIELDS.FunctionExpression;
|
|
11788
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
11789
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11790
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11791
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11792
|
+
validate(defs2.async, node, 'async', async);
|
|
11942
11793
|
return node;
|
|
11943
11794
|
}
|
|
11944
11795
|
|
|
@@ -11948,8 +11799,8 @@ function identifier(name) {
|
|
|
11948
11799
|
name,
|
|
11949
11800
|
};
|
|
11950
11801
|
|
|
11951
|
-
const
|
|
11952
|
-
validate(
|
|
11802
|
+
const defs2 = NODE_FIELDS.Identifier;
|
|
11803
|
+
validate(defs2.name, node, 'name', name);
|
|
11953
11804
|
return node;
|
|
11954
11805
|
}
|
|
11955
11806
|
|
|
@@ -11961,10 +11812,10 @@ function ifStatement(test, consequent, alternate = null) {
|
|
|
11961
11812
|
alternate,
|
|
11962
11813
|
};
|
|
11963
11814
|
|
|
11964
|
-
const
|
|
11965
|
-
validate(
|
|
11966
|
-
validate(
|
|
11967
|
-
validate(
|
|
11815
|
+
const defs2 = NODE_FIELDS.IfStatement;
|
|
11816
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
11817
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
11818
|
+
validate(defs2.alternate, node, 'alternate', alternate, 1);
|
|
11968
11819
|
return node;
|
|
11969
11820
|
}
|
|
11970
11821
|
|
|
@@ -11975,9 +11826,9 @@ function labeledStatement(label, body) {
|
|
|
11975
11826
|
body,
|
|
11976
11827
|
};
|
|
11977
11828
|
|
|
11978
|
-
const
|
|
11979
|
-
validate(
|
|
11980
|
-
validate(
|
|
11829
|
+
const defs2 = NODE_FIELDS.LabeledStatement;
|
|
11830
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
11831
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11981
11832
|
return node;
|
|
11982
11833
|
}
|
|
11983
11834
|
|
|
@@ -11987,8 +11838,8 @@ function stringLiteral(value) {
|
|
|
11987
11838
|
value,
|
|
11988
11839
|
};
|
|
11989
11840
|
|
|
11990
|
-
const
|
|
11991
|
-
validate(
|
|
11841
|
+
const defs2 = NODE_FIELDS.StringLiteral;
|
|
11842
|
+
validate(defs2.value, node, 'value', value);
|
|
11992
11843
|
return node;
|
|
11993
11844
|
}
|
|
11994
11845
|
|
|
@@ -11998,8 +11849,8 @@ function numericLiteral(value) {
|
|
|
11998
11849
|
value,
|
|
11999
11850
|
};
|
|
12000
11851
|
|
|
12001
|
-
const
|
|
12002
|
-
validate(
|
|
11852
|
+
const defs2 = NODE_FIELDS.NumericLiteral;
|
|
11853
|
+
validate(defs2.value, node, 'value', value);
|
|
12003
11854
|
return node;
|
|
12004
11855
|
}
|
|
12005
11856
|
|
|
@@ -12015,8 +11866,8 @@ function booleanLiteral(value) {
|
|
|
12015
11866
|
value,
|
|
12016
11867
|
};
|
|
12017
11868
|
|
|
12018
|
-
const
|
|
12019
|
-
validate(
|
|
11869
|
+
const defs2 = NODE_FIELDS.BooleanLiteral;
|
|
11870
|
+
validate(defs2.value, node, 'value', value);
|
|
12020
11871
|
return node;
|
|
12021
11872
|
}
|
|
12022
11873
|
|
|
@@ -12027,9 +11878,9 @@ function regExpLiteral(pattern, flags = '') {
|
|
|
12027
11878
|
flags,
|
|
12028
11879
|
};
|
|
12029
11880
|
|
|
12030
|
-
const
|
|
12031
|
-
validate(
|
|
12032
|
-
validate(
|
|
11881
|
+
const defs2 = NODE_FIELDS.RegExpLiteral;
|
|
11882
|
+
validate(defs2.pattern, node, 'pattern', pattern);
|
|
11883
|
+
validate(defs2.flags, node, 'flags', flags);
|
|
12033
11884
|
return node;
|
|
12034
11885
|
}
|
|
12035
11886
|
|
|
@@ -12041,10 +11892,10 @@ function logicalExpression(operator, left, right) {
|
|
|
12041
11892
|
right,
|
|
12042
11893
|
};
|
|
12043
11894
|
|
|
12044
|
-
const
|
|
12045
|
-
validate(
|
|
12046
|
-
validate(
|
|
12047
|
-
validate(
|
|
11895
|
+
const defs2 = NODE_FIELDS.LogicalExpression;
|
|
11896
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
11897
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
11898
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12048
11899
|
return node;
|
|
12049
11900
|
}
|
|
12050
11901
|
|
|
@@ -12056,10 +11907,10 @@ function memberExpression(object, property, computed = false) {
|
|
|
12056
11907
|
computed,
|
|
12057
11908
|
};
|
|
12058
11909
|
|
|
12059
|
-
const
|
|
12060
|
-
validate(
|
|
12061
|
-
validate(
|
|
12062
|
-
validate(
|
|
11910
|
+
const defs2 = NODE_FIELDS.MemberExpression;
|
|
11911
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
11912
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
11913
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12063
11914
|
return node;
|
|
12064
11915
|
}
|
|
12065
11916
|
|
|
@@ -12070,9 +11921,9 @@ function newExpression(callee, _arguments) {
|
|
|
12070
11921
|
arguments: _arguments,
|
|
12071
11922
|
};
|
|
12072
11923
|
|
|
12073
|
-
const
|
|
12074
|
-
validate(
|
|
12075
|
-
validate(
|
|
11924
|
+
const defs2 = NODE_FIELDS.NewExpression;
|
|
11925
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
11926
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
12076
11927
|
return node;
|
|
12077
11928
|
}
|
|
12078
11929
|
|
|
@@ -12085,11 +11936,11 @@ function program(body, directives = [], sourceType = 'script', interpreter = nul
|
|
|
12085
11936
|
interpreter,
|
|
12086
11937
|
};
|
|
12087
11938
|
|
|
12088
|
-
const
|
|
12089
|
-
validate(
|
|
12090
|
-
validate(
|
|
12091
|
-
validate(
|
|
12092
|
-
validate(
|
|
11939
|
+
const defs2 = NODE_FIELDS.Program;
|
|
11940
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11941
|
+
validate(defs2.directives, node, 'directives', directives, 1);
|
|
11942
|
+
validate(defs2.sourceType, node, 'sourceType', sourceType);
|
|
11943
|
+
validate(defs2.interpreter, node, 'interpreter', interpreter, 1);
|
|
12093
11944
|
return node;
|
|
12094
11945
|
}
|
|
12095
11946
|
|
|
@@ -12099,8 +11950,8 @@ function objectExpression(properties) {
|
|
|
12099
11950
|
properties,
|
|
12100
11951
|
};
|
|
12101
11952
|
|
|
12102
|
-
const
|
|
12103
|
-
validate(
|
|
11953
|
+
const defs2 = NODE_FIELDS.ObjectExpression;
|
|
11954
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
12104
11955
|
return node;
|
|
12105
11956
|
}
|
|
12106
11957
|
|
|
@@ -12116,14 +11967,14 @@ function objectMethod(kind, key, params, body, computed = false, generator = fal
|
|
|
12116
11967
|
async,
|
|
12117
11968
|
};
|
|
12118
11969
|
|
|
12119
|
-
const
|
|
12120
|
-
validate(
|
|
12121
|
-
validate(
|
|
12122
|
-
validate(
|
|
12123
|
-
validate(
|
|
12124
|
-
validate(
|
|
12125
|
-
validate(
|
|
12126
|
-
validate(
|
|
11970
|
+
const defs2 = NODE_FIELDS.ObjectMethod;
|
|
11971
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
11972
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
11973
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
11974
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
11975
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
11976
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
11977
|
+
validate(defs2.async, node, 'async', async);
|
|
12127
11978
|
return node;
|
|
12128
11979
|
}
|
|
12129
11980
|
|
|
@@ -12136,11 +11987,11 @@ function objectProperty(key, value, computed = false, shorthand = false) {
|
|
|
12136
11987
|
shorthand,
|
|
12137
11988
|
};
|
|
12138
11989
|
|
|
12139
|
-
const
|
|
12140
|
-
validate(
|
|
12141
|
-
validate(
|
|
12142
|
-
validate(
|
|
12143
|
-
validate(
|
|
11990
|
+
const defs2 = NODE_FIELDS.ObjectProperty;
|
|
11991
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
11992
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
11993
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
11994
|
+
validate(defs2.shorthand, node, 'shorthand', shorthand);
|
|
12144
11995
|
return node;
|
|
12145
11996
|
}
|
|
12146
11997
|
|
|
@@ -12150,8 +12001,8 @@ function restElement(argument) {
|
|
|
12150
12001
|
argument,
|
|
12151
12002
|
};
|
|
12152
12003
|
|
|
12153
|
-
const
|
|
12154
|
-
validate(
|
|
12004
|
+
const defs2 = NODE_FIELDS.RestElement;
|
|
12005
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12155
12006
|
return node;
|
|
12156
12007
|
}
|
|
12157
12008
|
|
|
@@ -12161,8 +12012,8 @@ function returnStatement(argument = null) {
|
|
|
12161
12012
|
argument,
|
|
12162
12013
|
};
|
|
12163
12014
|
|
|
12164
|
-
const
|
|
12165
|
-
validate(
|
|
12015
|
+
const defs2 = NODE_FIELDS.ReturnStatement;
|
|
12016
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12166
12017
|
return node;
|
|
12167
12018
|
}
|
|
12168
12019
|
|
|
@@ -12172,8 +12023,8 @@ function sequenceExpression(expressions) {
|
|
|
12172
12023
|
expressions,
|
|
12173
12024
|
};
|
|
12174
12025
|
|
|
12175
|
-
const
|
|
12176
|
-
validate(
|
|
12026
|
+
const defs2 = NODE_FIELDS.SequenceExpression;
|
|
12027
|
+
validate(defs2.expressions, node, 'expressions', expressions, 1);
|
|
12177
12028
|
return node;
|
|
12178
12029
|
}
|
|
12179
12030
|
|
|
@@ -12183,8 +12034,8 @@ function parenthesizedExpression(expression2) {
|
|
|
12183
12034
|
expression: expression2,
|
|
12184
12035
|
};
|
|
12185
12036
|
|
|
12186
|
-
const
|
|
12187
|
-
validate(
|
|
12037
|
+
const defs2 = NODE_FIELDS.ParenthesizedExpression;
|
|
12038
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
12188
12039
|
return node;
|
|
12189
12040
|
}
|
|
12190
12041
|
|
|
@@ -12195,9 +12046,9 @@ function switchCase(test = null, consequent) {
|
|
|
12195
12046
|
consequent,
|
|
12196
12047
|
};
|
|
12197
12048
|
|
|
12198
|
-
const
|
|
12199
|
-
validate(
|
|
12200
|
-
validate(
|
|
12049
|
+
const defs2 = NODE_FIELDS.SwitchCase;
|
|
12050
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
12051
|
+
validate(defs2.consequent, node, 'consequent', consequent, 1);
|
|
12201
12052
|
return node;
|
|
12202
12053
|
}
|
|
12203
12054
|
|
|
@@ -12208,9 +12059,9 @@ function switchStatement(discriminant, cases) {
|
|
|
12208
12059
|
cases,
|
|
12209
12060
|
};
|
|
12210
12061
|
|
|
12211
|
-
const
|
|
12212
|
-
validate(
|
|
12213
|
-
validate(
|
|
12062
|
+
const defs2 = NODE_FIELDS.SwitchStatement;
|
|
12063
|
+
validate(defs2.discriminant, node, 'discriminant', discriminant, 1);
|
|
12064
|
+
validate(defs2.cases, node, 'cases', cases, 1);
|
|
12214
12065
|
return node;
|
|
12215
12066
|
}
|
|
12216
12067
|
|
|
@@ -12226,8 +12077,8 @@ function throwStatement(argument) {
|
|
|
12226
12077
|
argument,
|
|
12227
12078
|
};
|
|
12228
12079
|
|
|
12229
|
-
const
|
|
12230
|
-
validate(
|
|
12080
|
+
const defs2 = NODE_FIELDS.ThrowStatement;
|
|
12081
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12231
12082
|
return node;
|
|
12232
12083
|
}
|
|
12233
12084
|
|
|
@@ -12239,10 +12090,10 @@ function tryStatement(block, handler = null, finalizer = null) {
|
|
|
12239
12090
|
finalizer,
|
|
12240
12091
|
};
|
|
12241
12092
|
|
|
12242
|
-
const
|
|
12243
|
-
validate(
|
|
12244
|
-
validate(
|
|
12245
|
-
validate(
|
|
12093
|
+
const defs2 = NODE_FIELDS.TryStatement;
|
|
12094
|
+
validate(defs2.block, node, 'block', block, 1);
|
|
12095
|
+
validate(defs2.handler, node, 'handler', handler, 1);
|
|
12096
|
+
validate(defs2.finalizer, node, 'finalizer', finalizer, 1);
|
|
12246
12097
|
return node;
|
|
12247
12098
|
}
|
|
12248
12099
|
|
|
@@ -12254,10 +12105,10 @@ function unaryExpression(operator, argument, prefix2 = true) {
|
|
|
12254
12105
|
prefix: prefix2,
|
|
12255
12106
|
};
|
|
12256
12107
|
|
|
12257
|
-
const
|
|
12258
|
-
validate(
|
|
12259
|
-
validate(
|
|
12260
|
-
validate(
|
|
12108
|
+
const defs2 = NODE_FIELDS.UnaryExpression;
|
|
12109
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
12110
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12111
|
+
validate(defs2.prefix, node, 'prefix', prefix2);
|
|
12261
12112
|
return node;
|
|
12262
12113
|
}
|
|
12263
12114
|
|
|
@@ -12269,10 +12120,10 @@ function updateExpression(operator, argument, prefix2 = false) {
|
|
|
12269
12120
|
prefix: prefix2,
|
|
12270
12121
|
};
|
|
12271
12122
|
|
|
12272
|
-
const
|
|
12273
|
-
validate(
|
|
12274
|
-
validate(
|
|
12275
|
-
validate(
|
|
12123
|
+
const defs2 = NODE_FIELDS.UpdateExpression;
|
|
12124
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
12125
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12126
|
+
validate(defs2.prefix, node, 'prefix', prefix2);
|
|
12276
12127
|
return node;
|
|
12277
12128
|
}
|
|
12278
12129
|
|
|
@@ -12283,9 +12134,9 @@ function variableDeclaration(kind, declarations) {
|
|
|
12283
12134
|
declarations,
|
|
12284
12135
|
};
|
|
12285
12136
|
|
|
12286
|
-
const
|
|
12287
|
-
validate(
|
|
12288
|
-
validate(
|
|
12137
|
+
const defs2 = NODE_FIELDS.VariableDeclaration;
|
|
12138
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12139
|
+
validate(defs2.declarations, node, 'declarations', declarations, 1);
|
|
12289
12140
|
return node;
|
|
12290
12141
|
}
|
|
12291
12142
|
|
|
@@ -12296,9 +12147,9 @@ function variableDeclarator(id, init = null) {
|
|
|
12296
12147
|
init,
|
|
12297
12148
|
};
|
|
12298
12149
|
|
|
12299
|
-
const
|
|
12300
|
-
validate(
|
|
12301
|
-
validate(
|
|
12150
|
+
const defs2 = NODE_FIELDS.VariableDeclarator;
|
|
12151
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12152
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
12302
12153
|
return node;
|
|
12303
12154
|
}
|
|
12304
12155
|
|
|
@@ -12309,9 +12160,9 @@ function whileStatement(test, body) {
|
|
|
12309
12160
|
body,
|
|
12310
12161
|
};
|
|
12311
12162
|
|
|
12312
|
-
const
|
|
12313
|
-
validate(
|
|
12314
|
-
validate(
|
|
12163
|
+
const defs2 = NODE_FIELDS.WhileStatement;
|
|
12164
|
+
validate(defs2.test, node, 'test', test, 1);
|
|
12165
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12315
12166
|
return node;
|
|
12316
12167
|
}
|
|
12317
12168
|
|
|
@@ -12322,9 +12173,9 @@ function withStatement(object, body) {
|
|
|
12322
12173
|
body,
|
|
12323
12174
|
};
|
|
12324
12175
|
|
|
12325
|
-
const
|
|
12326
|
-
validate(
|
|
12327
|
-
validate(
|
|
12176
|
+
const defs2 = NODE_FIELDS.WithStatement;
|
|
12177
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
12178
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12328
12179
|
return node;
|
|
12329
12180
|
}
|
|
12330
12181
|
|
|
@@ -12335,9 +12186,9 @@ function assignmentPattern(left, right) {
|
|
|
12335
12186
|
right,
|
|
12336
12187
|
};
|
|
12337
12188
|
|
|
12338
|
-
const
|
|
12339
|
-
validate(
|
|
12340
|
-
validate(
|
|
12189
|
+
const defs2 = NODE_FIELDS.AssignmentPattern;
|
|
12190
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
12191
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12341
12192
|
return node;
|
|
12342
12193
|
}
|
|
12343
12194
|
|
|
@@ -12347,8 +12198,8 @@ function arrayPattern(elements) {
|
|
|
12347
12198
|
elements,
|
|
12348
12199
|
};
|
|
12349
12200
|
|
|
12350
|
-
const
|
|
12351
|
-
validate(
|
|
12201
|
+
const defs2 = NODE_FIELDS.ArrayPattern;
|
|
12202
|
+
validate(defs2.elements, node, 'elements', elements, 1);
|
|
12352
12203
|
return node;
|
|
12353
12204
|
}
|
|
12354
12205
|
|
|
@@ -12361,10 +12212,10 @@ function arrowFunctionExpression(params, body, async = false) {
|
|
|
12361
12212
|
expression: body.type !== 'BlockStatement',
|
|
12362
12213
|
};
|
|
12363
12214
|
|
|
12364
|
-
const
|
|
12365
|
-
validate(
|
|
12366
|
-
validate(
|
|
12367
|
-
validate(
|
|
12215
|
+
const defs2 = NODE_FIELDS.ArrowFunctionExpression;
|
|
12216
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12217
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12218
|
+
validate(defs2.async, node, 'async', async);
|
|
12368
12219
|
return node;
|
|
12369
12220
|
}
|
|
12370
12221
|
|
|
@@ -12374,8 +12225,8 @@ function classBody(body) {
|
|
|
12374
12225
|
body,
|
|
12375
12226
|
};
|
|
12376
12227
|
|
|
12377
|
-
const
|
|
12378
|
-
validate(
|
|
12228
|
+
const defs2 = NODE_FIELDS.ClassBody;
|
|
12229
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12379
12230
|
return node;
|
|
12380
12231
|
}
|
|
12381
12232
|
|
|
@@ -12388,11 +12239,11 @@ function classExpression(id = null, superClass = null, body, decorators = null)
|
|
|
12388
12239
|
decorators,
|
|
12389
12240
|
};
|
|
12390
12241
|
|
|
12391
|
-
const
|
|
12392
|
-
validate(
|
|
12393
|
-
validate(
|
|
12394
|
-
validate(
|
|
12395
|
-
validate(
|
|
12242
|
+
const defs2 = NODE_FIELDS.ClassExpression;
|
|
12243
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12244
|
+
validate(defs2.superClass, node, 'superClass', superClass, 1);
|
|
12245
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12246
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12396
12247
|
return node;
|
|
12397
12248
|
}
|
|
12398
12249
|
|
|
@@ -12405,11 +12256,11 @@ function classDeclaration(id = null, superClass = null, body, decorators = null)
|
|
|
12405
12256
|
decorators,
|
|
12406
12257
|
};
|
|
12407
12258
|
|
|
12408
|
-
const
|
|
12409
|
-
validate(
|
|
12410
|
-
validate(
|
|
12411
|
-
validate(
|
|
12412
|
-
validate(
|
|
12259
|
+
const defs2 = NODE_FIELDS.ClassDeclaration;
|
|
12260
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12261
|
+
validate(defs2.superClass, node, 'superClass', superClass, 1);
|
|
12262
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12263
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12413
12264
|
return node;
|
|
12414
12265
|
}
|
|
12415
12266
|
|
|
@@ -12420,9 +12271,9 @@ function exportAllDeclaration(source, attributes = null) {
|
|
|
12420
12271
|
attributes,
|
|
12421
12272
|
};
|
|
12422
12273
|
|
|
12423
|
-
const
|
|
12424
|
-
validate(
|
|
12425
|
-
validate(
|
|
12274
|
+
const defs2 = NODE_FIELDS.ExportAllDeclaration;
|
|
12275
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12276
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12426
12277
|
return node;
|
|
12427
12278
|
}
|
|
12428
12279
|
|
|
@@ -12432,23 +12283,25 @@ function exportDefaultDeclaration(declaration) {
|
|
|
12432
12283
|
declaration,
|
|
12433
12284
|
};
|
|
12434
12285
|
|
|
12435
|
-
const
|
|
12436
|
-
validate(
|
|
12286
|
+
const defs2 = NODE_FIELDS.ExportDefaultDeclaration;
|
|
12287
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12437
12288
|
return node;
|
|
12438
12289
|
}
|
|
12439
12290
|
|
|
12440
|
-
function exportNamedDeclaration(declaration = null, specifiers = [], source = null) {
|
|
12291
|
+
function exportNamedDeclaration(declaration = null, specifiers = [], source = null, attributes = null) {
|
|
12441
12292
|
const node = {
|
|
12442
12293
|
type: 'ExportNamedDeclaration',
|
|
12443
12294
|
declaration,
|
|
12444
12295
|
specifiers,
|
|
12445
12296
|
source,
|
|
12297
|
+
attributes,
|
|
12446
12298
|
};
|
|
12447
12299
|
|
|
12448
|
-
const
|
|
12449
|
-
validate(
|
|
12450
|
-
validate(
|
|
12451
|
-
validate(
|
|
12300
|
+
const defs2 = NODE_FIELDS.ExportNamedDeclaration;
|
|
12301
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12302
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12303
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12304
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12452
12305
|
return node;
|
|
12453
12306
|
}
|
|
12454
12307
|
|
|
@@ -12459,9 +12312,9 @@ function exportSpecifier(local, exported) {
|
|
|
12459
12312
|
exported,
|
|
12460
12313
|
};
|
|
12461
12314
|
|
|
12462
|
-
const
|
|
12463
|
-
validate(
|
|
12464
|
-
validate(
|
|
12315
|
+
const defs2 = NODE_FIELDS.ExportSpecifier;
|
|
12316
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12317
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
12465
12318
|
return node;
|
|
12466
12319
|
}
|
|
12467
12320
|
|
|
@@ -12474,24 +12327,26 @@ function forOfStatement(left, right, body, _await = false) {
|
|
|
12474
12327
|
await: _await,
|
|
12475
12328
|
};
|
|
12476
12329
|
|
|
12477
|
-
const
|
|
12478
|
-
validate(
|
|
12479
|
-
validate(
|
|
12480
|
-
validate(
|
|
12481
|
-
validate(
|
|
12330
|
+
const defs2 = NODE_FIELDS.ForOfStatement;
|
|
12331
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
12332
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12333
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12334
|
+
validate(defs2.await, node, 'await', _await);
|
|
12482
12335
|
return node;
|
|
12483
12336
|
}
|
|
12484
12337
|
|
|
12485
|
-
function importDeclaration(specifiers, source) {
|
|
12338
|
+
function importDeclaration(specifiers, source, attributes = null) {
|
|
12486
12339
|
const node = {
|
|
12487
12340
|
type: 'ImportDeclaration',
|
|
12488
12341
|
specifiers,
|
|
12489
12342
|
source,
|
|
12343
|
+
attributes,
|
|
12490
12344
|
};
|
|
12491
12345
|
|
|
12492
|
-
const
|
|
12493
|
-
validate(
|
|
12494
|
-
validate(
|
|
12346
|
+
const defs2 = NODE_FIELDS.ImportDeclaration;
|
|
12347
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12348
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12349
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
12495
12350
|
return node;
|
|
12496
12351
|
}
|
|
12497
12352
|
|
|
@@ -12501,8 +12356,8 @@ function importDefaultSpecifier(local) {
|
|
|
12501
12356
|
local,
|
|
12502
12357
|
};
|
|
12503
12358
|
|
|
12504
|
-
const
|
|
12505
|
-
validate(
|
|
12359
|
+
const defs2 = NODE_FIELDS.ImportDefaultSpecifier;
|
|
12360
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12506
12361
|
return node;
|
|
12507
12362
|
}
|
|
12508
12363
|
|
|
@@ -12512,8 +12367,8 @@ function importNamespaceSpecifier(local) {
|
|
|
12512
12367
|
local,
|
|
12513
12368
|
};
|
|
12514
12369
|
|
|
12515
|
-
const
|
|
12516
|
-
validate(
|
|
12370
|
+
const defs2 = NODE_FIELDS.ImportNamespaceSpecifier;
|
|
12371
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12517
12372
|
return node;
|
|
12518
12373
|
}
|
|
12519
12374
|
|
|
@@ -12524,9 +12379,9 @@ function importSpecifier(local, imported) {
|
|
|
12524
12379
|
imported,
|
|
12525
12380
|
};
|
|
12526
12381
|
|
|
12527
|
-
const
|
|
12528
|
-
validate(
|
|
12529
|
-
validate(
|
|
12382
|
+
const defs2 = NODE_FIELDS.ImportSpecifier;
|
|
12383
|
+
validate(defs2.local, node, 'local', local, 1);
|
|
12384
|
+
validate(defs2.imported, node, 'imported', imported, 1);
|
|
12530
12385
|
return node;
|
|
12531
12386
|
}
|
|
12532
12387
|
|
|
@@ -12537,9 +12392,9 @@ function importExpression(source, options = null) {
|
|
|
12537
12392
|
options,
|
|
12538
12393
|
};
|
|
12539
12394
|
|
|
12540
|
-
const
|
|
12541
|
-
validate(
|
|
12542
|
-
validate(
|
|
12395
|
+
const defs2 = NODE_FIELDS.ImportExpression;
|
|
12396
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12397
|
+
validate(defs2.options, node, 'options', options, 1);
|
|
12543
12398
|
return node;
|
|
12544
12399
|
}
|
|
12545
12400
|
|
|
@@ -12550,9 +12405,9 @@ function metaProperty(meta, property) {
|
|
|
12550
12405
|
property,
|
|
12551
12406
|
};
|
|
12552
12407
|
|
|
12553
|
-
const
|
|
12554
|
-
validate(
|
|
12555
|
-
validate(
|
|
12408
|
+
const defs2 = NODE_FIELDS.MetaProperty;
|
|
12409
|
+
validate(defs2.meta, node, 'meta', meta, 1);
|
|
12410
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
12556
12411
|
return node;
|
|
12557
12412
|
}
|
|
12558
12413
|
|
|
@@ -12569,15 +12424,15 @@ function classMethod(kind = 'method', key, params, body, computed = false, _stat
|
|
|
12569
12424
|
async,
|
|
12570
12425
|
};
|
|
12571
12426
|
|
|
12572
|
-
const
|
|
12573
|
-
validate(
|
|
12574
|
-
validate(
|
|
12575
|
-
validate(
|
|
12576
|
-
validate(
|
|
12577
|
-
validate(
|
|
12578
|
-
validate(
|
|
12579
|
-
validate(
|
|
12580
|
-
validate(
|
|
12427
|
+
const defs2 = NODE_FIELDS.ClassMethod;
|
|
12428
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12429
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12430
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12431
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12432
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12433
|
+
validate(defs2.static, node, 'static', _static);
|
|
12434
|
+
validate(defs2.generator, node, 'generator', generator);
|
|
12435
|
+
validate(defs2.async, node, 'async', async);
|
|
12581
12436
|
return node;
|
|
12582
12437
|
}
|
|
12583
12438
|
|
|
@@ -12587,8 +12442,8 @@ function objectPattern(properties) {
|
|
|
12587
12442
|
properties,
|
|
12588
12443
|
};
|
|
12589
12444
|
|
|
12590
|
-
const
|
|
12591
|
-
validate(
|
|
12445
|
+
const defs2 = NODE_FIELDS.ObjectPattern;
|
|
12446
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
12592
12447
|
return node;
|
|
12593
12448
|
}
|
|
12594
12449
|
|
|
@@ -12598,8 +12453,8 @@ function spreadElement(argument) {
|
|
|
12598
12453
|
argument,
|
|
12599
12454
|
};
|
|
12600
12455
|
|
|
12601
|
-
const
|
|
12602
|
-
validate(
|
|
12456
|
+
const defs2 = NODE_FIELDS.SpreadElement;
|
|
12457
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12603
12458
|
return node;
|
|
12604
12459
|
}
|
|
12605
12460
|
|
|
@@ -12616,9 +12471,9 @@ function taggedTemplateExpression(tag, quasi) {
|
|
|
12616
12471
|
quasi,
|
|
12617
12472
|
};
|
|
12618
12473
|
|
|
12619
|
-
const
|
|
12620
|
-
validate(
|
|
12621
|
-
validate(
|
|
12474
|
+
const defs2 = NODE_FIELDS.TaggedTemplateExpression;
|
|
12475
|
+
validate(defs2.tag, node, 'tag', tag, 1);
|
|
12476
|
+
validate(defs2.quasi, node, 'quasi', quasi, 1);
|
|
12622
12477
|
return node;
|
|
12623
12478
|
}
|
|
12624
12479
|
|
|
@@ -12629,9 +12484,9 @@ function templateElement(value, tail = false) {
|
|
|
12629
12484
|
tail,
|
|
12630
12485
|
};
|
|
12631
12486
|
|
|
12632
|
-
const
|
|
12633
|
-
validate(
|
|
12634
|
-
validate(
|
|
12487
|
+
const defs2 = NODE_FIELDS.TemplateElement;
|
|
12488
|
+
validate(defs2.value, node, 'value', value);
|
|
12489
|
+
validate(defs2.tail, node, 'tail', tail);
|
|
12635
12490
|
return node;
|
|
12636
12491
|
}
|
|
12637
12492
|
|
|
@@ -12642,9 +12497,9 @@ function templateLiteral(quasis, expressions) {
|
|
|
12642
12497
|
expressions,
|
|
12643
12498
|
};
|
|
12644
12499
|
|
|
12645
|
-
const
|
|
12646
|
-
validate(
|
|
12647
|
-
validate(
|
|
12500
|
+
const defs2 = NODE_FIELDS.TemplateLiteral;
|
|
12501
|
+
validate(defs2.quasis, node, 'quasis', quasis, 1);
|
|
12502
|
+
validate(defs2.expressions, node, 'expressions', expressions, 1);
|
|
12648
12503
|
return node;
|
|
12649
12504
|
}
|
|
12650
12505
|
|
|
@@ -12655,9 +12510,9 @@ function yieldExpression(argument = null, delegate = false) {
|
|
|
12655
12510
|
delegate,
|
|
12656
12511
|
};
|
|
12657
12512
|
|
|
12658
|
-
const
|
|
12659
|
-
validate(
|
|
12660
|
-
validate(
|
|
12513
|
+
const defs2 = NODE_FIELDS.YieldExpression;
|
|
12514
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12515
|
+
validate(defs2.delegate, node, 'delegate', delegate);
|
|
12661
12516
|
return node;
|
|
12662
12517
|
}
|
|
12663
12518
|
|
|
@@ -12667,8 +12522,8 @@ function awaitExpression(argument) {
|
|
|
12667
12522
|
argument,
|
|
12668
12523
|
};
|
|
12669
12524
|
|
|
12670
|
-
const
|
|
12671
|
-
validate(
|
|
12525
|
+
const defs2 = NODE_FIELDS.AwaitExpression;
|
|
12526
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
12672
12527
|
return node;
|
|
12673
12528
|
}
|
|
12674
12529
|
|
|
@@ -12684,8 +12539,8 @@ function bigIntLiteral(value) {
|
|
|
12684
12539
|
value,
|
|
12685
12540
|
};
|
|
12686
12541
|
|
|
12687
|
-
const
|
|
12688
|
-
validate(
|
|
12542
|
+
const defs2 = NODE_FIELDS.BigIntLiteral;
|
|
12543
|
+
validate(defs2.value, node, 'value', value);
|
|
12689
12544
|
return node;
|
|
12690
12545
|
}
|
|
12691
12546
|
|
|
@@ -12695,8 +12550,8 @@ function exportNamespaceSpecifier(exported) {
|
|
|
12695
12550
|
exported,
|
|
12696
12551
|
};
|
|
12697
12552
|
|
|
12698
|
-
const
|
|
12699
|
-
validate(
|
|
12553
|
+
const defs2 = NODE_FIELDS.ExportNamespaceSpecifier;
|
|
12554
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
12700
12555
|
return node;
|
|
12701
12556
|
}
|
|
12702
12557
|
|
|
@@ -12709,11 +12564,11 @@ function optionalMemberExpression(object, property, computed = false, optional)
|
|
|
12709
12564
|
optional,
|
|
12710
12565
|
};
|
|
12711
12566
|
|
|
12712
|
-
const
|
|
12713
|
-
validate(
|
|
12714
|
-
validate(
|
|
12715
|
-
validate(
|
|
12716
|
-
validate(
|
|
12567
|
+
const defs2 = NODE_FIELDS.OptionalMemberExpression;
|
|
12568
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
12569
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
12570
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12571
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
12717
12572
|
return node;
|
|
12718
12573
|
}
|
|
12719
12574
|
|
|
@@ -12725,10 +12580,10 @@ function optionalCallExpression(callee, _arguments, optional) {
|
|
|
12725
12580
|
optional,
|
|
12726
12581
|
};
|
|
12727
12582
|
|
|
12728
|
-
const
|
|
12729
|
-
validate(
|
|
12730
|
-
validate(
|
|
12731
|
-
validate(
|
|
12583
|
+
const defs2 = NODE_FIELDS.OptionalCallExpression;
|
|
12584
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
12585
|
+
validate(defs2.arguments, node, 'arguments', _arguments, 1);
|
|
12586
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
12732
12587
|
return node;
|
|
12733
12588
|
}
|
|
12734
12589
|
|
|
@@ -12743,34 +12598,13 @@ function classProperty(key, value = null, typeAnnotation2 = null, decorators = n
|
|
|
12743
12598
|
static: _static,
|
|
12744
12599
|
};
|
|
12745
12600
|
|
|
12746
|
-
const
|
|
12747
|
-
validate(
|
|
12748
|
-
validate(
|
|
12749
|
-
validate(
|
|
12750
|
-
validate(
|
|
12751
|
-
validate(
|
|
12752
|
-
validate(
|
|
12753
|
-
return node;
|
|
12754
|
-
}
|
|
12755
|
-
|
|
12756
|
-
function classAccessorProperty(key, value = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
|
|
12757
|
-
const node = {
|
|
12758
|
-
type: 'ClassAccessorProperty',
|
|
12759
|
-
key,
|
|
12760
|
-
value,
|
|
12761
|
-
typeAnnotation: typeAnnotation2,
|
|
12762
|
-
decorators,
|
|
12763
|
-
computed,
|
|
12764
|
-
static: _static,
|
|
12765
|
-
};
|
|
12766
|
-
|
|
12767
|
-
const defs = NODE_FIELDS.ClassAccessorProperty;
|
|
12768
|
-
validate(defs.key, node, 'key', key, 1);
|
|
12769
|
-
validate(defs.value, node, 'value', value, 1);
|
|
12770
|
-
validate(defs.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
12771
|
-
validate(defs.decorators, node, 'decorators', decorators, 1);
|
|
12772
|
-
validate(defs.computed, node, 'computed', computed);
|
|
12773
|
-
validate(defs.static, node, 'static', _static);
|
|
12601
|
+
const defs2 = NODE_FIELDS.ClassProperty;
|
|
12602
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12603
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12604
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
12605
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12606
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
12607
|
+
validate(defs2.static, node, 'static', _static);
|
|
12774
12608
|
return node;
|
|
12775
12609
|
}
|
|
12776
12610
|
|
|
@@ -12783,11 +12617,11 @@ function classPrivateProperty(key, value = null, decorators = null, _static = fa
|
|
|
12783
12617
|
static: _static,
|
|
12784
12618
|
};
|
|
12785
12619
|
|
|
12786
|
-
const
|
|
12787
|
-
validate(
|
|
12788
|
-
validate(
|
|
12789
|
-
validate(
|
|
12790
|
-
validate(
|
|
12620
|
+
const defs2 = NODE_FIELDS.ClassPrivateProperty;
|
|
12621
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12622
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12623
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
12624
|
+
validate(defs2.static, node, 'static', _static);
|
|
12791
12625
|
return node;
|
|
12792
12626
|
}
|
|
12793
12627
|
|
|
@@ -12804,12 +12638,12 @@ function classPrivateMethod(kind = 'method', key, params, body, _static = false)
|
|
|
12804
12638
|
generator: false,
|
|
12805
12639
|
};
|
|
12806
12640
|
|
|
12807
|
-
const
|
|
12808
|
-
validate(
|
|
12809
|
-
validate(
|
|
12810
|
-
validate(
|
|
12811
|
-
validate(
|
|
12812
|
-
validate(
|
|
12641
|
+
const defs2 = NODE_FIELDS.ClassPrivateMethod;
|
|
12642
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12643
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12644
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12645
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12646
|
+
validate(defs2.static, node, 'static', _static);
|
|
12813
12647
|
return node;
|
|
12814
12648
|
}
|
|
12815
12649
|
|
|
@@ -12819,8 +12653,8 @@ function privateName(id) {
|
|
|
12819
12653
|
id,
|
|
12820
12654
|
};
|
|
12821
12655
|
|
|
12822
|
-
const
|
|
12823
|
-
validate(
|
|
12656
|
+
const defs2 = NODE_FIELDS.PrivateName;
|
|
12657
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12824
12658
|
return node;
|
|
12825
12659
|
}
|
|
12826
12660
|
|
|
@@ -12830,8 +12664,8 @@ function staticBlock(body) {
|
|
|
12830
12664
|
body,
|
|
12831
12665
|
};
|
|
12832
12666
|
|
|
12833
|
-
const
|
|
12834
|
-
validate(
|
|
12667
|
+
const defs2 = NODE_FIELDS.StaticBlock;
|
|
12668
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12835
12669
|
return node;
|
|
12836
12670
|
}
|
|
12837
12671
|
|
|
@@ -12842,9 +12676,9 @@ function importAttribute(key, value) {
|
|
|
12842
12676
|
value,
|
|
12843
12677
|
};
|
|
12844
12678
|
|
|
12845
|
-
const
|
|
12846
|
-
validate(
|
|
12847
|
-
validate(
|
|
12679
|
+
const defs2 = NODE_FIELDS.ImportAttribute;
|
|
12680
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
12681
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
12848
12682
|
return node;
|
|
12849
12683
|
}
|
|
12850
12684
|
|
|
@@ -12860,8 +12694,8 @@ function arrayTypeAnnotation(elementType) {
|
|
|
12860
12694
|
elementType,
|
|
12861
12695
|
};
|
|
12862
12696
|
|
|
12863
|
-
const
|
|
12864
|
-
validate(
|
|
12697
|
+
const defs2 = NODE_FIELDS.ArrayTypeAnnotation;
|
|
12698
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
12865
12699
|
return node;
|
|
12866
12700
|
}
|
|
12867
12701
|
|
|
@@ -12877,8 +12711,8 @@ function booleanLiteralTypeAnnotation(value) {
|
|
|
12877
12711
|
value,
|
|
12878
12712
|
};
|
|
12879
12713
|
|
|
12880
|
-
const
|
|
12881
|
-
validate(
|
|
12714
|
+
const defs2 = NODE_FIELDS.BooleanLiteralTypeAnnotation;
|
|
12715
|
+
validate(defs2.value, node, 'value', value);
|
|
12882
12716
|
return node;
|
|
12883
12717
|
}
|
|
12884
12718
|
|
|
@@ -12895,9 +12729,9 @@ function classImplements(id, typeParameters = null) {
|
|
|
12895
12729
|
typeParameters,
|
|
12896
12730
|
};
|
|
12897
12731
|
|
|
12898
|
-
const
|
|
12899
|
-
validate(
|
|
12900
|
-
validate(
|
|
12732
|
+
const defs2 = NODE_FIELDS.ClassImplements;
|
|
12733
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12734
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12901
12735
|
return node;
|
|
12902
12736
|
}
|
|
12903
12737
|
|
|
@@ -12910,11 +12744,11 @@ function declareClass(id, typeParameters = null, _extends = null, body) {
|
|
|
12910
12744
|
body,
|
|
12911
12745
|
};
|
|
12912
12746
|
|
|
12913
|
-
const
|
|
12914
|
-
validate(
|
|
12915
|
-
validate(
|
|
12916
|
-
validate(
|
|
12917
|
-
validate(
|
|
12747
|
+
const defs2 = NODE_FIELDS.DeclareClass;
|
|
12748
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12749
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12750
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12751
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12918
12752
|
return node;
|
|
12919
12753
|
}
|
|
12920
12754
|
|
|
@@ -12924,8 +12758,8 @@ function declareFunction(id) {
|
|
|
12924
12758
|
id,
|
|
12925
12759
|
};
|
|
12926
12760
|
|
|
12927
|
-
const
|
|
12928
|
-
validate(
|
|
12761
|
+
const defs2 = NODE_FIELDS.DeclareFunction;
|
|
12762
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12929
12763
|
return node;
|
|
12930
12764
|
}
|
|
12931
12765
|
|
|
@@ -12938,11 +12772,11 @@ function declareInterface(id, typeParameters = null, _extends = null, body) {
|
|
|
12938
12772
|
body,
|
|
12939
12773
|
};
|
|
12940
12774
|
|
|
12941
|
-
const
|
|
12942
|
-
validate(
|
|
12943
|
-
validate(
|
|
12944
|
-
validate(
|
|
12945
|
-
validate(
|
|
12775
|
+
const defs2 = NODE_FIELDS.DeclareInterface;
|
|
12776
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12777
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12778
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12779
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12946
12780
|
return node;
|
|
12947
12781
|
}
|
|
12948
12782
|
|
|
@@ -12954,10 +12788,10 @@ function declareModule(id, body, kind = null) {
|
|
|
12954
12788
|
kind,
|
|
12955
12789
|
};
|
|
12956
12790
|
|
|
12957
|
-
const
|
|
12958
|
-
validate(
|
|
12959
|
-
validate(
|
|
12960
|
-
validate(
|
|
12791
|
+
const defs2 = NODE_FIELDS.DeclareModule;
|
|
12792
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12793
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
12794
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
12961
12795
|
return node;
|
|
12962
12796
|
}
|
|
12963
12797
|
|
|
@@ -12967,8 +12801,8 @@ function declareModuleExports(typeAnnotation2) {
|
|
|
12967
12801
|
typeAnnotation: typeAnnotation2,
|
|
12968
12802
|
};
|
|
12969
12803
|
|
|
12970
|
-
const
|
|
12971
|
-
validate(
|
|
12804
|
+
const defs2 = NODE_FIELDS.DeclareModuleExports;
|
|
12805
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
12972
12806
|
return node;
|
|
12973
12807
|
}
|
|
12974
12808
|
|
|
@@ -12980,10 +12814,10 @@ function declareTypeAlias(id, typeParameters = null, right) {
|
|
|
12980
12814
|
right,
|
|
12981
12815
|
};
|
|
12982
12816
|
|
|
12983
|
-
const
|
|
12984
|
-
validate(
|
|
12985
|
-
validate(
|
|
12986
|
-
validate(
|
|
12817
|
+
const defs2 = NODE_FIELDS.DeclareTypeAlias;
|
|
12818
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12819
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12820
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
12987
12821
|
return node;
|
|
12988
12822
|
}
|
|
12989
12823
|
|
|
@@ -12995,10 +12829,10 @@ function declareOpaqueType(id, typeParameters = null, supertype = null) {
|
|
|
12995
12829
|
supertype,
|
|
12996
12830
|
};
|
|
12997
12831
|
|
|
12998
|
-
const
|
|
12999
|
-
validate(
|
|
13000
|
-
validate(
|
|
13001
|
-
validate(
|
|
12832
|
+
const defs2 = NODE_FIELDS.DeclareOpaqueType;
|
|
12833
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12834
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12835
|
+
validate(defs2.supertype, node, 'supertype', supertype, 1);
|
|
13002
12836
|
return node;
|
|
13003
12837
|
}
|
|
13004
12838
|
|
|
@@ -13008,8 +12842,8 @@ function declareVariable(id) {
|
|
|
13008
12842
|
id,
|
|
13009
12843
|
};
|
|
13010
12844
|
|
|
13011
|
-
const
|
|
13012
|
-
validate(
|
|
12845
|
+
const defs2 = NODE_FIELDS.DeclareVariable;
|
|
12846
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13013
12847
|
return node;
|
|
13014
12848
|
}
|
|
13015
12849
|
|
|
@@ -13022,11 +12856,11 @@ function declareExportDeclaration(declaration = null, specifiers = null, source
|
|
|
13022
12856
|
attributes,
|
|
13023
12857
|
};
|
|
13024
12858
|
|
|
13025
|
-
const
|
|
13026
|
-
validate(
|
|
13027
|
-
validate(
|
|
13028
|
-
validate(
|
|
13029
|
-
validate(
|
|
12859
|
+
const defs2 = NODE_FIELDS.DeclareExportDeclaration;
|
|
12860
|
+
validate(defs2.declaration, node, 'declaration', declaration, 1);
|
|
12861
|
+
validate(defs2.specifiers, node, 'specifiers', specifiers, 1);
|
|
12862
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12863
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
13030
12864
|
return node;
|
|
13031
12865
|
}
|
|
13032
12866
|
|
|
@@ -13037,9 +12871,9 @@ function declareExportAllDeclaration(source, attributes = null) {
|
|
|
13037
12871
|
attributes,
|
|
13038
12872
|
};
|
|
13039
12873
|
|
|
13040
|
-
const
|
|
13041
|
-
validate(
|
|
13042
|
-
validate(
|
|
12874
|
+
const defs2 = NODE_FIELDS.DeclareExportAllDeclaration;
|
|
12875
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
12876
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
13043
12877
|
return node;
|
|
13044
12878
|
}
|
|
13045
12879
|
|
|
@@ -13049,8 +12883,8 @@ function declaredPredicate(value) {
|
|
|
13049
12883
|
value,
|
|
13050
12884
|
};
|
|
13051
12885
|
|
|
13052
|
-
const
|
|
13053
|
-
validate(
|
|
12886
|
+
const defs2 = NODE_FIELDS.DeclaredPredicate;
|
|
12887
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13054
12888
|
return node;
|
|
13055
12889
|
}
|
|
13056
12890
|
|
|
@@ -13069,11 +12903,11 @@ function functionTypeAnnotation(typeParameters = null, params, rest = null, retu
|
|
|
13069
12903
|
returnType,
|
|
13070
12904
|
};
|
|
13071
12905
|
|
|
13072
|
-
const
|
|
13073
|
-
validate(
|
|
13074
|
-
validate(
|
|
13075
|
-
validate(
|
|
13076
|
-
validate(
|
|
12906
|
+
const defs2 = NODE_FIELDS.FunctionTypeAnnotation;
|
|
12907
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12908
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
12909
|
+
validate(defs2.rest, node, 'rest', rest, 1);
|
|
12910
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13077
12911
|
return node;
|
|
13078
12912
|
}
|
|
13079
12913
|
|
|
@@ -13084,9 +12918,9 @@ function functionTypeParam(name = null, typeAnnotation2) {
|
|
|
13084
12918
|
typeAnnotation: typeAnnotation2,
|
|
13085
12919
|
};
|
|
13086
12920
|
|
|
13087
|
-
const
|
|
13088
|
-
validate(
|
|
13089
|
-
validate(
|
|
12921
|
+
const defs2 = NODE_FIELDS.FunctionTypeParam;
|
|
12922
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
12923
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13090
12924
|
return node;
|
|
13091
12925
|
}
|
|
13092
12926
|
|
|
@@ -13097,9 +12931,9 @@ function genericTypeAnnotation(id, typeParameters = null) {
|
|
|
13097
12931
|
typeParameters,
|
|
13098
12932
|
};
|
|
13099
12933
|
|
|
13100
|
-
const
|
|
13101
|
-
validate(
|
|
13102
|
-
validate(
|
|
12934
|
+
const defs2 = NODE_FIELDS.GenericTypeAnnotation;
|
|
12935
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12936
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13103
12937
|
return node;
|
|
13104
12938
|
}
|
|
13105
12939
|
|
|
@@ -13116,9 +12950,9 @@ function interfaceExtends(id, typeParameters = null) {
|
|
|
13116
12950
|
typeParameters,
|
|
13117
12951
|
};
|
|
13118
12952
|
|
|
13119
|
-
const
|
|
13120
|
-
validate(
|
|
13121
|
-
validate(
|
|
12953
|
+
const defs2 = NODE_FIELDS.InterfaceExtends;
|
|
12954
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12955
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13122
12956
|
return node;
|
|
13123
12957
|
}
|
|
13124
12958
|
|
|
@@ -13131,11 +12965,11 @@ function interfaceDeclaration(id, typeParameters = null, _extends = null, body)
|
|
|
13131
12965
|
body,
|
|
13132
12966
|
};
|
|
13133
12967
|
|
|
13134
|
-
const
|
|
13135
|
-
validate(
|
|
13136
|
-
validate(
|
|
13137
|
-
validate(
|
|
13138
|
-
validate(
|
|
12968
|
+
const defs2 = NODE_FIELDS.InterfaceDeclaration;
|
|
12969
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
12970
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
12971
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12972
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13139
12973
|
return node;
|
|
13140
12974
|
}
|
|
13141
12975
|
|
|
@@ -13146,9 +12980,9 @@ function interfaceTypeAnnotation(_extends = null, body) {
|
|
|
13146
12980
|
body,
|
|
13147
12981
|
};
|
|
13148
12982
|
|
|
13149
|
-
const
|
|
13150
|
-
validate(
|
|
13151
|
-
validate(
|
|
12983
|
+
const defs2 = NODE_FIELDS.InterfaceTypeAnnotation;
|
|
12984
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
12985
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13152
12986
|
return node;
|
|
13153
12987
|
}
|
|
13154
12988
|
|
|
@@ -13158,8 +12992,8 @@ function intersectionTypeAnnotation(types2) {
|
|
|
13158
12992
|
types: types2,
|
|
13159
12993
|
};
|
|
13160
12994
|
|
|
13161
|
-
const
|
|
13162
|
-
validate(
|
|
12995
|
+
const defs2 = NODE_FIELDS.IntersectionTypeAnnotation;
|
|
12996
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13163
12997
|
return node;
|
|
13164
12998
|
}
|
|
13165
12999
|
|
|
@@ -13181,8 +13015,8 @@ function nullableTypeAnnotation(typeAnnotation2) {
|
|
|
13181
13015
|
typeAnnotation: typeAnnotation2,
|
|
13182
13016
|
};
|
|
13183
13017
|
|
|
13184
|
-
const
|
|
13185
|
-
validate(
|
|
13018
|
+
const defs2 = NODE_FIELDS.NullableTypeAnnotation;
|
|
13019
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13186
13020
|
return node;
|
|
13187
13021
|
}
|
|
13188
13022
|
|
|
@@ -13192,8 +13026,8 @@ function numberLiteralTypeAnnotation(value) {
|
|
|
13192
13026
|
value,
|
|
13193
13027
|
};
|
|
13194
13028
|
|
|
13195
|
-
const
|
|
13196
|
-
validate(
|
|
13029
|
+
const defs2 = NODE_FIELDS.NumberLiteralTypeAnnotation;
|
|
13030
|
+
validate(defs2.value, node, 'value', value);
|
|
13197
13031
|
return node;
|
|
13198
13032
|
}
|
|
13199
13033
|
|
|
@@ -13213,12 +13047,12 @@ function objectTypeAnnotation(properties, indexers = [], callProperties = [], in
|
|
|
13213
13047
|
exact,
|
|
13214
13048
|
};
|
|
13215
13049
|
|
|
13216
|
-
const
|
|
13217
|
-
validate(
|
|
13218
|
-
validate(
|
|
13219
|
-
validate(
|
|
13220
|
-
validate(
|
|
13221
|
-
validate(
|
|
13050
|
+
const defs2 = NODE_FIELDS.ObjectTypeAnnotation;
|
|
13051
|
+
validate(defs2.properties, node, 'properties', properties, 1);
|
|
13052
|
+
validate(defs2.indexers, node, 'indexers', indexers, 1);
|
|
13053
|
+
validate(defs2.callProperties, node, 'callProperties', callProperties, 1);
|
|
13054
|
+
validate(defs2.internalSlots, node, 'internalSlots', internalSlots, 1);
|
|
13055
|
+
validate(defs2.exact, node, 'exact', exact);
|
|
13222
13056
|
return node;
|
|
13223
13057
|
}
|
|
13224
13058
|
|
|
@@ -13232,12 +13066,12 @@ function objectTypeInternalSlot(id, value, optional, _static, method) {
|
|
|
13232
13066
|
method,
|
|
13233
13067
|
};
|
|
13234
13068
|
|
|
13235
|
-
const
|
|
13236
|
-
validate(
|
|
13237
|
-
validate(
|
|
13238
|
-
validate(
|
|
13239
|
-
validate(
|
|
13240
|
-
validate(
|
|
13069
|
+
const defs2 = NODE_FIELDS.ObjectTypeInternalSlot;
|
|
13070
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13071
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13072
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
13073
|
+
validate(defs2.static, node, 'static', _static);
|
|
13074
|
+
validate(defs2.method, node, 'method', method);
|
|
13241
13075
|
return node;
|
|
13242
13076
|
}
|
|
13243
13077
|
|
|
@@ -13248,8 +13082,8 @@ function objectTypeCallProperty(value) {
|
|
|
13248
13082
|
static: false,
|
|
13249
13083
|
};
|
|
13250
13084
|
|
|
13251
|
-
const
|
|
13252
|
-
validate(
|
|
13085
|
+
const defs2 = NODE_FIELDS.ObjectTypeCallProperty;
|
|
13086
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13253
13087
|
return node;
|
|
13254
13088
|
}
|
|
13255
13089
|
|
|
@@ -13263,11 +13097,11 @@ function objectTypeIndexer(id = null, key, value, variance2 = null) {
|
|
|
13263
13097
|
static: false,
|
|
13264
13098
|
};
|
|
13265
13099
|
|
|
13266
|
-
const
|
|
13267
|
-
validate(
|
|
13268
|
-
validate(
|
|
13269
|
-
validate(
|
|
13270
|
-
validate(
|
|
13100
|
+
const defs2 = NODE_FIELDS.ObjectTypeIndexer;
|
|
13101
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13102
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13103
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13104
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13271
13105
|
return node;
|
|
13272
13106
|
}
|
|
13273
13107
|
|
|
@@ -13284,10 +13118,10 @@ function objectTypeProperty(key, value, variance2 = null) {
|
|
|
13284
13118
|
static: false,
|
|
13285
13119
|
};
|
|
13286
13120
|
|
|
13287
|
-
const
|
|
13288
|
-
validate(
|
|
13289
|
-
validate(
|
|
13290
|
-
validate(
|
|
13121
|
+
const defs2 = NODE_FIELDS.ObjectTypeProperty;
|
|
13122
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13123
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13124
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13291
13125
|
return node;
|
|
13292
13126
|
}
|
|
13293
13127
|
|
|
@@ -13297,8 +13131,8 @@ function objectTypeSpreadProperty(argument) {
|
|
|
13297
13131
|
argument,
|
|
13298
13132
|
};
|
|
13299
13133
|
|
|
13300
|
-
const
|
|
13301
|
-
validate(
|
|
13134
|
+
const defs2 = NODE_FIELDS.ObjectTypeSpreadProperty;
|
|
13135
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13302
13136
|
return node;
|
|
13303
13137
|
}
|
|
13304
13138
|
|
|
@@ -13311,11 +13145,11 @@ function opaqueType(id, typeParameters = null, supertype = null, impltype) {
|
|
|
13311
13145
|
impltype,
|
|
13312
13146
|
};
|
|
13313
13147
|
|
|
13314
|
-
const
|
|
13315
|
-
validate(
|
|
13316
|
-
validate(
|
|
13317
|
-
validate(
|
|
13318
|
-
validate(
|
|
13148
|
+
const defs2 = NODE_FIELDS.OpaqueType;
|
|
13149
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13150
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13151
|
+
validate(defs2.supertype, node, 'supertype', supertype, 1);
|
|
13152
|
+
validate(defs2.impltype, node, 'impltype', impltype, 1);
|
|
13319
13153
|
return node;
|
|
13320
13154
|
}
|
|
13321
13155
|
|
|
@@ -13326,9 +13160,9 @@ function qualifiedTypeIdentifier(id, qualification) {
|
|
|
13326
13160
|
qualification,
|
|
13327
13161
|
};
|
|
13328
13162
|
|
|
13329
|
-
const
|
|
13330
|
-
validate(
|
|
13331
|
-
validate(
|
|
13163
|
+
const defs2 = NODE_FIELDS.QualifiedTypeIdentifier;
|
|
13164
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13165
|
+
validate(defs2.qualification, node, 'qualification', qualification, 1);
|
|
13332
13166
|
return node;
|
|
13333
13167
|
}
|
|
13334
13168
|
|
|
@@ -13338,8 +13172,8 @@ function stringLiteralTypeAnnotation(value) {
|
|
|
13338
13172
|
value,
|
|
13339
13173
|
};
|
|
13340
13174
|
|
|
13341
|
-
const
|
|
13342
|
-
validate(
|
|
13175
|
+
const defs2 = NODE_FIELDS.StringLiteralTypeAnnotation;
|
|
13176
|
+
validate(defs2.value, node, 'value', value);
|
|
13343
13177
|
return node;
|
|
13344
13178
|
}
|
|
13345
13179
|
|
|
@@ -13367,8 +13201,8 @@ function tupleTypeAnnotation(types2) {
|
|
|
13367
13201
|
types: types2,
|
|
13368
13202
|
};
|
|
13369
13203
|
|
|
13370
|
-
const
|
|
13371
|
-
validate(
|
|
13204
|
+
const defs2 = NODE_FIELDS.TupleTypeAnnotation;
|
|
13205
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13372
13206
|
return node;
|
|
13373
13207
|
}
|
|
13374
13208
|
|
|
@@ -13378,8 +13212,8 @@ function typeofTypeAnnotation(argument) {
|
|
|
13378
13212
|
argument,
|
|
13379
13213
|
};
|
|
13380
13214
|
|
|
13381
|
-
const
|
|
13382
|
-
validate(
|
|
13215
|
+
const defs2 = NODE_FIELDS.TypeofTypeAnnotation;
|
|
13216
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13383
13217
|
return node;
|
|
13384
13218
|
}
|
|
13385
13219
|
|
|
@@ -13391,10 +13225,10 @@ function typeAlias(id, typeParameters = null, right) {
|
|
|
13391
13225
|
right,
|
|
13392
13226
|
};
|
|
13393
13227
|
|
|
13394
|
-
const
|
|
13395
|
-
validate(
|
|
13396
|
-
validate(
|
|
13397
|
-
validate(
|
|
13228
|
+
const defs2 = NODE_FIELDS.TypeAlias;
|
|
13229
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13230
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13231
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
13398
13232
|
return node;
|
|
13399
13233
|
}
|
|
13400
13234
|
|
|
@@ -13404,8 +13238,8 @@ function typeAnnotation(typeAnnotation2) {
|
|
|
13404
13238
|
typeAnnotation: typeAnnotation2,
|
|
13405
13239
|
};
|
|
13406
13240
|
|
|
13407
|
-
const
|
|
13408
|
-
validate(
|
|
13241
|
+
const defs2 = NODE_FIELDS.TypeAnnotation;
|
|
13242
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13409
13243
|
return node;
|
|
13410
13244
|
}
|
|
13411
13245
|
|
|
@@ -13416,9 +13250,9 @@ function typeCastExpression(expression2, typeAnnotation2) {
|
|
|
13416
13250
|
typeAnnotation: typeAnnotation2,
|
|
13417
13251
|
};
|
|
13418
13252
|
|
|
13419
|
-
const
|
|
13420
|
-
validate(
|
|
13421
|
-
validate(
|
|
13253
|
+
const defs2 = NODE_FIELDS.TypeCastExpression;
|
|
13254
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13255
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13422
13256
|
return node;
|
|
13423
13257
|
}
|
|
13424
13258
|
|
|
@@ -13431,11 +13265,11 @@ function typeParameter(name, bound = null, _default = null, variance2 = null) {
|
|
|
13431
13265
|
variance: variance2,
|
|
13432
13266
|
};
|
|
13433
13267
|
|
|
13434
|
-
const
|
|
13435
|
-
validate(
|
|
13436
|
-
validate(
|
|
13437
|
-
validate(
|
|
13438
|
-
validate(
|
|
13268
|
+
const defs2 = NODE_FIELDS.TypeParameter;
|
|
13269
|
+
validate(defs2.name, node, 'name', name);
|
|
13270
|
+
validate(defs2.bound, node, 'bound', bound, 1);
|
|
13271
|
+
validate(defs2.default, node, 'default', _default, 1);
|
|
13272
|
+
validate(defs2.variance, node, 'variance', variance2, 1);
|
|
13439
13273
|
return node;
|
|
13440
13274
|
}
|
|
13441
13275
|
|
|
@@ -13445,8 +13279,8 @@ function typeParameterDeclaration(params) {
|
|
|
13445
13279
|
params,
|
|
13446
13280
|
};
|
|
13447
13281
|
|
|
13448
|
-
const
|
|
13449
|
-
validate(
|
|
13282
|
+
const defs2 = NODE_FIELDS.TypeParameterDeclaration;
|
|
13283
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13450
13284
|
return node;
|
|
13451
13285
|
}
|
|
13452
13286
|
|
|
@@ -13456,8 +13290,8 @@ function typeParameterInstantiation(params) {
|
|
|
13456
13290
|
params,
|
|
13457
13291
|
};
|
|
13458
13292
|
|
|
13459
|
-
const
|
|
13460
|
-
validate(
|
|
13293
|
+
const defs2 = NODE_FIELDS.TypeParameterInstantiation;
|
|
13294
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13461
13295
|
return node;
|
|
13462
13296
|
}
|
|
13463
13297
|
|
|
@@ -13467,8 +13301,8 @@ function unionTypeAnnotation(types2) {
|
|
|
13467
13301
|
types: types2,
|
|
13468
13302
|
};
|
|
13469
13303
|
|
|
13470
|
-
const
|
|
13471
|
-
validate(
|
|
13304
|
+
const defs2 = NODE_FIELDS.UnionTypeAnnotation;
|
|
13305
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
13472
13306
|
return node;
|
|
13473
13307
|
}
|
|
13474
13308
|
|
|
@@ -13478,8 +13312,8 @@ function variance(kind) {
|
|
|
13478
13312
|
kind,
|
|
13479
13313
|
};
|
|
13480
13314
|
|
|
13481
|
-
const
|
|
13482
|
-
validate(
|
|
13315
|
+
const defs2 = NODE_FIELDS.Variance;
|
|
13316
|
+
validate(defs2.kind, node, 'kind', kind);
|
|
13483
13317
|
return node;
|
|
13484
13318
|
}
|
|
13485
13319
|
|
|
@@ -13496,9 +13330,9 @@ function enumDeclaration(id, body) {
|
|
|
13496
13330
|
body,
|
|
13497
13331
|
};
|
|
13498
13332
|
|
|
13499
|
-
const
|
|
13500
|
-
validate(
|
|
13501
|
-
validate(
|
|
13333
|
+
const defs2 = NODE_FIELDS.EnumDeclaration;
|
|
13334
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13335
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13502
13336
|
return node;
|
|
13503
13337
|
}
|
|
13504
13338
|
|
|
@@ -13510,8 +13344,8 @@ function enumBooleanBody(members) {
|
|
|
13510
13344
|
hasUnknownMembers: false,
|
|
13511
13345
|
};
|
|
13512
13346
|
|
|
13513
|
-
const
|
|
13514
|
-
validate(
|
|
13347
|
+
const defs2 = NODE_FIELDS.EnumBooleanBody;
|
|
13348
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13515
13349
|
return node;
|
|
13516
13350
|
}
|
|
13517
13351
|
|
|
@@ -13523,8 +13357,8 @@ function enumNumberBody(members) {
|
|
|
13523
13357
|
hasUnknownMembers: false,
|
|
13524
13358
|
};
|
|
13525
13359
|
|
|
13526
|
-
const
|
|
13527
|
-
validate(
|
|
13360
|
+
const defs2 = NODE_FIELDS.EnumNumberBody;
|
|
13361
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13528
13362
|
return node;
|
|
13529
13363
|
}
|
|
13530
13364
|
|
|
@@ -13536,8 +13370,8 @@ function enumStringBody(members) {
|
|
|
13536
13370
|
hasUnknownMembers: false,
|
|
13537
13371
|
};
|
|
13538
13372
|
|
|
13539
|
-
const
|
|
13540
|
-
validate(
|
|
13373
|
+
const defs2 = NODE_FIELDS.EnumStringBody;
|
|
13374
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13541
13375
|
return node;
|
|
13542
13376
|
}
|
|
13543
13377
|
|
|
@@ -13548,8 +13382,8 @@ function enumSymbolBody(members) {
|
|
|
13548
13382
|
hasUnknownMembers: false,
|
|
13549
13383
|
};
|
|
13550
13384
|
|
|
13551
|
-
const
|
|
13552
|
-
validate(
|
|
13385
|
+
const defs2 = NODE_FIELDS.EnumSymbolBody;
|
|
13386
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
13553
13387
|
return node;
|
|
13554
13388
|
}
|
|
13555
13389
|
|
|
@@ -13560,9 +13394,9 @@ function enumBooleanMember(id, init) {
|
|
|
13560
13394
|
init,
|
|
13561
13395
|
};
|
|
13562
13396
|
|
|
13563
|
-
const
|
|
13564
|
-
validate(
|
|
13565
|
-
validate(
|
|
13397
|
+
const defs2 = NODE_FIELDS.EnumBooleanMember;
|
|
13398
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13399
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13566
13400
|
return node;
|
|
13567
13401
|
}
|
|
13568
13402
|
|
|
@@ -13573,9 +13407,9 @@ function enumNumberMember(id, init) {
|
|
|
13573
13407
|
init,
|
|
13574
13408
|
};
|
|
13575
13409
|
|
|
13576
|
-
const
|
|
13577
|
-
validate(
|
|
13578
|
-
validate(
|
|
13410
|
+
const defs2 = NODE_FIELDS.EnumNumberMember;
|
|
13411
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13412
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13579
13413
|
return node;
|
|
13580
13414
|
}
|
|
13581
13415
|
|
|
@@ -13586,9 +13420,9 @@ function enumStringMember(id, init) {
|
|
|
13586
13420
|
init,
|
|
13587
13421
|
};
|
|
13588
13422
|
|
|
13589
|
-
const
|
|
13590
|
-
validate(
|
|
13591
|
-
validate(
|
|
13423
|
+
const defs2 = NODE_FIELDS.EnumStringMember;
|
|
13424
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13425
|
+
validate(defs2.init, node, 'init', init, 1);
|
|
13592
13426
|
return node;
|
|
13593
13427
|
}
|
|
13594
13428
|
|
|
@@ -13598,8 +13432,8 @@ function enumDefaultedMember(id) {
|
|
|
13598
13432
|
id,
|
|
13599
13433
|
};
|
|
13600
13434
|
|
|
13601
|
-
const
|
|
13602
|
-
validate(
|
|
13435
|
+
const defs2 = NODE_FIELDS.EnumDefaultedMember;
|
|
13436
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13603
13437
|
return node;
|
|
13604
13438
|
}
|
|
13605
13439
|
|
|
@@ -13610,9 +13444,9 @@ function indexedAccessType(objectType, indexType) {
|
|
|
13610
13444
|
indexType,
|
|
13611
13445
|
};
|
|
13612
13446
|
|
|
13613
|
-
const
|
|
13614
|
-
validate(
|
|
13615
|
-
validate(
|
|
13447
|
+
const defs2 = NODE_FIELDS.IndexedAccessType;
|
|
13448
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
13449
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
13616
13450
|
return node;
|
|
13617
13451
|
}
|
|
13618
13452
|
|
|
@@ -13624,9 +13458,9 @@ function optionalIndexedAccessType(objectType, indexType) {
|
|
|
13624
13458
|
optional: false,
|
|
13625
13459
|
};
|
|
13626
13460
|
|
|
13627
|
-
const
|
|
13628
|
-
validate(
|
|
13629
|
-
validate(
|
|
13461
|
+
const defs2 = NODE_FIELDS.OptionalIndexedAccessType;
|
|
13462
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
13463
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
13630
13464
|
return node;
|
|
13631
13465
|
}
|
|
13632
13466
|
|
|
@@ -13637,9 +13471,9 @@ function jsxAttribute(name, value = null) {
|
|
|
13637
13471
|
value,
|
|
13638
13472
|
};
|
|
13639
13473
|
|
|
13640
|
-
const
|
|
13641
|
-
validate(
|
|
13642
|
-
validate(
|
|
13474
|
+
const defs2 = NODE_FIELDS.JSXAttribute;
|
|
13475
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13476
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13643
13477
|
return node;
|
|
13644
13478
|
}
|
|
13645
13479
|
|
|
@@ -13649,8 +13483,8 @@ function jsxClosingElement(name) {
|
|
|
13649
13483
|
name,
|
|
13650
13484
|
};
|
|
13651
13485
|
|
|
13652
|
-
const
|
|
13653
|
-
validate(
|
|
13486
|
+
const defs2 = NODE_FIELDS.JSXClosingElement;
|
|
13487
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13654
13488
|
return node;
|
|
13655
13489
|
}
|
|
13656
13490
|
|
|
@@ -13662,10 +13496,10 @@ function jsxElement(openingElement, closingElement = null, children) {
|
|
|
13662
13496
|
children,
|
|
13663
13497
|
};
|
|
13664
13498
|
|
|
13665
|
-
const
|
|
13666
|
-
validate(
|
|
13667
|
-
validate(
|
|
13668
|
-
validate(
|
|
13499
|
+
const defs2 = NODE_FIELDS.JSXElement;
|
|
13500
|
+
validate(defs2.openingElement, node, 'openingElement', openingElement, 1);
|
|
13501
|
+
validate(defs2.closingElement, node, 'closingElement', closingElement, 1);
|
|
13502
|
+
validate(defs2.children, node, 'children', children, 1);
|
|
13669
13503
|
return node;
|
|
13670
13504
|
}
|
|
13671
13505
|
|
|
@@ -13681,8 +13515,8 @@ function jsxExpressionContainer(expression2) {
|
|
|
13681
13515
|
expression: expression2,
|
|
13682
13516
|
};
|
|
13683
13517
|
|
|
13684
|
-
const
|
|
13685
|
-
validate(
|
|
13518
|
+
const defs2 = NODE_FIELDS.JSXExpressionContainer;
|
|
13519
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13686
13520
|
return node;
|
|
13687
13521
|
}
|
|
13688
13522
|
|
|
@@ -13692,8 +13526,8 @@ function jsxSpreadChild(expression2) {
|
|
|
13692
13526
|
expression: expression2,
|
|
13693
13527
|
};
|
|
13694
13528
|
|
|
13695
|
-
const
|
|
13696
|
-
validate(
|
|
13529
|
+
const defs2 = NODE_FIELDS.JSXSpreadChild;
|
|
13530
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13697
13531
|
return node;
|
|
13698
13532
|
}
|
|
13699
13533
|
|
|
@@ -13703,8 +13537,8 @@ function jsxIdentifier(name) {
|
|
|
13703
13537
|
name,
|
|
13704
13538
|
};
|
|
13705
13539
|
|
|
13706
|
-
const
|
|
13707
|
-
validate(
|
|
13540
|
+
const defs2 = NODE_FIELDS.JSXIdentifier;
|
|
13541
|
+
validate(defs2.name, node, 'name', name);
|
|
13708
13542
|
return node;
|
|
13709
13543
|
}
|
|
13710
13544
|
|
|
@@ -13715,9 +13549,9 @@ function jsxMemberExpression(object, property) {
|
|
|
13715
13549
|
property,
|
|
13716
13550
|
};
|
|
13717
13551
|
|
|
13718
|
-
const
|
|
13719
|
-
validate(
|
|
13720
|
-
validate(
|
|
13552
|
+
const defs2 = NODE_FIELDS.JSXMemberExpression;
|
|
13553
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
13554
|
+
validate(defs2.property, node, 'property', property, 1);
|
|
13721
13555
|
return node;
|
|
13722
13556
|
}
|
|
13723
13557
|
|
|
@@ -13728,9 +13562,9 @@ function jsxNamespacedName(namespace, name) {
|
|
|
13728
13562
|
name,
|
|
13729
13563
|
};
|
|
13730
13564
|
|
|
13731
|
-
const
|
|
13732
|
-
validate(
|
|
13733
|
-
validate(
|
|
13565
|
+
const defs2 = NODE_FIELDS.JSXNamespacedName;
|
|
13566
|
+
validate(defs2.namespace, node, 'namespace', namespace, 1);
|
|
13567
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13734
13568
|
return node;
|
|
13735
13569
|
}
|
|
13736
13570
|
|
|
@@ -13742,10 +13576,10 @@ function jsxOpeningElement(name, attributes, selfClosing = false) {
|
|
|
13742
13576
|
selfClosing,
|
|
13743
13577
|
};
|
|
13744
13578
|
|
|
13745
|
-
const
|
|
13746
|
-
validate(
|
|
13747
|
-
validate(
|
|
13748
|
-
validate(
|
|
13579
|
+
const defs2 = NODE_FIELDS.JSXOpeningElement;
|
|
13580
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13581
|
+
validate(defs2.attributes, node, 'attributes', attributes, 1);
|
|
13582
|
+
validate(defs2.selfClosing, node, 'selfClosing', selfClosing);
|
|
13749
13583
|
return node;
|
|
13750
13584
|
}
|
|
13751
13585
|
|
|
@@ -13755,8 +13589,8 @@ function jsxSpreadAttribute(argument) {
|
|
|
13755
13589
|
argument,
|
|
13756
13590
|
};
|
|
13757
13591
|
|
|
13758
|
-
const
|
|
13759
|
-
validate(
|
|
13592
|
+
const defs2 = NODE_FIELDS.JSXSpreadAttribute;
|
|
13593
|
+
validate(defs2.argument, node, 'argument', argument, 1);
|
|
13760
13594
|
return node;
|
|
13761
13595
|
}
|
|
13762
13596
|
|
|
@@ -13766,8 +13600,8 @@ function jsxText(value) {
|
|
|
13766
13600
|
value,
|
|
13767
13601
|
};
|
|
13768
13602
|
|
|
13769
|
-
const
|
|
13770
|
-
validate(
|
|
13603
|
+
const defs2 = NODE_FIELDS.JSXText;
|
|
13604
|
+
validate(defs2.value, node, 'value', value);
|
|
13771
13605
|
return node;
|
|
13772
13606
|
}
|
|
13773
13607
|
|
|
@@ -13779,10 +13613,10 @@ function jsxFragment(openingFragment, closingFragment, children) {
|
|
|
13779
13613
|
children,
|
|
13780
13614
|
};
|
|
13781
13615
|
|
|
13782
|
-
const
|
|
13783
|
-
validate(
|
|
13784
|
-
validate(
|
|
13785
|
-
validate(
|
|
13616
|
+
const defs2 = NODE_FIELDS.JSXFragment;
|
|
13617
|
+
validate(defs2.openingFragment, node, 'openingFragment', openingFragment, 1);
|
|
13618
|
+
validate(defs2.closingFragment, node, 'closingFragment', closingFragment, 1);
|
|
13619
|
+
validate(defs2.children, node, 'children', children, 1);
|
|
13786
13620
|
return node;
|
|
13787
13621
|
}
|
|
13788
13622
|
|
|
@@ -13805,9 +13639,9 @@ function placeholder(expectedNode, name) {
|
|
|
13805
13639
|
name,
|
|
13806
13640
|
};
|
|
13807
13641
|
|
|
13808
|
-
const
|
|
13809
|
-
validate(
|
|
13810
|
-
validate(
|
|
13642
|
+
const defs2 = NODE_FIELDS.Placeholder;
|
|
13643
|
+
validate(defs2.expectedNode, node, 'expectedNode', expectedNode);
|
|
13644
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
13811
13645
|
return node;
|
|
13812
13646
|
}
|
|
13813
13647
|
|
|
@@ -13817,8 +13651,8 @@ function v8IntrinsicIdentifier(name) {
|
|
|
13817
13651
|
name,
|
|
13818
13652
|
};
|
|
13819
13653
|
|
|
13820
|
-
const
|
|
13821
|
-
validate(
|
|
13654
|
+
const defs2 = NODE_FIELDS.V8IntrinsicIdentifier;
|
|
13655
|
+
validate(defs2.name, node, 'name', name);
|
|
13822
13656
|
return node;
|
|
13823
13657
|
}
|
|
13824
13658
|
|
|
@@ -13835,9 +13669,30 @@ function bindExpression(object, callee) {
|
|
|
13835
13669
|
callee,
|
|
13836
13670
|
};
|
|
13837
13671
|
|
|
13838
|
-
const
|
|
13839
|
-
validate(
|
|
13840
|
-
validate(
|
|
13672
|
+
const defs2 = NODE_FIELDS.BindExpression;
|
|
13673
|
+
validate(defs2.object, node, 'object', object, 1);
|
|
13674
|
+
validate(defs2.callee, node, 'callee', callee, 1);
|
|
13675
|
+
return node;
|
|
13676
|
+
}
|
|
13677
|
+
|
|
13678
|
+
function classAccessorProperty(key, value = null, typeAnnotation2 = null, decorators = null, computed = false, _static = false) {
|
|
13679
|
+
const node = {
|
|
13680
|
+
type: 'ClassAccessorProperty',
|
|
13681
|
+
key,
|
|
13682
|
+
value,
|
|
13683
|
+
typeAnnotation: typeAnnotation2,
|
|
13684
|
+
decorators,
|
|
13685
|
+
computed,
|
|
13686
|
+
static: _static,
|
|
13687
|
+
};
|
|
13688
|
+
|
|
13689
|
+
const defs2 = NODE_FIELDS.ClassAccessorProperty;
|
|
13690
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13691
|
+
validate(defs2.value, node, 'value', value, 1);
|
|
13692
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
13693
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
13694
|
+
validate(defs2.computed, node, 'computed', computed);
|
|
13695
|
+
validate(defs2.static, node, 'static', _static);
|
|
13841
13696
|
return node;
|
|
13842
13697
|
}
|
|
13843
13698
|
|
|
@@ -13847,8 +13702,8 @@ function decorator(expression2) {
|
|
|
13847
13702
|
expression: expression2,
|
|
13848
13703
|
};
|
|
13849
13704
|
|
|
13850
|
-
const
|
|
13851
|
-
validate(
|
|
13705
|
+
const defs2 = NODE_FIELDS.Decorator;
|
|
13706
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
13852
13707
|
return node;
|
|
13853
13708
|
}
|
|
13854
13709
|
|
|
@@ -13859,9 +13714,9 @@ function doExpression(body, async = false) {
|
|
|
13859
13714
|
async,
|
|
13860
13715
|
};
|
|
13861
13716
|
|
|
13862
|
-
const
|
|
13863
|
-
validate(
|
|
13864
|
-
validate(
|
|
13717
|
+
const defs2 = NODE_FIELDS.DoExpression;
|
|
13718
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13719
|
+
validate(defs2.async, node, 'async', async);
|
|
13865
13720
|
return node;
|
|
13866
13721
|
}
|
|
13867
13722
|
|
|
@@ -13871,8 +13726,8 @@ function exportDefaultSpecifier(exported) {
|
|
|
13871
13726
|
exported,
|
|
13872
13727
|
};
|
|
13873
13728
|
|
|
13874
|
-
const
|
|
13875
|
-
validate(
|
|
13729
|
+
const defs2 = NODE_FIELDS.ExportDefaultSpecifier;
|
|
13730
|
+
validate(defs2.exported, node, 'exported', exported, 1);
|
|
13876
13731
|
return node;
|
|
13877
13732
|
}
|
|
13878
13733
|
|
|
@@ -13882,8 +13737,8 @@ function moduleExpression(body) {
|
|
|
13882
13737
|
body,
|
|
13883
13738
|
};
|
|
13884
13739
|
|
|
13885
|
-
const
|
|
13886
|
-
validate(
|
|
13740
|
+
const defs2 = NODE_FIELDS.ModuleExpression;
|
|
13741
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
13887
13742
|
return node;
|
|
13888
13743
|
}
|
|
13889
13744
|
|
|
@@ -13893,34 +13748,6 @@ function topicReference() {
|
|
|
13893
13748
|
};
|
|
13894
13749
|
}
|
|
13895
13750
|
|
|
13896
|
-
function pipelineTopicExpression(expression2) {
|
|
13897
|
-
const node = {
|
|
13898
|
-
type: 'PipelineTopicExpression',
|
|
13899
|
-
expression: expression2,
|
|
13900
|
-
};
|
|
13901
|
-
|
|
13902
|
-
const defs = NODE_FIELDS.PipelineTopicExpression;
|
|
13903
|
-
validate(defs.expression, node, 'expression', expression2, 1);
|
|
13904
|
-
return node;
|
|
13905
|
-
}
|
|
13906
|
-
|
|
13907
|
-
function pipelineBareFunction(callee) {
|
|
13908
|
-
const node = {
|
|
13909
|
-
type: 'PipelineBareFunction',
|
|
13910
|
-
callee,
|
|
13911
|
-
};
|
|
13912
|
-
|
|
13913
|
-
const defs = NODE_FIELDS.PipelineBareFunction;
|
|
13914
|
-
validate(defs.callee, node, 'callee', callee, 1);
|
|
13915
|
-
return node;
|
|
13916
|
-
}
|
|
13917
|
-
|
|
13918
|
-
function pipelinePrimaryTopicReference() {
|
|
13919
|
-
return {
|
|
13920
|
-
type: 'PipelinePrimaryTopicReference',
|
|
13921
|
-
};
|
|
13922
|
-
}
|
|
13923
|
-
|
|
13924
13751
|
function voidPattern() {
|
|
13925
13752
|
return {
|
|
13926
13753
|
type: 'VoidPattern',
|
|
@@ -13933,8 +13760,8 @@ function tsParameterProperty(parameter) {
|
|
|
13933
13760
|
parameter,
|
|
13934
13761
|
};
|
|
13935
13762
|
|
|
13936
|
-
const
|
|
13937
|
-
validate(
|
|
13763
|
+
const defs2 = NODE_FIELDS.TSParameterProperty;
|
|
13764
|
+
validate(defs2.parameter, node, 'parameter', parameter, 1);
|
|
13938
13765
|
return node;
|
|
13939
13766
|
}
|
|
13940
13767
|
|
|
@@ -13949,11 +13776,11 @@ function tsDeclareFunction(id = null, typeParameters = null, params, returnType
|
|
|
13949
13776
|
generator: false,
|
|
13950
13777
|
};
|
|
13951
13778
|
|
|
13952
|
-
const
|
|
13953
|
-
validate(
|
|
13954
|
-
validate(
|
|
13955
|
-
validate(
|
|
13956
|
-
validate(
|
|
13779
|
+
const defs2 = NODE_FIELDS.TSDeclareFunction;
|
|
13780
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
13781
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13782
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13783
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13957
13784
|
return node;
|
|
13958
13785
|
}
|
|
13959
13786
|
|
|
@@ -13972,12 +13799,12 @@ function tsDeclareMethod(decorators = null, key, typeParameters = null, params,
|
|
|
13972
13799
|
static: false,
|
|
13973
13800
|
};
|
|
13974
13801
|
|
|
13975
|
-
const
|
|
13976
|
-
validate(
|
|
13977
|
-
validate(
|
|
13978
|
-
validate(
|
|
13979
|
-
validate(
|
|
13980
|
-
validate(
|
|
13802
|
+
const defs2 = NODE_FIELDS.TSDeclareMethod;
|
|
13803
|
+
validate(defs2.decorators, node, 'decorators', decorators, 1);
|
|
13804
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13805
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13806
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13807
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
13981
13808
|
return node;
|
|
13982
13809
|
}
|
|
13983
13810
|
|
|
@@ -13988,9 +13815,9 @@ function tsQualifiedName(left, right) {
|
|
|
13988
13815
|
right,
|
|
13989
13816
|
};
|
|
13990
13817
|
|
|
13991
|
-
const
|
|
13992
|
-
validate(
|
|
13993
|
-
validate(
|
|
13818
|
+
const defs2 = NODE_FIELDS.TSQualifiedName;
|
|
13819
|
+
validate(defs2.left, node, 'left', left, 1);
|
|
13820
|
+
validate(defs2.right, node, 'right', right, 1);
|
|
13994
13821
|
return node;
|
|
13995
13822
|
}
|
|
13996
13823
|
|
|
@@ -14002,10 +13829,10 @@ function tsCallSignatureDeclaration(typeParameters = null, params, returnType =
|
|
|
14002
13829
|
returnType,
|
|
14003
13830
|
};
|
|
14004
13831
|
|
|
14005
|
-
const
|
|
14006
|
-
validate(
|
|
14007
|
-
validate(
|
|
14008
|
-
validate(
|
|
13832
|
+
const defs2 = NODE_FIELDS.TSCallSignatureDeclaration;
|
|
13833
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13834
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13835
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14009
13836
|
return node;
|
|
14010
13837
|
}
|
|
14011
13838
|
|
|
@@ -14017,10 +13844,10 @@ function tsConstructSignatureDeclaration(typeParameters = null, params, returnTy
|
|
|
14017
13844
|
returnType,
|
|
14018
13845
|
};
|
|
14019
13846
|
|
|
14020
|
-
const
|
|
14021
|
-
validate(
|
|
14022
|
-
validate(
|
|
14023
|
-
validate(
|
|
13847
|
+
const defs2 = NODE_FIELDS.TSConstructSignatureDeclaration;
|
|
13848
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13849
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13850
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14024
13851
|
return node;
|
|
14025
13852
|
}
|
|
14026
13853
|
|
|
@@ -14032,9 +13859,9 @@ function tsPropertySignature(key, typeAnnotation2 = null) {
|
|
|
14032
13859
|
computed: false,
|
|
14033
13860
|
};
|
|
14034
13861
|
|
|
14035
|
-
const
|
|
14036
|
-
validate(
|
|
14037
|
-
validate(
|
|
13862
|
+
const defs2 = NODE_FIELDS.TSPropertySignature;
|
|
13863
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13864
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14038
13865
|
return node;
|
|
14039
13866
|
}
|
|
14040
13867
|
|
|
@@ -14049,11 +13876,11 @@ function tsMethodSignature(key, typeParameters = null, params, returnType = null
|
|
|
14049
13876
|
kind: 'method',
|
|
14050
13877
|
};
|
|
14051
13878
|
|
|
14052
|
-
const
|
|
14053
|
-
validate(
|
|
14054
|
-
validate(
|
|
14055
|
-
validate(
|
|
14056
|
-
validate(
|
|
13879
|
+
const defs2 = NODE_FIELDS.TSMethodSignature;
|
|
13880
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
13881
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13882
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13883
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14057
13884
|
return node;
|
|
14058
13885
|
}
|
|
14059
13886
|
|
|
@@ -14064,9 +13891,9 @@ function tsIndexSignature(parameters, typeAnnotation2 = null) {
|
|
|
14064
13891
|
typeAnnotation: typeAnnotation2,
|
|
14065
13892
|
};
|
|
14066
13893
|
|
|
14067
|
-
const
|
|
14068
|
-
validate(
|
|
14069
|
-
validate(
|
|
13894
|
+
const defs2 = NODE_FIELDS.TSIndexSignature;
|
|
13895
|
+
validate(defs2.parameters, node, 'parameters', parameters, 1);
|
|
13896
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14070
13897
|
return node;
|
|
14071
13898
|
}
|
|
14072
13899
|
|
|
@@ -14162,10 +13989,10 @@ function tsFunctionType(typeParameters = null, params, returnType = null) {
|
|
|
14162
13989
|
returnType,
|
|
14163
13990
|
};
|
|
14164
13991
|
|
|
14165
|
-
const
|
|
14166
|
-
validate(
|
|
14167
|
-
validate(
|
|
14168
|
-
validate(
|
|
13992
|
+
const defs2 = NODE_FIELDS.TSFunctionType;
|
|
13993
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
13994
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
13995
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14169
13996
|
return node;
|
|
14170
13997
|
}
|
|
14171
13998
|
|
|
@@ -14177,10 +14004,10 @@ function tsConstructorType(typeParameters = null, params, returnType = null) {
|
|
|
14177
14004
|
returnType,
|
|
14178
14005
|
};
|
|
14179
14006
|
|
|
14180
|
-
const
|
|
14181
|
-
validate(
|
|
14182
|
-
validate(
|
|
14183
|
-
validate(
|
|
14007
|
+
const defs2 = NODE_FIELDS.TSConstructorType;
|
|
14008
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14009
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14010
|
+
validate(defs2.returnType, node, 'returnType', returnType, 1);
|
|
14184
14011
|
return node;
|
|
14185
14012
|
}
|
|
14186
14013
|
|
|
@@ -14191,9 +14018,9 @@ function tsTypeReference(typeName, typeArguments = null) {
|
|
|
14191
14018
|
typeArguments,
|
|
14192
14019
|
};
|
|
14193
14020
|
|
|
14194
|
-
const
|
|
14195
|
-
validate(
|
|
14196
|
-
validate(
|
|
14021
|
+
const defs2 = NODE_FIELDS.TSTypeReference;
|
|
14022
|
+
validate(defs2.typeName, node, 'typeName', typeName, 1);
|
|
14023
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14197
14024
|
return node;
|
|
14198
14025
|
}
|
|
14199
14026
|
|
|
@@ -14205,10 +14032,10 @@ function tsTypePredicate(parameterName, typeAnnotation2 = null, asserts = null)
|
|
|
14205
14032
|
asserts,
|
|
14206
14033
|
};
|
|
14207
14034
|
|
|
14208
|
-
const
|
|
14209
|
-
validate(
|
|
14210
|
-
validate(
|
|
14211
|
-
validate(
|
|
14035
|
+
const defs2 = NODE_FIELDS.TSTypePredicate;
|
|
14036
|
+
validate(defs2.parameterName, node, 'parameterName', parameterName, 1);
|
|
14037
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14038
|
+
validate(defs2.asserts, node, 'asserts', asserts);
|
|
14212
14039
|
return node;
|
|
14213
14040
|
}
|
|
14214
14041
|
|
|
@@ -14219,9 +14046,9 @@ function tsTypeQuery(exprName, typeArguments = null) {
|
|
|
14219
14046
|
typeArguments,
|
|
14220
14047
|
};
|
|
14221
14048
|
|
|
14222
|
-
const
|
|
14223
|
-
validate(
|
|
14224
|
-
validate(
|
|
14049
|
+
const defs2 = NODE_FIELDS.TSTypeQuery;
|
|
14050
|
+
validate(defs2.exprName, node, 'exprName', exprName, 1);
|
|
14051
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14225
14052
|
return node;
|
|
14226
14053
|
}
|
|
14227
14054
|
|
|
@@ -14231,8 +14058,8 @@ function tsTypeLiteral(members) {
|
|
|
14231
14058
|
members,
|
|
14232
14059
|
};
|
|
14233
14060
|
|
|
14234
|
-
const
|
|
14235
|
-
validate(
|
|
14061
|
+
const defs2 = NODE_FIELDS.TSTypeLiteral;
|
|
14062
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
14236
14063
|
return node;
|
|
14237
14064
|
}
|
|
14238
14065
|
|
|
@@ -14242,8 +14069,8 @@ function tsArrayType(elementType) {
|
|
|
14242
14069
|
elementType,
|
|
14243
14070
|
};
|
|
14244
14071
|
|
|
14245
|
-
const
|
|
14246
|
-
validate(
|
|
14072
|
+
const defs2 = NODE_FIELDS.TSArrayType;
|
|
14073
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
14247
14074
|
return node;
|
|
14248
14075
|
}
|
|
14249
14076
|
|
|
@@ -14253,8 +14080,8 @@ function tsTupleType(elementTypes) {
|
|
|
14253
14080
|
elementTypes,
|
|
14254
14081
|
};
|
|
14255
14082
|
|
|
14256
|
-
const
|
|
14257
|
-
validate(
|
|
14083
|
+
const defs2 = NODE_FIELDS.TSTupleType;
|
|
14084
|
+
validate(defs2.elementTypes, node, 'elementTypes', elementTypes, 1);
|
|
14258
14085
|
return node;
|
|
14259
14086
|
}
|
|
14260
14087
|
|
|
@@ -14264,8 +14091,8 @@ function tsOptionalType(typeAnnotation2) {
|
|
|
14264
14091
|
typeAnnotation: typeAnnotation2,
|
|
14265
14092
|
};
|
|
14266
14093
|
|
|
14267
|
-
const
|
|
14268
|
-
validate(
|
|
14094
|
+
const defs2 = NODE_FIELDS.TSOptionalType;
|
|
14095
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14269
14096
|
return node;
|
|
14270
14097
|
}
|
|
14271
14098
|
|
|
@@ -14275,8 +14102,8 @@ function tsRestType(typeAnnotation2) {
|
|
|
14275
14102
|
typeAnnotation: typeAnnotation2,
|
|
14276
14103
|
};
|
|
14277
14104
|
|
|
14278
|
-
const
|
|
14279
|
-
validate(
|
|
14105
|
+
const defs2 = NODE_FIELDS.TSRestType;
|
|
14106
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14280
14107
|
return node;
|
|
14281
14108
|
}
|
|
14282
14109
|
|
|
@@ -14288,10 +14115,10 @@ function tsNamedTupleMember(label, elementType, optional = false) {
|
|
|
14288
14115
|
optional,
|
|
14289
14116
|
};
|
|
14290
14117
|
|
|
14291
|
-
const
|
|
14292
|
-
validate(
|
|
14293
|
-
validate(
|
|
14294
|
-
validate(
|
|
14118
|
+
const defs2 = NODE_FIELDS.TSNamedTupleMember;
|
|
14119
|
+
validate(defs2.label, node, 'label', label, 1);
|
|
14120
|
+
validate(defs2.elementType, node, 'elementType', elementType, 1);
|
|
14121
|
+
validate(defs2.optional, node, 'optional', optional);
|
|
14295
14122
|
return node;
|
|
14296
14123
|
}
|
|
14297
14124
|
|
|
@@ -14301,8 +14128,8 @@ function tsUnionType(types2) {
|
|
|
14301
14128
|
types: types2,
|
|
14302
14129
|
};
|
|
14303
14130
|
|
|
14304
|
-
const
|
|
14305
|
-
validate(
|
|
14131
|
+
const defs2 = NODE_FIELDS.TSUnionType;
|
|
14132
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14306
14133
|
return node;
|
|
14307
14134
|
}
|
|
14308
14135
|
|
|
@@ -14312,8 +14139,8 @@ function tsIntersectionType(types2) {
|
|
|
14312
14139
|
types: types2,
|
|
14313
14140
|
};
|
|
14314
14141
|
|
|
14315
|
-
const
|
|
14316
|
-
validate(
|
|
14142
|
+
const defs2 = NODE_FIELDS.TSIntersectionType;
|
|
14143
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14317
14144
|
return node;
|
|
14318
14145
|
}
|
|
14319
14146
|
|
|
@@ -14326,11 +14153,11 @@ function tsConditionalType(checkType, extendsType, trueType, falseType) {
|
|
|
14326
14153
|
falseType,
|
|
14327
14154
|
};
|
|
14328
14155
|
|
|
14329
|
-
const
|
|
14330
|
-
validate(
|
|
14331
|
-
validate(
|
|
14332
|
-
validate(
|
|
14333
|
-
validate(
|
|
14156
|
+
const defs2 = NODE_FIELDS.TSConditionalType;
|
|
14157
|
+
validate(defs2.checkType, node, 'checkType', checkType, 1);
|
|
14158
|
+
validate(defs2.extendsType, node, 'extendsType', extendsType, 1);
|
|
14159
|
+
validate(defs2.trueType, node, 'trueType', trueType, 1);
|
|
14160
|
+
validate(defs2.falseType, node, 'falseType', falseType, 1);
|
|
14334
14161
|
return node;
|
|
14335
14162
|
}
|
|
14336
14163
|
|
|
@@ -14340,8 +14167,8 @@ function tsInferType(typeParameter2) {
|
|
|
14340
14167
|
typeParameter: typeParameter2,
|
|
14341
14168
|
};
|
|
14342
14169
|
|
|
14343
|
-
const
|
|
14344
|
-
validate(
|
|
14170
|
+
const defs2 = NODE_FIELDS.TSInferType;
|
|
14171
|
+
validate(defs2.typeParameter, node, 'typeParameter', typeParameter2, 1);
|
|
14345
14172
|
return node;
|
|
14346
14173
|
}
|
|
14347
14174
|
|
|
@@ -14351,8 +14178,8 @@ function tsParenthesizedType(typeAnnotation2) {
|
|
|
14351
14178
|
typeAnnotation: typeAnnotation2,
|
|
14352
14179
|
};
|
|
14353
14180
|
|
|
14354
|
-
const
|
|
14355
|
-
validate(
|
|
14181
|
+
const defs2 = NODE_FIELDS.TSParenthesizedType;
|
|
14182
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14356
14183
|
return node;
|
|
14357
14184
|
}
|
|
14358
14185
|
|
|
@@ -14363,9 +14190,9 @@ function tsTypeOperator(typeAnnotation2, operator) {
|
|
|
14363
14190
|
operator,
|
|
14364
14191
|
};
|
|
14365
14192
|
|
|
14366
|
-
const
|
|
14367
|
-
validate(
|
|
14368
|
-
validate(
|
|
14193
|
+
const defs2 = NODE_FIELDS.TSTypeOperator;
|
|
14194
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14195
|
+
validate(defs2.operator, node, 'operator', operator);
|
|
14369
14196
|
return node;
|
|
14370
14197
|
}
|
|
14371
14198
|
|
|
@@ -14376,9 +14203,9 @@ function tsIndexedAccessType(objectType, indexType) {
|
|
|
14376
14203
|
indexType,
|
|
14377
14204
|
};
|
|
14378
14205
|
|
|
14379
|
-
const
|
|
14380
|
-
validate(
|
|
14381
|
-
validate(
|
|
14206
|
+
const defs2 = NODE_FIELDS.TSIndexedAccessType;
|
|
14207
|
+
validate(defs2.objectType, node, 'objectType', objectType, 1);
|
|
14208
|
+
validate(defs2.indexType, node, 'indexType', indexType, 1);
|
|
14382
14209
|
return node;
|
|
14383
14210
|
}
|
|
14384
14211
|
|
|
@@ -14391,11 +14218,11 @@ function tsMappedType(key, constraint, nameType = null, typeAnnotation2 = null)
|
|
|
14391
14218
|
typeAnnotation: typeAnnotation2,
|
|
14392
14219
|
};
|
|
14393
14220
|
|
|
14394
|
-
const
|
|
14395
|
-
validate(
|
|
14396
|
-
validate(
|
|
14397
|
-
validate(
|
|
14398
|
-
validate(
|
|
14221
|
+
const defs2 = NODE_FIELDS.TSMappedType;
|
|
14222
|
+
validate(defs2.key, node, 'key', key, 1);
|
|
14223
|
+
validate(defs2.constraint, node, 'constraint', constraint, 1);
|
|
14224
|
+
validate(defs2.nameType, node, 'nameType', nameType, 1);
|
|
14225
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14399
14226
|
return node;
|
|
14400
14227
|
}
|
|
14401
14228
|
|
|
@@ -14406,9 +14233,9 @@ function tsTemplateLiteralType(quasis, types2) {
|
|
|
14406
14233
|
types: types2,
|
|
14407
14234
|
};
|
|
14408
14235
|
|
|
14409
|
-
const
|
|
14410
|
-
validate(
|
|
14411
|
-
validate(
|
|
14236
|
+
const defs2 = NODE_FIELDS.TSTemplateLiteralType;
|
|
14237
|
+
validate(defs2.quasis, node, 'quasis', quasis, 1);
|
|
14238
|
+
validate(defs2.types, node, 'types', types2, 1);
|
|
14412
14239
|
return node;
|
|
14413
14240
|
}
|
|
14414
14241
|
|
|
@@ -14418,8 +14245,8 @@ function tsLiteralType(literal) {
|
|
|
14418
14245
|
literal,
|
|
14419
14246
|
};
|
|
14420
14247
|
|
|
14421
|
-
const
|
|
14422
|
-
validate(
|
|
14248
|
+
const defs2 = NODE_FIELDS.TSLiteralType;
|
|
14249
|
+
validate(defs2.literal, node, 'literal', literal, 1);
|
|
14423
14250
|
return node;
|
|
14424
14251
|
}
|
|
14425
14252
|
|
|
@@ -14430,9 +14257,9 @@ function tsClassImplements(expression2, typeArguments = null) {
|
|
|
14430
14257
|
typeArguments,
|
|
14431
14258
|
};
|
|
14432
14259
|
|
|
14433
|
-
const
|
|
14434
|
-
validate(
|
|
14435
|
-
validate(
|
|
14260
|
+
const defs2 = NODE_FIELDS.TSClassImplements;
|
|
14261
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14262
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14436
14263
|
return node;
|
|
14437
14264
|
}
|
|
14438
14265
|
|
|
@@ -14443,9 +14270,9 @@ function tsInterfaceHeritage(expression2, typeArguments = null) {
|
|
|
14443
14270
|
typeArguments,
|
|
14444
14271
|
};
|
|
14445
14272
|
|
|
14446
|
-
const
|
|
14447
|
-
validate(
|
|
14448
|
-
validate(
|
|
14273
|
+
const defs2 = NODE_FIELDS.TSInterfaceHeritage;
|
|
14274
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14275
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14449
14276
|
return node;
|
|
14450
14277
|
}
|
|
14451
14278
|
|
|
@@ -14458,11 +14285,11 @@ function tsInterfaceDeclaration(id, typeParameters = null, _extends = null, body
|
|
|
14458
14285
|
body,
|
|
14459
14286
|
};
|
|
14460
14287
|
|
|
14461
|
-
const
|
|
14462
|
-
validate(
|
|
14463
|
-
validate(
|
|
14464
|
-
validate(
|
|
14465
|
-
validate(
|
|
14288
|
+
const defs2 = NODE_FIELDS.TSInterfaceDeclaration;
|
|
14289
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14290
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14291
|
+
validate(defs2.extends, node, 'extends', _extends, 1);
|
|
14292
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14466
14293
|
return node;
|
|
14467
14294
|
}
|
|
14468
14295
|
|
|
@@ -14472,8 +14299,8 @@ function tsInterfaceBody(body) {
|
|
|
14472
14299
|
body,
|
|
14473
14300
|
};
|
|
14474
14301
|
|
|
14475
|
-
const
|
|
14476
|
-
validate(
|
|
14302
|
+
const defs2 = NODE_FIELDS.TSInterfaceBody;
|
|
14303
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14477
14304
|
return node;
|
|
14478
14305
|
}
|
|
14479
14306
|
|
|
@@ -14485,10 +14312,10 @@ function tsTypeAliasDeclaration(id, typeParameters = null, typeAnnotation2) {
|
|
|
14485
14312
|
typeAnnotation: typeAnnotation2,
|
|
14486
14313
|
};
|
|
14487
14314
|
|
|
14488
|
-
const
|
|
14489
|
-
validate(
|
|
14490
|
-
validate(
|
|
14491
|
-
validate(
|
|
14315
|
+
const defs2 = NODE_FIELDS.TSTypeAliasDeclaration;
|
|
14316
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14317
|
+
validate(defs2.typeParameters, node, 'typeParameters', typeParameters, 1);
|
|
14318
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14492
14319
|
return node;
|
|
14493
14320
|
}
|
|
14494
14321
|
|
|
@@ -14499,9 +14326,9 @@ function tsInstantiationExpression(expression2, typeArguments = null) {
|
|
|
14499
14326
|
typeArguments,
|
|
14500
14327
|
};
|
|
14501
14328
|
|
|
14502
|
-
const
|
|
14503
|
-
validate(
|
|
14504
|
-
validate(
|
|
14329
|
+
const defs2 = NODE_FIELDS.TSInstantiationExpression;
|
|
14330
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14331
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14505
14332
|
return node;
|
|
14506
14333
|
}
|
|
14507
14334
|
|
|
@@ -14512,9 +14339,9 @@ function tsAsExpression(expression2, typeAnnotation2) {
|
|
|
14512
14339
|
typeAnnotation: typeAnnotation2,
|
|
14513
14340
|
};
|
|
14514
14341
|
|
|
14515
|
-
const
|
|
14516
|
-
validate(
|
|
14517
|
-
validate(
|
|
14342
|
+
const defs2 = NODE_FIELDS.TSAsExpression;
|
|
14343
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14344
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14518
14345
|
return node;
|
|
14519
14346
|
}
|
|
14520
14347
|
|
|
@@ -14525,9 +14352,9 @@ function tsSatisfiesExpression(expression2, typeAnnotation2) {
|
|
|
14525
14352
|
typeAnnotation: typeAnnotation2,
|
|
14526
14353
|
};
|
|
14527
14354
|
|
|
14528
|
-
const
|
|
14529
|
-
validate(
|
|
14530
|
-
validate(
|
|
14355
|
+
const defs2 = NODE_FIELDS.TSSatisfiesExpression;
|
|
14356
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14357
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14531
14358
|
return node;
|
|
14532
14359
|
}
|
|
14533
14360
|
|
|
@@ -14538,9 +14365,9 @@ function tsTypeAssertion(typeAnnotation2, expression2) {
|
|
|
14538
14365
|
expression: expression2,
|
|
14539
14366
|
};
|
|
14540
14367
|
|
|
14541
|
-
const
|
|
14542
|
-
validate(
|
|
14543
|
-
validate(
|
|
14368
|
+
const defs2 = NODE_FIELDS.TSTypeAssertion;
|
|
14369
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14370
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14544
14371
|
return node;
|
|
14545
14372
|
}
|
|
14546
14373
|
|
|
@@ -14550,8 +14377,8 @@ function tsEnumBody(members) {
|
|
|
14550
14377
|
members,
|
|
14551
14378
|
};
|
|
14552
14379
|
|
|
14553
|
-
const
|
|
14554
|
-
validate(
|
|
14380
|
+
const defs2 = NODE_FIELDS.TSEnumBody;
|
|
14381
|
+
validate(defs2.members, node, 'members', members, 1);
|
|
14555
14382
|
return node;
|
|
14556
14383
|
}
|
|
14557
14384
|
|
|
@@ -14562,9 +14389,9 @@ function tsEnumDeclaration(id, body) {
|
|
|
14562
14389
|
body,
|
|
14563
14390
|
};
|
|
14564
14391
|
|
|
14565
|
-
const
|
|
14566
|
-
validate(
|
|
14567
|
-
validate(
|
|
14392
|
+
const defs2 = NODE_FIELDS.TSEnumDeclaration;
|
|
14393
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14394
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14568
14395
|
return node;
|
|
14569
14396
|
}
|
|
14570
14397
|
|
|
@@ -14575,9 +14402,9 @@ function tsEnumMember(id, initializer = null) {
|
|
|
14575
14402
|
initializer,
|
|
14576
14403
|
};
|
|
14577
14404
|
|
|
14578
|
-
const
|
|
14579
|
-
validate(
|
|
14580
|
-
validate(
|
|
14405
|
+
const defs2 = NODE_FIELDS.TSEnumMember;
|
|
14406
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14407
|
+
validate(defs2.initializer, node, 'initializer', initializer, 1);
|
|
14581
14408
|
return node;
|
|
14582
14409
|
}
|
|
14583
14410
|
|
|
@@ -14589,9 +14416,9 @@ function tsModuleDeclaration(id, body) {
|
|
|
14589
14416
|
kind: 'namespace',
|
|
14590
14417
|
};
|
|
14591
14418
|
|
|
14592
|
-
const
|
|
14593
|
-
validate(
|
|
14594
|
-
validate(
|
|
14419
|
+
const defs2 = NODE_FIELDS.TSModuleDeclaration;
|
|
14420
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14421
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14595
14422
|
return node;
|
|
14596
14423
|
}
|
|
14597
14424
|
|
|
@@ -14601,8 +14428,8 @@ function tsModuleBlock(body) {
|
|
|
14601
14428
|
body,
|
|
14602
14429
|
};
|
|
14603
14430
|
|
|
14604
|
-
const
|
|
14605
|
-
validate(
|
|
14431
|
+
const defs2 = NODE_FIELDS.TSModuleBlock;
|
|
14432
|
+
validate(defs2.body, node, 'body', body, 1);
|
|
14606
14433
|
return node;
|
|
14607
14434
|
}
|
|
14608
14435
|
|
|
@@ -14614,10 +14441,10 @@ function tsImportType(source, qualifier = null, typeArguments = null) {
|
|
|
14614
14441
|
typeArguments,
|
|
14615
14442
|
};
|
|
14616
14443
|
|
|
14617
|
-
const
|
|
14618
|
-
validate(
|
|
14619
|
-
validate(
|
|
14620
|
-
validate(
|
|
14444
|
+
const defs2 = NODE_FIELDS.TSImportType;
|
|
14445
|
+
validate(defs2.source, node, 'source', source, 1);
|
|
14446
|
+
validate(defs2.qualifier, node, 'qualifier', qualifier, 1);
|
|
14447
|
+
validate(defs2.typeArguments, node, 'typeArguments', typeArguments, 1);
|
|
14621
14448
|
return node;
|
|
14622
14449
|
}
|
|
14623
14450
|
|
|
@@ -14628,9 +14455,9 @@ function tsImportEqualsDeclaration(id, moduleReference) {
|
|
|
14628
14455
|
moduleReference,
|
|
14629
14456
|
};
|
|
14630
14457
|
|
|
14631
|
-
const
|
|
14632
|
-
validate(
|
|
14633
|
-
validate(
|
|
14458
|
+
const defs2 = NODE_FIELDS.TSImportEqualsDeclaration;
|
|
14459
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14460
|
+
validate(defs2.moduleReference, node, 'moduleReference', moduleReference, 1);
|
|
14634
14461
|
return node;
|
|
14635
14462
|
}
|
|
14636
14463
|
|
|
@@ -14640,8 +14467,8 @@ function tsExternalModuleReference(expression2) {
|
|
|
14640
14467
|
expression: expression2,
|
|
14641
14468
|
};
|
|
14642
14469
|
|
|
14643
|
-
const
|
|
14644
|
-
validate(
|
|
14470
|
+
const defs2 = NODE_FIELDS.TSExternalModuleReference;
|
|
14471
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14645
14472
|
return node;
|
|
14646
14473
|
}
|
|
14647
14474
|
|
|
@@ -14651,8 +14478,8 @@ function tsNonNullExpression(expression2) {
|
|
|
14651
14478
|
expression: expression2,
|
|
14652
14479
|
};
|
|
14653
14480
|
|
|
14654
|
-
const
|
|
14655
|
-
validate(
|
|
14481
|
+
const defs2 = NODE_FIELDS.TSNonNullExpression;
|
|
14482
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14656
14483
|
return node;
|
|
14657
14484
|
}
|
|
14658
14485
|
|
|
@@ -14662,8 +14489,8 @@ function tsExportAssignment(expression2) {
|
|
|
14662
14489
|
expression: expression2,
|
|
14663
14490
|
};
|
|
14664
14491
|
|
|
14665
|
-
const
|
|
14666
|
-
validate(
|
|
14492
|
+
const defs2 = NODE_FIELDS.TSExportAssignment;
|
|
14493
|
+
validate(defs2.expression, node, 'expression', expression2, 1);
|
|
14667
14494
|
return node;
|
|
14668
14495
|
}
|
|
14669
14496
|
|
|
@@ -14673,8 +14500,8 @@ function tsNamespaceExportDeclaration(id) {
|
|
|
14673
14500
|
id,
|
|
14674
14501
|
};
|
|
14675
14502
|
|
|
14676
|
-
const
|
|
14677
|
-
validate(
|
|
14503
|
+
const defs2 = NODE_FIELDS.TSNamespaceExportDeclaration;
|
|
14504
|
+
validate(defs2.id, node, 'id', id, 1);
|
|
14678
14505
|
return node;
|
|
14679
14506
|
}
|
|
14680
14507
|
|
|
@@ -14684,8 +14511,8 @@ function tsTypeAnnotation(typeAnnotation2) {
|
|
|
14684
14511
|
typeAnnotation: typeAnnotation2,
|
|
14685
14512
|
};
|
|
14686
14513
|
|
|
14687
|
-
const
|
|
14688
|
-
validate(
|
|
14514
|
+
const defs2 = NODE_FIELDS.TSTypeAnnotation;
|
|
14515
|
+
validate(defs2.typeAnnotation, node, 'typeAnnotation', typeAnnotation2, 1);
|
|
14689
14516
|
return node;
|
|
14690
14517
|
}
|
|
14691
14518
|
|
|
@@ -14695,8 +14522,8 @@ function tsTypeParameterInstantiation(params) {
|
|
|
14695
14522
|
params,
|
|
14696
14523
|
};
|
|
14697
14524
|
|
|
14698
|
-
const
|
|
14699
|
-
validate(
|
|
14525
|
+
const defs2 = NODE_FIELDS.TSTypeParameterInstantiation;
|
|
14526
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14700
14527
|
return node;
|
|
14701
14528
|
}
|
|
14702
14529
|
|
|
@@ -14706,8 +14533,8 @@ function tsTypeParameterDeclaration(params) {
|
|
|
14706
14533
|
params,
|
|
14707
14534
|
};
|
|
14708
14535
|
|
|
14709
|
-
const
|
|
14710
|
-
validate(
|
|
14536
|
+
const defs2 = NODE_FIELDS.TSTypeParameterDeclaration;
|
|
14537
|
+
validate(defs2.params, node, 'params', params, 1);
|
|
14711
14538
|
return node;
|
|
14712
14539
|
}
|
|
14713
14540
|
|
|
@@ -14719,10 +14546,10 @@ function tsTypeParameter(constraint = null, _default = null, name) {
|
|
|
14719
14546
|
name,
|
|
14720
14547
|
};
|
|
14721
14548
|
|
|
14722
|
-
const
|
|
14723
|
-
validate(
|
|
14724
|
-
validate(
|
|
14725
|
-
validate(
|
|
14549
|
+
const defs2 = NODE_FIELDS.TSTypeParameter;
|
|
14550
|
+
validate(defs2.constraint, node, 'constraint', constraint, 1);
|
|
14551
|
+
validate(defs2.default, node, 'default', _default, 1);
|
|
14552
|
+
validate(defs2.name, node, 'name', name, 1);
|
|
14726
14553
|
return node;
|
|
14727
14554
|
}
|
|
14728
14555
|
|
|
@@ -14883,9 +14710,6 @@ var b = /* @__PURE__ */Object.freeze({
|
|
|
14883
14710
|
optionalIndexedAccessType,
|
|
14884
14711
|
optionalMemberExpression,
|
|
14885
14712
|
parenthesizedExpression,
|
|
14886
|
-
pipelineBareFunction,
|
|
14887
|
-
pipelinePrimaryTopicReference,
|
|
14888
|
-
pipelineTopicExpression,
|
|
14889
14713
|
placeholder,
|
|
14890
14714
|
privateName,
|
|
14891
14715
|
program,
|
|
@@ -15094,7 +14918,6 @@ var ExportNamespaceSpecifier = alias('exportNamespaceSpecifier');
|
|
|
15094
14918
|
var OptionalMemberExpression = alias('optionalMemberExpression');
|
|
15095
14919
|
var OptionalCallExpression = alias('optionalCallExpression');
|
|
15096
14920
|
var ClassProperty = alias('classProperty');
|
|
15097
|
-
var ClassAccessorProperty = alias('classAccessorProperty');
|
|
15098
14921
|
var ClassPrivateProperty = alias('classPrivateProperty');
|
|
15099
14922
|
var ClassPrivateMethod = alias('classPrivateMethod');
|
|
15100
14923
|
var PrivateName = alias('privateName');
|
|
@@ -15184,14 +15007,12 @@ var Placeholder = alias('placeholder');
|
|
|
15184
15007
|
var V8IntrinsicIdentifier = alias('v8IntrinsicIdentifier');
|
|
15185
15008
|
var ArgumentPlaceholder = alias('argumentPlaceholder');
|
|
15186
15009
|
var BindExpression = alias('bindExpression');
|
|
15010
|
+
var ClassAccessorProperty = alias('classAccessorProperty');
|
|
15187
15011
|
var Decorator = alias('decorator');
|
|
15188
15012
|
var DoExpression = alias('doExpression');
|
|
15189
15013
|
var ExportDefaultSpecifier = alias('exportDefaultSpecifier');
|
|
15190
15014
|
var ModuleExpression = alias('moduleExpression');
|
|
15191
15015
|
var TopicReference = alias('topicReference');
|
|
15192
|
-
var PipelineTopicExpression = alias('pipelineTopicExpression');
|
|
15193
|
-
var PipelineBareFunction = alias('pipelineBareFunction');
|
|
15194
|
-
var PipelinePrimaryTopicReference = alias('pipelinePrimaryTopicReference');
|
|
15195
15016
|
var VoidPattern = alias('voidPattern');
|
|
15196
15017
|
var TSParameterProperty = alias('tsParameterProperty');
|
|
15197
15018
|
var TSDeclareFunction = alias('tsDeclareFunction');
|
|
@@ -15674,10 +15495,6 @@ function assertClassProperty(node, opts) {
|
|
|
15674
15495
|
assert('ClassProperty', node, opts);
|
|
15675
15496
|
}
|
|
15676
15497
|
|
|
15677
|
-
function assertClassAccessorProperty(node, opts) {
|
|
15678
|
-
assert('ClassAccessorProperty', node, opts);
|
|
15679
|
-
}
|
|
15680
|
-
|
|
15681
15498
|
function assertClassPrivateProperty(node, opts) {
|
|
15682
15499
|
assert('ClassPrivateProperty', node, opts);
|
|
15683
15500
|
}
|
|
@@ -16034,6 +15851,10 @@ function assertBindExpression(node, opts) {
|
|
|
16034
15851
|
assert('BindExpression', node, opts);
|
|
16035
15852
|
}
|
|
16036
15853
|
|
|
15854
|
+
function assertClassAccessorProperty(node, opts) {
|
|
15855
|
+
assert('ClassAccessorProperty', node, opts);
|
|
15856
|
+
}
|
|
15857
|
+
|
|
16037
15858
|
function assertDecorator(node, opts) {
|
|
16038
15859
|
assert('Decorator', node, opts);
|
|
16039
15860
|
}
|
|
@@ -16054,18 +15875,6 @@ function assertTopicReference(node, opts) {
|
|
|
16054
15875
|
assert('TopicReference', node, opts);
|
|
16055
15876
|
}
|
|
16056
15877
|
|
|
16057
|
-
function assertPipelineTopicExpression(node, opts) {
|
|
16058
|
-
assert('PipelineTopicExpression', node, opts);
|
|
16059
|
-
}
|
|
16060
|
-
|
|
16061
|
-
function assertPipelineBareFunction(node, opts) {
|
|
16062
|
-
assert('PipelineBareFunction', node, opts);
|
|
16063
|
-
}
|
|
16064
|
-
|
|
16065
|
-
function assertPipelinePrimaryTopicReference(node, opts) {
|
|
16066
|
-
assert('PipelinePrimaryTopicReference', node, opts);
|
|
16067
|
-
}
|
|
16068
|
-
|
|
16069
15878
|
function assertVoidPattern(node, opts) {
|
|
16070
15879
|
assert('VoidPattern', node, opts);
|
|
16071
15880
|
}
|
|
@@ -16482,10 +16291,6 @@ function assertModuleSpecifier(node, opts) {
|
|
|
16482
16291
|
assert('ModuleSpecifier', node, opts);
|
|
16483
16292
|
}
|
|
16484
16293
|
|
|
16485
|
-
function assertAccessor(node, opts) {
|
|
16486
|
-
assert('Accessor', node, opts);
|
|
16487
|
-
}
|
|
16488
|
-
|
|
16489
16294
|
function assertPrivate(node, opts) {
|
|
16490
16295
|
assert('Private', node, opts);
|
|
16491
16296
|
}
|
|
@@ -16526,6 +16331,10 @@ function assertMiscellaneous(node, opts) {
|
|
|
16526
16331
|
assert('Miscellaneous', node, opts);
|
|
16527
16332
|
}
|
|
16528
16333
|
|
|
16334
|
+
function assertAccessor(node, opts) {
|
|
16335
|
+
assert('Accessor', node, opts);
|
|
16336
|
+
}
|
|
16337
|
+
|
|
16529
16338
|
function assertTypeScript(node, opts) {
|
|
16530
16339
|
assert('TypeScript', node, opts);
|
|
16531
16340
|
}
|
|
@@ -17007,7 +16816,6 @@ var CLASS_TYPES = FLIPPED_ALIAS_KEYS['Class'];
|
|
|
17007
16816
|
var IMPORTOREXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS['ImportOrExportDeclaration'];
|
|
17008
16817
|
var EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS['ExportDeclaration'];
|
|
17009
16818
|
var MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS['ModuleSpecifier'];
|
|
17010
|
-
var ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS['Accessor'];
|
|
17011
16819
|
var PRIVATE_TYPES = FLIPPED_ALIAS_KEYS['Private'];
|
|
17012
16820
|
var FLOW_TYPES = FLIPPED_ALIAS_KEYS['Flow'];
|
|
17013
16821
|
var FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS['FlowType'];
|
|
@@ -17018,6 +16826,7 @@ var ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS['EnumBody'];
|
|
|
17018
16826
|
var ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS['EnumMember'];
|
|
17019
16827
|
var JSX_TYPES = FLIPPED_ALIAS_KEYS['JSX'];
|
|
17020
16828
|
var MISCELLANEOUS_TYPES = FLIPPED_ALIAS_KEYS['Miscellaneous'];
|
|
16829
|
+
var ACCESSOR_TYPES = FLIPPED_ALIAS_KEYS['Accessor'];
|
|
17021
16830
|
var TYPESCRIPT_TYPES = FLIPPED_ALIAS_KEYS['TypeScript'];
|
|
17022
16831
|
var TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS['TSTypeElement'];
|
|
17023
16832
|
var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS['TSType'];
|
|
@@ -21104,7 +20913,7 @@ function isWhitespace(code2) {
|
|
|
21104
20913
|
}
|
|
21105
20914
|
}
|
|
21106
20915
|
|
|
21107
|
-
var
|
|
20916
|
+
var JsxErrorTemplates = {
|
|
21108
20917
|
AttributeIsEmpty: 'JSX attributes must only be assigned a non-empty expression.',
|
|
21109
20918
|
MissingClosingTagElement: ({openingTagName}) => `Expected corresponding JSX closing tag for <${openingTagName}>.`,
|
|
21110
20919
|
MissingClosingTagFragment: 'Expected corresponding JSX closing tag for <>.',
|
|
@@ -21113,7 +20922,9 @@ var JsxErrors = ParseErrorEnum`jsx`({
|
|
|
21113
20922
|
UnsupportedJsxValue: 'JSX value should be either an expression or a quoted JSX text.',
|
|
21114
20923
|
UnterminatedJsxContent: 'Unterminated JSX contents.',
|
|
21115
20924
|
UnwrappedAdjacentJSXElements: 'Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?',
|
|
21116
|
-
}
|
|
20925
|
+
};
|
|
20926
|
+
|
|
20927
|
+
var JsxErrors = ParseErrorEnum`jsx`(JsxErrorTemplates);
|
|
21117
20928
|
|
|
21118
20929
|
function isFragment(object) {
|
|
21119
20930
|
return object ? object.type === 'JSXOpeningFragment' || object.type === 'JSXClosingFragment' : false;
|
|
@@ -24404,6 +24215,10 @@ var NodeUtils = class extends UtilParser {
|
|
|
24404
24215
|
}
|
|
24405
24216
|
|
|
24406
24217
|
finishNodeAt(node, type, endLoc) {
|
|
24218
|
+
if (process.env.NODE_ENV !== 'production' && node.end > 0) {
|
|
24219
|
+
throw new Error('Do not call finishNode*() twice on the same node. Instead use resetEndLocation() or change type directly.');
|
|
24220
|
+
}
|
|
24221
|
+
|
|
24407
24222
|
node.type = type;
|
|
24408
24223
|
node.end = endLoc.index;
|
|
24409
24224
|
node.loc.end = endLoc;
|
|
@@ -25044,7 +24859,7 @@ function assert2(x) {
|
|
|
25044
24859
|
}
|
|
25045
24860
|
}
|
|
25046
24861
|
|
|
25047
|
-
var
|
|
24862
|
+
var TSErrorTemplates = {
|
|
25048
24863
|
AbstractMethodHasImplementation: ({methodName}) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`,
|
|
25049
24864
|
AbstractPropertyHasInitializer: ({propertyName}) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`,
|
|
25050
24865
|
AccessorCannotBeOptional: 'An \'accessor\' property cannot be declared optional.',
|
|
@@ -25110,7 +24925,9 @@ var TSErrors = ParseErrorEnum`typescript`({
|
|
|
25110
24925
|
UnsupportedParameterPropertyKind: 'A parameter property may not be declared using a binding pattern.',
|
|
25111
24926
|
UnsupportedSignatureParameterKind: ({type}) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,
|
|
25112
24927
|
UsingDeclarationInAmbientContext: (kind) => `'${kind}' declarations are not allowed in ambient contexts.`,
|
|
25113
|
-
}
|
|
24928
|
+
};
|
|
24929
|
+
|
|
24930
|
+
var TSErrors = ParseErrorEnum`typescript`(TSErrorTemplates);
|
|
25114
24931
|
|
|
25115
24932
|
function keywordTypeFromName(value) {
|
|
25116
24933
|
switch(value) {
|
|
@@ -27855,12 +27672,12 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
27855
27672
|
}
|
|
27856
27673
|
}
|
|
27857
27674
|
|
|
27858
|
-
parseAsyncArrowFromCallExpression(node,
|
|
27675
|
+
parseAsyncArrowFromCallExpression(node, call) {
|
|
27859
27676
|
if (this.match(10)) {
|
|
27860
27677
|
node.returnType = this.tsParseTypeAnnotation();
|
|
27861
27678
|
}
|
|
27862
27679
|
|
|
27863
|
-
return super.parseAsyncArrowFromCallExpression(node,
|
|
27680
|
+
return super.parseAsyncArrowFromCallExpression(node, call);
|
|
27864
27681
|
}
|
|
27865
27682
|
|
|
27866
27683
|
parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
@@ -28118,10 +27935,10 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
|
|
|
28118
27935
|
const typeArguments = this.tsParseTypeArgumentsInExpression();
|
|
28119
27936
|
|
|
28120
27937
|
if (this.match(6)) {
|
|
28121
|
-
const
|
|
27938
|
+
const call = super.parseMaybeDecoratorArguments(expr, startLoc);
|
|
28122
27939
|
|
|
28123
|
-
|
|
28124
|
-
return
|
|
27940
|
+
call.typeArguments = typeArguments;
|
|
27941
|
+
return call;
|
|
28125
27942
|
}
|
|
28126
27943
|
|
|
28127
27944
|
this.unexpected(null, 6);
|
|
@@ -28681,10 +28498,12 @@ function isUncomputedMemberExpressionChain(expression2) {
|
|
|
28681
28498
|
return isUncomputedMemberExpressionChain(expression2.object);
|
|
28682
28499
|
}
|
|
28683
28500
|
|
|
28684
|
-
var
|
|
28501
|
+
var PlaceholderErrorTemplates = {
|
|
28685
28502
|
ClassNameIsRequired: 'A class name is required.',
|
|
28686
28503
|
UnexpectedSpace: 'Unexpected space in placeholder.',
|
|
28687
|
-
}
|
|
28504
|
+
};
|
|
28505
|
+
|
|
28506
|
+
var PlaceholderErrors = ParseErrorEnum`placeholders`(PlaceholderErrorTemplates);
|
|
28688
28507
|
|
|
28689
28508
|
var placeholders = (superClass) => class PlaceholdersParserMixin extends superClass {
|
|
28690
28509
|
parsePlaceholder(expectedNode) {
|
|
@@ -29742,17 +29561,17 @@ var ExpressionParser = class extends LValParser {
|
|
|
29742
29561
|
return this.match(15) && !this.canInsertSemicolon();
|
|
29743
29562
|
}
|
|
29744
29563
|
|
|
29745
|
-
parseAsyncArrowFromCallExpression(node,
|
|
29746
|
-
this.resetPreviousNodeTrailingComments(
|
|
29564
|
+
parseAsyncArrowFromCallExpression(node, call) {
|
|
29565
|
+
this.resetPreviousNodeTrailingComments(call);
|
|
29747
29566
|
this.expect(15);
|
|
29748
|
-
this.parseArrowExpression(node,
|
|
29567
|
+
this.parseArrowExpression(node, call.arguments, true, call.extra?.trailingCommaLoc);
|
|
29749
29568
|
|
|
29750
|
-
if (
|
|
29751
|
-
setInnerComments(node,
|
|
29569
|
+
if (call.innerComments) {
|
|
29570
|
+
setInnerComments(node, call.innerComments);
|
|
29752
29571
|
}
|
|
29753
29572
|
|
|
29754
|
-
if (
|
|
29755
|
-
setInnerComments(node,
|
|
29573
|
+
if (call.callee.trailingComments) {
|
|
29574
|
+
setInnerComments(node, call.callee.trailingComments);
|
|
29756
29575
|
}
|
|
29757
29576
|
|
|
29758
29577
|
return node;
|
|
@@ -33449,7 +33268,7 @@ var Parser = class extends StatementParser {
|
|
|
33449
33268
|
const program3 = this.startNode();
|
|
33450
33269
|
|
|
33451
33270
|
this.nextToken();
|
|
33452
|
-
file2.errors =
|
|
33271
|
+
file2.errors = [];
|
|
33453
33272
|
const result = this.parseTopLevel(file2, program3);
|
|
33454
33273
|
|
|
33455
33274
|
result.errors = this.state.errors;
|
|
@@ -33570,8 +33389,163 @@ function getParserClass(pluginsMap) {
|
|
|
33570
33389
|
return cls;
|
|
33571
33390
|
}
|
|
33572
33391
|
|
|
33392
|
+
// ../babel-babel/packages/babel-code-frame/lib/common-BO7XIBW3.js
|
|
33393
|
+
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
33394
|
+
|
|
33395
|
+
function getMarkerLines(loc, source, opts, startLineBaseZero) {
|
|
33396
|
+
const startLoc = {
|
|
33397
|
+
column: 0,
|
|
33398
|
+
line: -1,
|
|
33399
|
+
...loc.start,
|
|
33400
|
+
};
|
|
33401
|
+
|
|
33402
|
+
const endLoc = {
|
|
33403
|
+
...startLoc,
|
|
33404
|
+
...loc.end,
|
|
33405
|
+
};
|
|
33406
|
+
|
|
33407
|
+
const {linesAbove = 2, linesBelow = 3} = opts || {};
|
|
33408
|
+
|
|
33409
|
+
const startLine = startLoc.line - startLineBaseZero;
|
|
33410
|
+
const startColumn = startLoc.column;
|
|
33411
|
+
const endLine = endLoc.line - startLineBaseZero;
|
|
33412
|
+
const endColumn = endLoc.column;
|
|
33413
|
+
let start = Math.max(startLine - (linesAbove + 1), 0);
|
|
33414
|
+
let end = Math.min(source.length, endLine + linesBelow);
|
|
33415
|
+
|
|
33416
|
+
if (startLine === -1) {
|
|
33417
|
+
start = 0;
|
|
33418
|
+
}
|
|
33419
|
+
|
|
33420
|
+
if (endLine === -1) {
|
|
33421
|
+
end = source.length;
|
|
33422
|
+
}
|
|
33423
|
+
|
|
33424
|
+
const lineDiff = endLine - startLine;
|
|
33425
|
+
const markerLines = {};
|
|
33426
|
+
|
|
33427
|
+
if (lineDiff) {
|
|
33428
|
+
for (let i = 0; i <= lineDiff; i++) {
|
|
33429
|
+
const lineNumber = i + startLine;
|
|
33430
|
+
|
|
33431
|
+
if (!startColumn) {
|
|
33432
|
+
markerLines[lineNumber] = true;
|
|
33433
|
+
} else if (i === 0) {
|
|
33434
|
+
const sourceLength = source[lineNumber - 1].length;
|
|
33435
|
+
markerLines[lineNumber] = [
|
|
33436
|
+
startColumn,
|
|
33437
|
+
sourceLength - startColumn + 1,
|
|
33438
|
+
];
|
|
33439
|
+
} else if (i === lineDiff) {
|
|
33440
|
+
markerLines[lineNumber] = [0, endColumn];
|
|
33441
|
+
} else {
|
|
33442
|
+
const sourceLength = source[lineNumber - i].length;
|
|
33443
|
+
markerLines[lineNumber] = [0, sourceLength];
|
|
33444
|
+
}
|
|
33445
|
+
|
|
33446
|
+
}
|
|
33447
|
+
} else {
|
|
33448
|
+
if (startColumn === endColumn) {
|
|
33449
|
+
if (startColumn) {
|
|
33450
|
+
markerLines[startLine] = [startColumn, 0];
|
|
33451
|
+
} else {
|
|
33452
|
+
markerLines[startLine] = true;
|
|
33453
|
+
}
|
|
33454
|
+
} else {
|
|
33455
|
+
markerLines[startLine] = [
|
|
33456
|
+
startColumn,
|
|
33457
|
+
endColumn - startColumn,
|
|
33458
|
+
];
|
|
33459
|
+
}
|
|
33460
|
+
}
|
|
33461
|
+
|
|
33462
|
+
return {
|
|
33463
|
+
start,
|
|
33464
|
+
end,
|
|
33465
|
+
markerLines,
|
|
33466
|
+
};
|
|
33467
|
+
}
|
|
33468
|
+
|
|
33469
|
+
function _codeFrameColumns(rawLines, loc, opts = {}, colorOpts) {
|
|
33470
|
+
const {defs: defs2, highlight: highlight2} = colorOpts || {
|
|
33471
|
+
defs: {
|
|
33472
|
+
gutter: String,
|
|
33473
|
+
marker: String,
|
|
33474
|
+
message: String,
|
|
33475
|
+
reset: String,
|
|
33476
|
+
},
|
|
33477
|
+
highlight: String,
|
|
33478
|
+
};
|
|
33479
|
+
|
|
33480
|
+
const startLineBaseZero = (opts.startLine || 1) - 1;
|
|
33481
|
+
const lines = rawLines.split(NEWLINE);
|
|
33482
|
+
|
|
33483
|
+
const {
|
|
33484
|
+
start,
|
|
33485
|
+
end,
|
|
33486
|
+
markerLines,
|
|
33487
|
+
} = getMarkerLines(loc, lines, opts, startLineBaseZero);
|
|
33488
|
+
|
|
33489
|
+
const hasColumns = loc.start && typeof loc.start.column === 'number';
|
|
33490
|
+
const numberMaxWidth = String(end + startLineBaseZero).length;
|
|
33491
|
+
const highlightedLines = highlight2(rawLines);
|
|
33492
|
+
|
|
33493
|
+
let frame = highlightedLines
|
|
33494
|
+
.split(NEWLINE, end)
|
|
33495
|
+
.slice(start, end)
|
|
33496
|
+
.map((line, index3) => {
|
|
33497
|
+
const number = start + 1 + index3;
|
|
33498
|
+
const paddedNumber = ` ${number + startLineBaseZero}`.slice(-numberMaxWidth);
|
|
33499
|
+
const gutter = ` ${paddedNumber} |`;
|
|
33500
|
+
const hasMarker = markerLines[number];
|
|
33501
|
+
const lastMarkerLine = !markerLines[number + 1];
|
|
33502
|
+
|
|
33503
|
+
if (hasMarker) {
|
|
33504
|
+
let markerLine = '';
|
|
33505
|
+
|
|
33506
|
+
if (Array.isArray(hasMarker)) {
|
|
33507
|
+
const markerSpacing = line
|
|
33508
|
+
.slice(0, Math.max(hasMarker[0] - 1, 0))
|
|
33509
|
+
.replace(/[^\t]/g, ' ');
|
|
33510
|
+
const numberOfMarkers = hasMarker[1] || 1;
|
|
33511
|
+
|
|
33512
|
+
markerLine = [
|
|
33513
|
+
'\n ',
|
|
33514
|
+
defs2.gutter(gutter.replace(/\d/g, ' ')),
|
|
33515
|
+
' ',
|
|
33516
|
+
markerSpacing,
|
|
33517
|
+
defs2
|
|
33518
|
+
.marker('^')
|
|
33519
|
+
.repeat(numberOfMarkers),
|
|
33520
|
+
].join('');
|
|
33521
|
+
|
|
33522
|
+
if (lastMarkerLine && opts.message) {
|
|
33523
|
+
markerLine += ' ' + defs2.message(opts.message);
|
|
33524
|
+
}
|
|
33525
|
+
}
|
|
33526
|
+
|
|
33527
|
+
return [
|
|
33528
|
+
defs2.marker('>'),
|
|
33529
|
+
defs2.gutter(gutter),
|
|
33530
|
+
line.length > 0 ? ` ${line}` : '',
|
|
33531
|
+
markerLine,
|
|
33532
|
+
].join('');
|
|
33533
|
+
} else {
|
|
33534
|
+
return ` ${defs2.gutter(gutter)}${line.length > 0 ? ` ${line}` : ''}`;
|
|
33535
|
+
}
|
|
33536
|
+
})
|
|
33537
|
+
.join('\n');
|
|
33538
|
+
|
|
33539
|
+
if (opts.message && !hasColumns) {
|
|
33540
|
+
frame = `${' '.repeat(numberMaxWidth + 1)}${opts.message}
|
|
33541
|
+
${frame}`;
|
|
33542
|
+
}
|
|
33543
|
+
|
|
33544
|
+
return defs2.reset(frame);
|
|
33545
|
+
}
|
|
33546
|
+
|
|
33573
33547
|
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
33574
|
-
|
|
33548
|
+
import {styleText} from 'util';
|
|
33575
33549
|
|
|
33576
33550
|
// ../babel-babel/node_modules/js-tokens/index.js
|
|
33577
33551
|
var HashbangComment;
|
|
@@ -34085,35 +34059,30 @@ var js_tokens_default = jsTokens;
|
|
|
34085
34059
|
|
|
34086
34060
|
// ../babel-babel/packages/babel-code-frame/lib/index.js
|
|
34087
34061
|
function isColorSupported() {
|
|
34088
|
-
return
|
|
34062
|
+
return styleText('red', '-') !== '-';
|
|
34089
34063
|
}
|
|
34090
34064
|
|
|
34091
|
-
|
|
34092
|
-
|
|
34093
|
-
|
|
34094
|
-
|
|
34095
|
-
keyword: colors2.cyan,
|
|
34096
|
-
capitalized: colors2.yellow,
|
|
34097
|
-
jsxIdentifier: colors2.yellow,
|
|
34098
|
-
punctuator: colors2.yellow,
|
|
34099
|
-
number: colors2.magenta,
|
|
34100
|
-
string: colors2.green,
|
|
34101
|
-
regex: colors2.magenta,
|
|
34102
|
-
comment: colors2.gray,
|
|
34103
|
-
invalid: compose(compose(colors2.white, colors2.bgRed), colors2.bold),
|
|
34104
|
-
gutter: colors2.gray,
|
|
34105
|
-
marker: compose(colors2.red, colors2.bold),
|
|
34106
|
-
message: compose(colors2.red, colors2.bold),
|
|
34107
|
-
reset: colors2.reset,
|
|
34108
|
-
};
|
|
34065
|
+
function createFormatter(format) {
|
|
34066
|
+
return (input) => styleText(format, String(input ?? ''), {
|
|
34067
|
+
validateStream: false,
|
|
34068
|
+
});
|
|
34109
34069
|
}
|
|
34110
34070
|
|
|
34111
|
-
var
|
|
34112
|
-
|
|
34113
|
-
|
|
34114
|
-
|
|
34115
|
-
|
|
34116
|
-
|
|
34071
|
+
var defs = {
|
|
34072
|
+
keyword: createFormatter('cyan'),
|
|
34073
|
+
capitalized: createFormatter('yellow'),
|
|
34074
|
+
jsxIdentifier: createFormatter('yellow'),
|
|
34075
|
+
punctuator: createFormatter('yellow'),
|
|
34076
|
+
number: createFormatter('magenta'),
|
|
34077
|
+
string: createFormatter('green'),
|
|
34078
|
+
regex: createFormatter('magenta'),
|
|
34079
|
+
comment: createFormatter('gray'),
|
|
34080
|
+
invalid: createFormatter(['white', 'bgRed', 'bold']),
|
|
34081
|
+
gutter: createFormatter('gray'),
|
|
34082
|
+
marker: createFormatter(['red', 'bold']),
|
|
34083
|
+
message: createFormatter(['red', 'bold']),
|
|
34084
|
+
reset: createFormatter('reset'),
|
|
34085
|
+
};
|
|
34117
34086
|
|
|
34118
34087
|
var sometimesKeywords = /* @__PURE__ */new Set([
|
|
34119
34088
|
'as',
|
|
@@ -34123,7 +34092,7 @@ var sometimesKeywords = /* @__PURE__ */new Set([
|
|
|
34123
34092
|
'of',
|
|
34124
34093
|
'set',
|
|
34125
34094
|
]);
|
|
34126
|
-
var
|
|
34095
|
+
var NEWLINE2 = /\r\n|[\n\r\u2028\u2029]/;
|
|
34127
34096
|
var BRACKET = /^[()[\]{}]$/;
|
|
34128
34097
|
|
|
34129
34098
|
var getTokenType = function(token) {
|
|
@@ -34242,13 +34211,12 @@ function highlight(text) {
|
|
|
34242
34211
|
if (text === '')
|
|
34243
34212
|
return '';
|
|
34244
34213
|
|
|
34245
|
-
const defs = getDefs(true);
|
|
34246
34214
|
let highlighted = '';
|
|
34247
34215
|
|
|
34248
34216
|
for (const {type, value} of tokenize(text)) {
|
|
34249
34217
|
if (type in defs) {
|
|
34250
34218
|
highlighted += value
|
|
34251
|
-
.split(
|
|
34219
|
+
.split(NEWLINE2)
|
|
34252
34220
|
.map((str) => defs[type](str))
|
|
34253
34221
|
.join('\n');
|
|
34254
34222
|
} else {
|
|
@@ -34259,153 +34227,13 @@ function highlight(text) {
|
|
|
34259
34227
|
return highlighted;
|
|
34260
34228
|
}
|
|
34261
34229
|
|
|
34262
|
-
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
34263
|
-
|
|
34264
|
-
function getMarkerLines(loc, source, opts) {
|
|
34265
|
-
const startLoc = {
|
|
34266
|
-
column: 0,
|
|
34267
|
-
line: -1,
|
|
34268
|
-
...loc.start,
|
|
34269
|
-
};
|
|
34270
|
-
|
|
34271
|
-
const endLoc = {
|
|
34272
|
-
...startLoc,
|
|
34273
|
-
...loc.end,
|
|
34274
|
-
};
|
|
34275
|
-
|
|
34276
|
-
const {linesAbove = 2, linesBelow = 3} = opts || {};
|
|
34277
|
-
|
|
34278
|
-
const startLine = startLoc.line;
|
|
34279
|
-
const startColumn = startLoc.column;
|
|
34280
|
-
const endLine = endLoc.line;
|
|
34281
|
-
const endColumn = endLoc.column;
|
|
34282
|
-
let start = Math.max(startLine - (linesAbove + 1), 0);
|
|
34283
|
-
let end = Math.min(source.length, endLine + linesBelow);
|
|
34284
|
-
|
|
34285
|
-
if (startLine === -1) {
|
|
34286
|
-
start = 0;
|
|
34287
|
-
}
|
|
34288
|
-
|
|
34289
|
-
if (endLine === -1) {
|
|
34290
|
-
end = source.length;
|
|
34291
|
-
}
|
|
34292
|
-
|
|
34293
|
-
const lineDiff = endLine - startLine;
|
|
34294
|
-
const markerLines = {};
|
|
34295
|
-
|
|
34296
|
-
if (lineDiff) {
|
|
34297
|
-
for (let i = 0; i <= lineDiff; i++) {
|
|
34298
|
-
const lineNumber = i + startLine;
|
|
34299
|
-
|
|
34300
|
-
if (!startColumn) {
|
|
34301
|
-
markerLines[lineNumber] = true;
|
|
34302
|
-
} else if (i === 0) {
|
|
34303
|
-
const sourceLength = source[lineNumber - 1].length;
|
|
34304
|
-
markerLines[lineNumber] = [
|
|
34305
|
-
startColumn,
|
|
34306
|
-
sourceLength - startColumn + 1,
|
|
34307
|
-
];
|
|
34308
|
-
} else if (i === lineDiff) {
|
|
34309
|
-
markerLines[lineNumber] = [0, endColumn];
|
|
34310
|
-
} else {
|
|
34311
|
-
const sourceLength = source[lineNumber - i].length;
|
|
34312
|
-
markerLines[lineNumber] = [0, sourceLength];
|
|
34313
|
-
}
|
|
34314
|
-
|
|
34315
|
-
}
|
|
34316
|
-
} else {
|
|
34317
|
-
if (startColumn === endColumn) {
|
|
34318
|
-
if (startColumn) {
|
|
34319
|
-
markerLines[startLine] = [startColumn, 0];
|
|
34320
|
-
} else {
|
|
34321
|
-
markerLines[startLine] = true;
|
|
34322
|
-
}
|
|
34323
|
-
} else {
|
|
34324
|
-
markerLines[startLine] = [
|
|
34325
|
-
startColumn,
|
|
34326
|
-
endColumn - startColumn,
|
|
34327
|
-
];
|
|
34328
|
-
}
|
|
34329
|
-
}
|
|
34330
|
-
|
|
34331
|
-
return {
|
|
34332
|
-
start,
|
|
34333
|
-
end,
|
|
34334
|
-
markerLines,
|
|
34335
|
-
};
|
|
34336
|
-
}
|
|
34337
|
-
|
|
34338
34230
|
function codeFrameColumns(rawLines, loc, opts = {}) {
|
|
34339
34231
|
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
|
34340
|
-
const defs = getDefs(shouldHighlight);
|
|
34341
|
-
const lines = rawLines.split(NEWLINE);
|
|
34342
34232
|
|
|
34343
|
-
|
|
34344
|
-
|
|
34345
|
-
|
|
34346
|
-
|
|
34347
|
-
} = getMarkerLines(loc, lines, opts);
|
|
34348
|
-
|
|
34349
|
-
const hasColumns = loc.start && typeof loc.start.column === 'number';
|
|
34350
|
-
const numberMaxWidth = String(end).length;
|
|
34351
|
-
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
|
|
34352
|
-
|
|
34353
|
-
let frame = highlightedLines
|
|
34354
|
-
.split(NEWLINE, end)
|
|
34355
|
-
.slice(start, end)
|
|
34356
|
-
.map((line, index3) => {
|
|
34357
|
-
const number = start + 1 + index3;
|
|
34358
|
-
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
|
|
34359
|
-
const gutter = ` ${paddedNumber} |`;
|
|
34360
|
-
const hasMarker = markerLines[number];
|
|
34361
|
-
const lastMarkerLine = !markerLines[number + 1];
|
|
34362
|
-
|
|
34363
|
-
if (hasMarker) {
|
|
34364
|
-
let markerLine = '';
|
|
34365
|
-
|
|
34366
|
-
if (Array.isArray(hasMarker)) {
|
|
34367
|
-
const markerSpacing = line
|
|
34368
|
-
.slice(0, Math.max(hasMarker[0] - 1, 0))
|
|
34369
|
-
.replace(/[^\t]/g, ' ');
|
|
34370
|
-
const numberOfMarkers = hasMarker[1] || 1;
|
|
34371
|
-
|
|
34372
|
-
markerLine = [
|
|
34373
|
-
'\n ',
|
|
34374
|
-
defs.gutter(gutter.replace(/\d/g, ' ')),
|
|
34375
|
-
' ',
|
|
34376
|
-
markerSpacing,
|
|
34377
|
-
defs
|
|
34378
|
-
.marker('^')
|
|
34379
|
-
.repeat(numberOfMarkers),
|
|
34380
|
-
].join('');
|
|
34381
|
-
|
|
34382
|
-
if (lastMarkerLine && opts.message) {
|
|
34383
|
-
markerLine += ' ' + defs.message(opts.message);
|
|
34384
|
-
}
|
|
34385
|
-
}
|
|
34386
|
-
|
|
34387
|
-
return [
|
|
34388
|
-
defs.marker('>'),
|
|
34389
|
-
defs.gutter(gutter),
|
|
34390
|
-
line.length > 0 ? ` ${line}` : '',
|
|
34391
|
-
markerLine,
|
|
34392
|
-
].join('');
|
|
34393
|
-
} else {
|
|
34394
|
-
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ''}`;
|
|
34395
|
-
}
|
|
34396
|
-
})
|
|
34397
|
-
.join('\n');
|
|
34398
|
-
|
|
34399
|
-
if (opts.message && !hasColumns) {
|
|
34400
|
-
frame = `${' '.repeat(numberMaxWidth + 1)}${opts.message}
|
|
34401
|
-
${frame}`;
|
|
34402
|
-
}
|
|
34403
|
-
|
|
34404
|
-
if (shouldHighlight) {
|
|
34405
|
-
return defs.reset(frame);
|
|
34406
|
-
} else {
|
|
34407
|
-
return frame;
|
|
34408
|
-
}
|
|
34233
|
+
return _codeFrameColumns(rawLines, loc, opts, shouldHighlight ? {
|
|
34234
|
+
defs,
|
|
34235
|
+
highlight,
|
|
34236
|
+
} : void 0);
|
|
34409
34237
|
}
|
|
34410
34238
|
|
|
34411
34239
|
// ../babel-babel/packages/babel-template/lib/index.js
|
|
@@ -35015,28 +34843,18 @@ function createTemplateBuilder(formatter, defaultOpts) {
|
|
|
35015
34843
|
}
|
|
35016
34844
|
|
|
35017
34845
|
function extendedTrace(fn) {
|
|
35018
|
-
|
|
34846
|
+
const rootErr = new Error();
|
|
35019
34847
|
|
|
35020
|
-
try {
|
|
35021
|
-
throw new Error();
|
|
35022
|
-
} catch(error) {
|
|
35023
|
-
if (error.stack) {
|
|
35024
|
-
rootStack = error.stack
|
|
35025
|
-
.split('\n')
|
|
35026
|
-
.slice(3)
|
|
35027
|
-
.join('\n');
|
|
35028
|
-
}
|
|
35029
|
-
}
|
|
35030
|
-
|
|
35031
|
-
|
|
35032
|
-
|
|
35033
34848
|
return (arg) => {
|
|
35034
34849
|
try {
|
|
35035
34850
|
return fn(arg);
|
|
35036
34851
|
} catch(err) {
|
|
35037
34852
|
err.stack += `
|
|
35038
34853
|
=============
|
|
35039
|
-
${
|
|
34854
|
+
${rootErr.stack
|
|
34855
|
+
.split('\n')
|
|
34856
|
+
.slice(3)
|
|
34857
|
+
.join('\n')}`;
|
|
35040
34858
|
throw err;
|
|
35041
34859
|
}
|
|
35042
34860
|
};
|
|
@@ -36492,7 +36310,7 @@ var PRECEDENCE = /* @__PURE__ */new Map([
|
|
|
36492
36310
|
]);
|
|
36493
36311
|
|
|
36494
36312
|
function isTSTypeExpression(nodeId) {
|
|
36495
|
-
return nodeId ===
|
|
36313
|
+
return nodeId === 153 || nodeId === 198 || nodeId === 206;
|
|
36496
36314
|
}
|
|
36497
36315
|
|
|
36498
36316
|
var isClassExtendsClause = (node, parent, parentId) => {
|
|
@@ -36510,10 +36328,10 @@ var hasPostfixPart = (node, parent, parentId) => {
|
|
|
36510
36328
|
case 112:
|
|
36511
36329
|
return parent.callee === node;
|
|
36512
36330
|
|
|
36513
|
-
case
|
|
36331
|
+
case 219:
|
|
36514
36332
|
return parent.tag === node;
|
|
36515
36333
|
|
|
36516
|
-
case
|
|
36334
|
+
case 188:
|
|
36517
36335
|
return true;
|
|
36518
36336
|
}
|
|
36519
36337
|
|
|
@@ -36525,7 +36343,7 @@ function NullableTypeAnnotation$1(node, parent, parentId) {
|
|
|
36525
36343
|
}
|
|
36526
36344
|
|
|
36527
36345
|
function FunctionTypeAnnotation$1(node, parent, parentId, tokenContext) {
|
|
36528
|
-
return parentId ===
|
|
36346
|
+
return parentId === 236
|
|
36529
36347
|
|| parentId === 90
|
|
36530
36348
|
|| parentId === 4
|
|
36531
36349
|
|| (tokenContext & 8) > 0;
|
|
@@ -36552,7 +36370,7 @@ function BinaryLike(node, parent, parentId, nodeType) {
|
|
|
36552
36370
|
return true;
|
|
36553
36371
|
}
|
|
36554
36372
|
|
|
36555
|
-
if (hasPostfixPart(node, parent, parentId) || parentId ===
|
|
36373
|
+
if (hasPostfixPart(node, parent, parentId) || parentId === 235 || parentId === 142 || parentId === 8) {
|
|
36556
36374
|
return true;
|
|
36557
36375
|
}
|
|
36558
36376
|
|
|
@@ -36564,8 +36382,8 @@ function BinaryLike(node, parent, parentId, nodeType) {
|
|
|
36564
36382
|
parentPos = PRECEDENCE.get(parent.operator);
|
|
36565
36383
|
break;
|
|
36566
36384
|
|
|
36567
|
-
case
|
|
36568
|
-
case
|
|
36385
|
+
case 153:
|
|
36386
|
+
case 198:
|
|
36569
36387
|
parentPos = 7;
|
|
36570
36388
|
}
|
|
36571
36389
|
|
|
@@ -36592,7 +36410,7 @@ function UnionTypeAnnotation$1(node, parent, parentId) {
|
|
|
36592
36410
|
case 4:
|
|
36593
36411
|
case 115:
|
|
36594
36412
|
case 90:
|
|
36595
|
-
case
|
|
36413
|
+
case 236:
|
|
36596
36414
|
return true;
|
|
36597
36415
|
}
|
|
36598
36416
|
|
|
@@ -36617,18 +36435,18 @@ function TSAsExpression$1(node, parent, parentId) {
|
|
|
36617
36435
|
|
|
36618
36436
|
function TSConditionalType$1(node, parent, parentId) {
|
|
36619
36437
|
switch(parentId) {
|
|
36620
|
-
case
|
|
36621
|
-
case
|
|
36622
|
-
case
|
|
36623
|
-
case
|
|
36624
|
-
case
|
|
36625
|
-
case
|
|
36438
|
+
case 152:
|
|
36439
|
+
case 192:
|
|
36440
|
+
case 208:
|
|
36441
|
+
case 209:
|
|
36442
|
+
case 178:
|
|
36443
|
+
case 216:
|
|
36626
36444
|
return true;
|
|
36627
36445
|
|
|
36628
|
-
case
|
|
36446
|
+
case 172:
|
|
36629
36447
|
return parent.objectType === node;
|
|
36630
36448
|
|
|
36631
|
-
case
|
|
36449
|
+
case 158:
|
|
36632
36450
|
return parent.checkType === node || parent.extendsType === node;
|
|
36633
36451
|
}
|
|
36634
36452
|
|
|
@@ -36637,13 +36455,13 @@ function TSConditionalType$1(node, parent, parentId) {
|
|
|
36637
36455
|
|
|
36638
36456
|
function TSUnionType$1(node, parent, parentId) {
|
|
36639
36457
|
switch(parentId) {
|
|
36640
|
-
case
|
|
36641
|
-
case
|
|
36642
|
-
case
|
|
36643
|
-
case
|
|
36458
|
+
case 178:
|
|
36459
|
+
case 208:
|
|
36460
|
+
case 152:
|
|
36461
|
+
case 192:
|
|
36644
36462
|
return true;
|
|
36645
36463
|
|
|
36646
|
-
case
|
|
36464
|
+
case 172:
|
|
36647
36465
|
return parent.objectType === node;
|
|
36648
36466
|
}
|
|
36649
36467
|
|
|
@@ -36651,7 +36469,7 @@ function TSUnionType$1(node, parent, parentId) {
|
|
|
36651
36469
|
}
|
|
36652
36470
|
|
|
36653
36471
|
function TSIntersectionType$1(node, parent, parentId) {
|
|
36654
|
-
return parentId ===
|
|
36472
|
+
return parentId === 208 || TSTypeOperator$1(node, parent, parentId);
|
|
36655
36473
|
}
|
|
36656
36474
|
|
|
36657
36475
|
function TSInferType$1(node, parent, parentId) {
|
|
@@ -36659,7 +36477,7 @@ function TSInferType$1(node, parent, parentId) {
|
|
|
36659
36477
|
return true;
|
|
36660
36478
|
}
|
|
36661
36479
|
|
|
36662
|
-
if ((parentId ===
|
|
36480
|
+
if ((parentId === 178 || parentId === 216) && node.typeParameter.constraint != null) {
|
|
36663
36481
|
return true;
|
|
36664
36482
|
}
|
|
36665
36483
|
|
|
@@ -36668,11 +36486,11 @@ function TSInferType$1(node, parent, parentId) {
|
|
|
36668
36486
|
|
|
36669
36487
|
function TSTypeOperator$1(node, parent, parentId) {
|
|
36670
36488
|
switch(parentId) {
|
|
36671
|
-
case
|
|
36672
|
-
case
|
|
36489
|
+
case 152:
|
|
36490
|
+
case 192:
|
|
36673
36491
|
return true;
|
|
36674
36492
|
|
|
36675
|
-
case
|
|
36493
|
+
case 172:
|
|
36676
36494
|
if (parent.objectType === node) {
|
|
36677
36495
|
return true;
|
|
36678
36496
|
}
|
|
@@ -36686,7 +36504,7 @@ function TSInstantiationExpression$1(node, parent, parentId) {
|
|
|
36686
36504
|
case 17:
|
|
36687
36505
|
case 130:
|
|
36688
36506
|
case 112:
|
|
36689
|
-
case
|
|
36507
|
+
case 174:
|
|
36690
36508
|
return parent.typeArguments != null;
|
|
36691
36509
|
}
|
|
36692
36510
|
|
|
@@ -36697,8 +36515,8 @@ function TSFunctionType$1(node, parent, parentId) {
|
|
|
36697
36515
|
if (TSUnionType$1(node, parent, parentId))
|
|
36698
36516
|
return true;
|
|
36699
36517
|
|
|
36700
|
-
return parentId ===
|
|
36701
|
-
|| parentId ===
|
|
36518
|
+
return parentId === 216
|
|
36519
|
+
|| parentId === 158
|
|
36702
36520
|
&& (parent.checkType === node
|
|
36703
36521
|
|| parent.extendsType === node);
|
|
36704
36522
|
}
|
|
@@ -36715,7 +36533,7 @@ function LogicalExpression2(node, parent, parentId) {
|
|
|
36715
36533
|
}
|
|
36716
36534
|
|
|
36717
36535
|
function SequenceExpression$1(node, parent, parentId) {
|
|
36718
|
-
if (parentId ===
|
|
36536
|
+
if (parentId === 141 || parentId === 133 || parentId === 108 && parent.property === node || parentId === 132 && parent.property === node || parentId === 221) {
|
|
36719
36537
|
return false;
|
|
36720
36538
|
}
|
|
36721
36539
|
|
|
@@ -36737,8 +36555,8 @@ function SequenceExpression$1(node, parent, parentId) {
|
|
|
36737
36555
|
function YieldExpression$1(node, parent, parentId) {
|
|
36738
36556
|
return parentId === 10
|
|
36739
36557
|
|| parentId === 107
|
|
36740
|
-
|| parentId ===
|
|
36741
|
-
|| parentId ===
|
|
36558
|
+
|| parentId === 235
|
|
36559
|
+
|| parentId === 142
|
|
36742
36560
|
|| hasPostfixPart(node, parent, parentId)
|
|
36743
36561
|
|| parentId === 8
|
|
36744
36562
|
&& isYieldExpression2(node)
|
|
@@ -36766,8 +36584,8 @@ function FunctionExpression$1(node, parent, parentId, tokenContext) {
|
|
|
36766
36584
|
|
|
36767
36585
|
function ConditionalExpression$1(node, parent, parentId) {
|
|
36768
36586
|
switch(parentId) {
|
|
36769
|
-
case
|
|
36770
|
-
case
|
|
36587
|
+
case 235:
|
|
36588
|
+
case 142:
|
|
36771
36589
|
case 10:
|
|
36772
36590
|
case 107:
|
|
36773
36591
|
case 8:
|
|
@@ -39022,18 +38840,6 @@ function TopicReference2() {
|
|
|
39022
38840
|
}
|
|
39023
38841
|
}
|
|
39024
38842
|
|
|
39025
|
-
function PipelineTopicExpression2(node) {
|
|
39026
|
-
this.print(node.expression);
|
|
39027
|
-
}
|
|
39028
|
-
|
|
39029
|
-
function PipelineBareFunction2(node) {
|
|
39030
|
-
this.print(node.callee);
|
|
39031
|
-
}
|
|
39032
|
-
|
|
39033
|
-
function PipelinePrimaryTopicReference2() {
|
|
39034
|
-
this.tokenChar(35);
|
|
39035
|
-
}
|
|
39036
|
-
|
|
39037
38843
|
function VoidPattern2() {
|
|
39038
38844
|
this.word('void');
|
|
39039
38845
|
}
|
|
@@ -40305,9 +40111,6 @@ var generatorFunctions = /* @__PURE__ */Object.freeze({
|
|
|
40305
40111
|
OptionalIndexedAccessType: OptionalIndexedAccessType2,
|
|
40306
40112
|
OptionalMemberExpression: OptionalMemberExpression2,
|
|
40307
40113
|
ParenthesizedExpression: ParenthesizedExpression2,
|
|
40308
|
-
PipelineBareFunction: PipelineBareFunction2,
|
|
40309
|
-
PipelinePrimaryTopicReference: PipelinePrimaryTopicReference2,
|
|
40310
|
-
PipelineTopicExpression: PipelineTopicExpression2,
|
|
40311
40114
|
Placeholder: Placeholder2,
|
|
40312
40115
|
PrivateName: PrivateName2,
|
|
40313
40116
|
Program: Program2,
|
|
@@ -41295,9 +41098,9 @@ var Printer = class {
|
|
|
41295
41098
|
if (!shouldPrintParens && parenthesized && node.leadingComments?.length && node.leadingComments[0].type === 'CommentBlock') {
|
|
41296
41099
|
switch(parentId) {
|
|
41297
41100
|
case 65:
|
|
41298
|
-
case
|
|
41101
|
+
case 240:
|
|
41299
41102
|
case 6:
|
|
41300
|
-
case
|
|
41103
|
+
case 140:
|
|
41301
41104
|
break;
|
|
41302
41105
|
|
|
41303
41106
|
case 17:
|
|
@@ -41355,7 +41158,7 @@ var Printer = class {
|
|
|
41355
41158
|
}
|
|
41356
41159
|
|
|
41357
41160
|
this._printLeadingComments(node, parent);
|
|
41358
|
-
this.exactSource(nodeId ===
|
|
41161
|
+
this.exactSource(nodeId === 136 || nodeId === 66 ? null : loc, printMethod.bind(this, node, parent));
|
|
41359
41162
|
|
|
41360
41163
|
if (shouldPrintParens) {
|
|
41361
41164
|
this._printTrailingComments(node, parent);
|
|
@@ -42174,6 +41977,180 @@ var virtualTypes = /* @__PURE__ */Object.freeze({
|
|
|
42174
41977
|
Var,
|
|
42175
41978
|
});
|
|
42176
41979
|
|
|
41980
|
+
var TraversalContext = class {
|
|
41981
|
+
constructor(opts, state) {
|
|
41982
|
+
this.state = state;
|
|
41983
|
+
this.opts = opts;
|
|
41984
|
+
}
|
|
41985
|
+
|
|
41986
|
+
queue = null;
|
|
41987
|
+
priorityQueue = null;
|
|
41988
|
+
maybeQueue(path, notPriority) {
|
|
41989
|
+
if (this.queue) {
|
|
41990
|
+
if (notPriority) {
|
|
41991
|
+
this.queue.push(path);
|
|
41992
|
+
} else {
|
|
41993
|
+
this.priorityQueue.push(path);
|
|
41994
|
+
}
|
|
41995
|
+
}
|
|
41996
|
+
}
|
|
41997
|
+
};
|
|
41998
|
+
|
|
41999
|
+
var {VISITOR_KEYS: VISITOR_KEYS$4} = lib_exports;
|
|
42000
|
+
|
|
42001
|
+
function _visitPaths(ctx, paths) {
|
|
42002
|
+
ctx.queue = paths;
|
|
42003
|
+
ctx.priorityQueue = [];
|
|
42004
|
+
const visited = /* @__PURE__ */new Set();
|
|
42005
|
+
let stop2 = false;
|
|
42006
|
+
let visitIndex = 0;
|
|
42007
|
+
|
|
42008
|
+
for (; visitIndex < paths.length;) {
|
|
42009
|
+
const path = paths[visitIndex];
|
|
42010
|
+
visitIndex++;
|
|
42011
|
+
resync.call(path);
|
|
42012
|
+
|
|
42013
|
+
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== ctx) {
|
|
42014
|
+
pushContext.call(path, ctx);
|
|
42015
|
+
}
|
|
42016
|
+
|
|
42017
|
+
if (path.key === null)
|
|
42018
|
+
continue;
|
|
42019
|
+
|
|
42020
|
+
const {node} = path;
|
|
42021
|
+
|
|
42022
|
+
if (visited.has(node))
|
|
42023
|
+
continue;
|
|
42024
|
+
|
|
42025
|
+
if (node)
|
|
42026
|
+
visited.add(node);
|
|
42027
|
+
|
|
42028
|
+
if (_visit(ctx, path)) {
|
|
42029
|
+
stop2 = true;
|
|
42030
|
+
break;
|
|
42031
|
+
}
|
|
42032
|
+
|
|
42033
|
+
if (ctx.priorityQueue.length) {
|
|
42034
|
+
stop2 = _visitPaths(ctx, ctx.priorityQueue);
|
|
42035
|
+
ctx.priorityQueue = [];
|
|
42036
|
+
ctx.queue = paths;
|
|
42037
|
+
|
|
42038
|
+
if (stop2)
|
|
42039
|
+
break;
|
|
42040
|
+
}
|
|
42041
|
+
}
|
|
42042
|
+
|
|
42043
|
+
for (let i = 0; i < visitIndex; i++) {
|
|
42044
|
+
popContext.call(paths[i]);
|
|
42045
|
+
}
|
|
42046
|
+
|
|
42047
|
+
ctx.queue = null;
|
|
42048
|
+
|
|
42049
|
+
return stop2;
|
|
42050
|
+
}
|
|
42051
|
+
|
|
42052
|
+
function _visit(ctx, path) {
|
|
42053
|
+
const node = path.node;
|
|
42054
|
+
|
|
42055
|
+
if (!node) {
|
|
42056
|
+
return false;
|
|
42057
|
+
}
|
|
42058
|
+
|
|
42059
|
+
const opts = ctx.opts;
|
|
42060
|
+
const denylist = opts.denylist;
|
|
42061
|
+
|
|
42062
|
+
if (denylist?.includes(node.type)) {
|
|
42063
|
+
return false;
|
|
42064
|
+
}
|
|
42065
|
+
|
|
42066
|
+
if (opts.shouldSkip?.(path)) {
|
|
42067
|
+
return false;
|
|
42068
|
+
}
|
|
42069
|
+
|
|
42070
|
+
if (path.shouldSkip)
|
|
42071
|
+
return path.shouldStop;
|
|
42072
|
+
|
|
42073
|
+
if (_call.call(path, opts.enter))
|
|
42074
|
+
return path.shouldStop;
|
|
42075
|
+
|
|
42076
|
+
if (path.node) {
|
|
42077
|
+
if (_call.call(path, opts[node.type]?.enter))
|
|
42078
|
+
return path.shouldStop;
|
|
42079
|
+
}
|
|
42080
|
+
|
|
42081
|
+
path.shouldStop = traverseNode(path.node, opts, path.scope, ctx.state, path, path.skipKeys);
|
|
42082
|
+
|
|
42083
|
+
if (path.node) {
|
|
42084
|
+
if (_call.call(path, opts.exit))
|
|
42085
|
+
return true;
|
|
42086
|
+
}
|
|
42087
|
+
|
|
42088
|
+
if (path.node) {
|
|
42089
|
+
_call.call(path, opts[node.type]?.exit);
|
|
42090
|
+
}
|
|
42091
|
+
|
|
42092
|
+
return path.shouldStop;
|
|
42093
|
+
}
|
|
42094
|
+
|
|
42095
|
+
function traverseNode(node, opts, scope2, state, path, skipKeys, visitSelf) {
|
|
42096
|
+
const keys2 = VISITOR_KEYS$4[node.type];
|
|
42097
|
+
|
|
42098
|
+
if (!keys2?.length)
|
|
42099
|
+
return false;
|
|
42100
|
+
|
|
42101
|
+
const ctx = new TraversalContext(opts, state);
|
|
42102
|
+
|
|
42103
|
+
if (visitSelf) {
|
|
42104
|
+
if (skipKeys?.[path.parentKey])
|
|
42105
|
+
return false;
|
|
42106
|
+
|
|
42107
|
+
return _visitPaths(ctx, [path]);
|
|
42108
|
+
}
|
|
42109
|
+
|
|
42110
|
+
const hub = path == null ? node.type === 'Program' || node.type === 'File' ? new Hub() : void 0 : path.hub;
|
|
42111
|
+
|
|
42112
|
+
for (const key of keys2) {
|
|
42113
|
+
if (skipKeys?.[key])
|
|
42114
|
+
continue;
|
|
42115
|
+
|
|
42116
|
+
const prop = node[key];
|
|
42117
|
+
|
|
42118
|
+
if (!prop)
|
|
42119
|
+
continue;
|
|
42120
|
+
|
|
42121
|
+
if (Array.isArray(prop)) {
|
|
42122
|
+
if (!prop.length)
|
|
42123
|
+
continue;
|
|
42124
|
+
|
|
42125
|
+
const paths = [];
|
|
42126
|
+
|
|
42127
|
+
for (let i = 0; i < prop.length; i++) {
|
|
42128
|
+
const childPath = NodePath_Final.get({
|
|
42129
|
+
parentPath: path,
|
|
42130
|
+
parent: node,
|
|
42131
|
+
container: prop,
|
|
42132
|
+
key: i,
|
|
42133
|
+
listKey: key,
|
|
42134
|
+
hub,
|
|
42135
|
+
});
|
|
42136
|
+
|
|
42137
|
+
paths.push(childPath);
|
|
42138
|
+
}
|
|
42139
|
+
|
|
42140
|
+
if (_visitPaths(ctx, paths))
|
|
42141
|
+
return true;
|
|
42142
|
+
} else {
|
|
42143
|
+
if (_visitPaths(ctx, [
|
|
42144
|
+
NodePath_Final.get({parentPath: path, parent: node, container: node, key, listKey: null, hub}),
|
|
42145
|
+
])) {
|
|
42146
|
+
return true;
|
|
42147
|
+
}
|
|
42148
|
+
}
|
|
42149
|
+
}
|
|
42150
|
+
|
|
42151
|
+
return false;
|
|
42152
|
+
}
|
|
42153
|
+
|
|
42177
42154
|
var {
|
|
42178
42155
|
isBinding: isBinding2,
|
|
42179
42156
|
isBlockScoped: nodeIsBlockScoped,
|
|
@@ -42778,7 +42755,7 @@ var Renamer = class {
|
|
|
42778
42755
|
}
|
|
42779
42756
|
};
|
|
42780
42757
|
|
|
42781
|
-
var {VISITOR_KEYS: VISITOR_KEYS$
|
|
42758
|
+
var {VISITOR_KEYS: VISITOR_KEYS$3} = lib_exports;
|
|
42782
42759
|
|
|
42783
42760
|
function traverseForScope(path, visitors2, state) {
|
|
42784
42761
|
const exploded = explode$1(visitors2);
|
|
@@ -42806,8 +42783,8 @@ function traverseForScope(path, visitors2, state) {
|
|
|
42806
42783
|
const visitor = exploded[node.type];
|
|
42807
42784
|
|
|
42808
42785
|
if (visitor?.enter) {
|
|
42809
|
-
for (const
|
|
42810
|
-
|
|
42786
|
+
for (const visit of visitor.enter) {
|
|
42787
|
+
visit.call(state, path2, state);
|
|
42811
42788
|
}
|
|
42812
42789
|
}
|
|
42813
42790
|
|
|
@@ -42815,7 +42792,7 @@ function traverseForScope(path, visitors2, state) {
|
|
|
42815
42792
|
return;
|
|
42816
42793
|
}
|
|
42817
42794
|
|
|
42818
|
-
const keys2 = VISITOR_KEYS$
|
|
42795
|
+
const keys2 = VISITOR_KEYS$3[node.type];
|
|
42819
42796
|
|
|
42820
42797
|
if (!keys2?.length) {
|
|
42821
42798
|
return;
|
|
@@ -42838,8 +42815,8 @@ function traverseForScope(path, visitors2, state) {
|
|
|
42838
42815
|
}
|
|
42839
42816
|
|
|
42840
42817
|
if (visitor?.exit) {
|
|
42841
|
-
for (const
|
|
42842
|
-
|
|
42818
|
+
for (const visit of visitor.exit) {
|
|
42819
|
+
visit.call(state, path2, state);
|
|
42843
42820
|
}
|
|
42844
42821
|
}
|
|
42845
42822
|
}
|
|
@@ -43852,8 +43829,8 @@ collectorVisitor]);
|
|
|
43852
43829
|
const typeVisitors = scopeVisitor[path.type];
|
|
43853
43830
|
|
|
43854
43831
|
if (typeVisitors) {
|
|
43855
|
-
for (const
|
|
43856
|
-
|
|
43832
|
+
for (const visit of typeVisitors.enter) {
|
|
43833
|
+
visit.call(state, path, state);
|
|
43857
43834
|
}
|
|
43858
43835
|
}
|
|
43859
43836
|
}
|
|
@@ -44165,7 +44142,7 @@ collectorVisitor]);
|
|
|
44165
44142
|
}
|
|
44166
44143
|
};
|
|
44167
44144
|
|
|
44168
|
-
var {VISITOR_KEYS: VISITOR_KEYS$
|
|
44145
|
+
var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
|
|
44169
44146
|
|
|
44170
44147
|
function findParent(callback) {
|
|
44171
44148
|
let path = this;
|
|
@@ -44213,7 +44190,7 @@ function getStatementParent() {
|
|
|
44213
44190
|
function getEarliestCommonAncestorFrom(paths) {
|
|
44214
44191
|
return this.getDeepestCommonAncestorFrom(paths, function(deepest, i, ancestries) {
|
|
44215
44192
|
let earliest;
|
|
44216
|
-
const keys2 = VISITOR_KEYS$
|
|
44193
|
+
const keys2 = VISITOR_KEYS$2[deepest.type];
|
|
44217
44194
|
|
|
44218
44195
|
for (const ancestry of ancestries) {
|
|
44219
44196
|
const path = ancestry[i + 1];
|
|
@@ -46435,20 +46412,20 @@ function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow =
|
|
|
46435
46412
|
args.push(value);
|
|
46436
46413
|
}
|
|
46437
46414
|
|
|
46438
|
-
const
|
|
46415
|
+
const call = callExpression2(identifier3(superBinding), args);
|
|
46439
46416
|
|
|
46440
46417
|
if (isCall) {
|
|
46441
46418
|
superParentPath.unshiftContainer('arguments', thisExpression2());
|
|
46442
|
-
superProp.replaceWith(memberExpression2(
|
|
46419
|
+
superProp.replaceWith(memberExpression2(call, identifier3('call')));
|
|
46443
46420
|
thisPaths.push(superParentPath.get('arguments.0'));
|
|
46444
46421
|
} else if (isAssignment) {
|
|
46445
|
-
superParentPath.replaceWith(
|
|
46422
|
+
superParentPath.replaceWith(call);
|
|
46446
46423
|
} else if (isTaggedTemplate) {
|
|
46447
46424
|
thisPaths.push(superProp
|
|
46448
|
-
.replaceWith(callExpression2(memberExpression2(
|
|
46425
|
+
.replaceWith(callExpression2(memberExpression2(call, identifier3('bind'), false), [thisExpression2()]))[0]
|
|
46449
46426
|
.get('arguments.0'));
|
|
46450
46427
|
} else {
|
|
46451
|
-
superProp.replaceWith(
|
|
46428
|
+
superProp.replaceWith(call);
|
|
46452
46429
|
}
|
|
46453
46430
|
|
|
46454
46431
|
});
|
|
@@ -46838,7 +46815,7 @@ function ensureFunctionName(supportUnicodeId) {
|
|
|
46838
46815
|
params.push(scope2.generateUidIdentifier('x'));
|
|
46839
46816
|
}
|
|
46840
46817
|
|
|
46841
|
-
const
|
|
46818
|
+
const call = index.expression.ast`
|
|
46842
46819
|
(function (${key}) {
|
|
46843
46820
|
function ${id}(${params}) {
|
|
46844
46821
|
return ${cloneNode3(key)}.apply(this, arguments);
|
|
@@ -46853,7 +46830,7 @@ function ensureFunctionName(supportUnicodeId) {
|
|
|
46853
46830
|
`;
|
|
46854
46831
|
|
|
46855
46832
|
return this
|
|
46856
|
-
.replaceWith(
|
|
46833
|
+
.replaceWith(call)[0]
|
|
46857
46834
|
.get('arguments.0');
|
|
46858
46835
|
}
|
|
46859
46836
|
|
|
@@ -46864,7 +46841,7 @@ function getFunctionArity(node) {
|
|
|
46864
46841
|
|
|
46865
46842
|
var {
|
|
46866
46843
|
STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS2,
|
|
46867
|
-
VISITOR_KEYS: VISITOR_KEYS$
|
|
46844
|
+
VISITOR_KEYS: VISITOR_KEYS$12,
|
|
46868
46845
|
isBlockStatement: isBlockStatement2,
|
|
46869
46846
|
isExpression: isExpression3,
|
|
46870
46847
|
isIdentifier: isIdentifier4,
|
|
@@ -47110,7 +47087,7 @@ function _guessExecutionStatusRelativeToCached(base, target, cache2) {
|
|
|
47110
47087
|
return divergence.target.key > divergence.this.key ? 'before' : 'after';
|
|
47111
47088
|
}
|
|
47112
47089
|
|
|
47113
|
-
const keys2 = VISITOR_KEYS$
|
|
47090
|
+
const keys2 = VISITOR_KEYS$12[commonPath.type];
|
|
47114
47091
|
|
|
47115
47092
|
const keyPosition = {
|
|
47116
47093
|
this: keys2.indexOf(divergence.this.parentKey),
|
|
@@ -48048,7 +48025,6 @@ var methods = {
|
|
|
48048
48025
|
isConstantExpression,
|
|
48049
48026
|
isInStrictMode,
|
|
48050
48027
|
isDenylisted,
|
|
48051
|
-
visit,
|
|
48052
48028
|
skip,
|
|
48053
48029
|
skipKey,
|
|
48054
48030
|
stop,
|
|
@@ -48102,325 +48078,6 @@ for (const type of Object.keys(virtualTypes)) {
|
|
|
48102
48078
|
TYPES.push(type);
|
|
48103
48079
|
}
|
|
48104
48080
|
|
|
48105
|
-
var {VISITOR_KEYS: VISITOR_KEYS$2} = lib_exports;
|
|
48106
|
-
|
|
48107
|
-
var TraversalContext = class {
|
|
48108
|
-
constructor(scope2, opts, state, parentPath) {
|
|
48109
|
-
this.parentPath = parentPath;
|
|
48110
|
-
this.scope = scope2;
|
|
48111
|
-
this.state = state;
|
|
48112
|
-
this.opts = opts;
|
|
48113
|
-
}
|
|
48114
|
-
|
|
48115
|
-
queue = null;
|
|
48116
|
-
priorityQueue = null;
|
|
48117
|
-
shouldVisit(node) {
|
|
48118
|
-
const opts = this.opts;
|
|
48119
|
-
|
|
48120
|
-
if (opts.enter || opts.exit)
|
|
48121
|
-
return true;
|
|
48122
|
-
|
|
48123
|
-
if (opts[node.type])
|
|
48124
|
-
return true;
|
|
48125
|
-
|
|
48126
|
-
const keys2 = VISITOR_KEYS$2[node.type];
|
|
48127
|
-
|
|
48128
|
-
if (!keys2?.length)
|
|
48129
|
-
return false;
|
|
48130
|
-
|
|
48131
|
-
for (const key of keys2) {
|
|
48132
|
-
if (node[key]) {
|
|
48133
|
-
return true;
|
|
48134
|
-
}
|
|
48135
|
-
}
|
|
48136
|
-
|
|
48137
|
-
return false;
|
|
48138
|
-
}
|
|
48139
|
-
|
|
48140
|
-
create(node, container, key, listKey) {
|
|
48141
|
-
return NodePath_Final.get({
|
|
48142
|
-
parentPath: this.parentPath,
|
|
48143
|
-
parent: node,
|
|
48144
|
-
container,
|
|
48145
|
-
key,
|
|
48146
|
-
listKey,
|
|
48147
|
-
});
|
|
48148
|
-
}
|
|
48149
|
-
|
|
48150
|
-
maybeQueue(path, notPriority) {
|
|
48151
|
-
if (this.queue) {
|
|
48152
|
-
if (notPriority) {
|
|
48153
|
-
this.queue.push(path);
|
|
48154
|
-
} else {
|
|
48155
|
-
this.priorityQueue.push(path);
|
|
48156
|
-
}
|
|
48157
|
-
}
|
|
48158
|
-
}
|
|
48159
|
-
|
|
48160
|
-
visitMultiple(container, parent, listKey) {
|
|
48161
|
-
if (container.length === 0)
|
|
48162
|
-
return false;
|
|
48163
|
-
|
|
48164
|
-
const queue = [];
|
|
48165
|
-
|
|
48166
|
-
for (let key = 0; key < container.length; key++) {
|
|
48167
|
-
const node = container[key];
|
|
48168
|
-
|
|
48169
|
-
if (node && this.shouldVisit(node)) {
|
|
48170
|
-
queue.push(this.create(parent, container, key, listKey));
|
|
48171
|
-
}
|
|
48172
|
-
}
|
|
48173
|
-
|
|
48174
|
-
return this.visitQueue(queue);
|
|
48175
|
-
}
|
|
48176
|
-
|
|
48177
|
-
visitSingle(node, key) {
|
|
48178
|
-
if (this.shouldVisit(node[key])) {
|
|
48179
|
-
return this.visitQueue([this.create(node, node, key)]);
|
|
48180
|
-
} else {
|
|
48181
|
-
return false;
|
|
48182
|
-
}
|
|
48183
|
-
}
|
|
48184
|
-
|
|
48185
|
-
visitQueue(queue) {
|
|
48186
|
-
this.queue = queue;
|
|
48187
|
-
this.priorityQueue = [];
|
|
48188
|
-
const visited = /* @__PURE__ */new WeakSet();
|
|
48189
|
-
let stop2 = false;
|
|
48190
|
-
let visitIndex = 0;
|
|
48191
|
-
|
|
48192
|
-
for (; visitIndex < queue.length;) {
|
|
48193
|
-
const path = queue[visitIndex];
|
|
48194
|
-
visitIndex++;
|
|
48195
|
-
resync.call(path);
|
|
48196
|
-
|
|
48197
|
-
if (path.key === null)
|
|
48198
|
-
continue;
|
|
48199
|
-
|
|
48200
|
-
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
|
|
48201
|
-
pushContext.call(path, this);
|
|
48202
|
-
}
|
|
48203
|
-
|
|
48204
|
-
const {node} = path;
|
|
48205
|
-
|
|
48206
|
-
if (visited.has(node))
|
|
48207
|
-
continue;
|
|
48208
|
-
|
|
48209
|
-
if (node)
|
|
48210
|
-
visited.add(node);
|
|
48211
|
-
|
|
48212
|
-
if (path.visit()) {
|
|
48213
|
-
stop2 = true;
|
|
48214
|
-
break;
|
|
48215
|
-
}
|
|
48216
|
-
|
|
48217
|
-
if (this.priorityQueue.length) {
|
|
48218
|
-
stop2 = this.visitQueue(this.priorityQueue);
|
|
48219
|
-
this.priorityQueue = [];
|
|
48220
|
-
this.queue = queue;
|
|
48221
|
-
|
|
48222
|
-
if (stop2)
|
|
48223
|
-
break;
|
|
48224
|
-
}
|
|
48225
|
-
}
|
|
48226
|
-
|
|
48227
|
-
for (let i = 0; i < visitIndex; i++) {
|
|
48228
|
-
if (queue[i].key === null)
|
|
48229
|
-
continue;
|
|
48230
|
-
|
|
48231
|
-
popContext.call(queue[i]);
|
|
48232
|
-
}
|
|
48233
|
-
|
|
48234
|
-
this.queue = null;
|
|
48235
|
-
|
|
48236
|
-
return stop2;
|
|
48237
|
-
}
|
|
48238
|
-
|
|
48239
|
-
visit(node, key) {
|
|
48240
|
-
const nodes = node[key];
|
|
48241
|
-
|
|
48242
|
-
if (!nodes)
|
|
48243
|
-
return false;
|
|
48244
|
-
|
|
48245
|
-
if (Array.isArray(nodes)) {
|
|
48246
|
-
return this.visitMultiple(nodes, node, key);
|
|
48247
|
-
} else {
|
|
48248
|
-
return this.visitSingle(node, key);
|
|
48249
|
-
}
|
|
48250
|
-
}
|
|
48251
|
-
};
|
|
48252
|
-
|
|
48253
|
-
var {VISITOR_KEYS: VISITOR_KEYS$12} = lib_exports;
|
|
48254
|
-
|
|
48255
|
-
function _visitPaths(ctx, paths) {
|
|
48256
|
-
ctx.queue = paths;
|
|
48257
|
-
ctx.priorityQueue = [];
|
|
48258
|
-
const visited = /* @__PURE__ */new Set();
|
|
48259
|
-
let stop2 = false;
|
|
48260
|
-
let visitIndex = 0;
|
|
48261
|
-
|
|
48262
|
-
for (; visitIndex < paths.length;) {
|
|
48263
|
-
const path = paths[visitIndex];
|
|
48264
|
-
visitIndex++;
|
|
48265
|
-
resync.call(path);
|
|
48266
|
-
|
|
48267
|
-
if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== ctx) {
|
|
48268
|
-
pushContext.call(path, ctx);
|
|
48269
|
-
}
|
|
48270
|
-
|
|
48271
|
-
if (path.key === null)
|
|
48272
|
-
continue;
|
|
48273
|
-
|
|
48274
|
-
const {node} = path;
|
|
48275
|
-
|
|
48276
|
-
if (visited.has(node))
|
|
48277
|
-
continue;
|
|
48278
|
-
|
|
48279
|
-
if (node)
|
|
48280
|
-
visited.add(node);
|
|
48281
|
-
|
|
48282
|
-
if (_visit(ctx, path)) {
|
|
48283
|
-
stop2 = true;
|
|
48284
|
-
break;
|
|
48285
|
-
}
|
|
48286
|
-
|
|
48287
|
-
if (ctx.priorityQueue.length) {
|
|
48288
|
-
stop2 = _visitPaths(ctx, ctx.priorityQueue);
|
|
48289
|
-
ctx.priorityQueue = [];
|
|
48290
|
-
ctx.queue = paths;
|
|
48291
|
-
|
|
48292
|
-
if (stop2)
|
|
48293
|
-
break;
|
|
48294
|
-
}
|
|
48295
|
-
}
|
|
48296
|
-
|
|
48297
|
-
for (let i = 0; i < visitIndex; i++) {
|
|
48298
|
-
popContext.call(paths[i]);
|
|
48299
|
-
}
|
|
48300
|
-
|
|
48301
|
-
ctx.queue = null;
|
|
48302
|
-
|
|
48303
|
-
return stop2;
|
|
48304
|
-
}
|
|
48305
|
-
|
|
48306
|
-
function _visit(ctx, path) {
|
|
48307
|
-
const node = path.node;
|
|
48308
|
-
|
|
48309
|
-
if (!node) {
|
|
48310
|
-
return false;
|
|
48311
|
-
}
|
|
48312
|
-
|
|
48313
|
-
const opts = ctx.opts;
|
|
48314
|
-
const denylist = opts.denylist;
|
|
48315
|
-
|
|
48316
|
-
if (denylist?.includes(node.type)) {
|
|
48317
|
-
return false;
|
|
48318
|
-
}
|
|
48319
|
-
|
|
48320
|
-
if (opts.shouldSkip?.(path)) {
|
|
48321
|
-
return false;
|
|
48322
|
-
}
|
|
48323
|
-
|
|
48324
|
-
if (path.shouldSkip)
|
|
48325
|
-
return path.shouldStop;
|
|
48326
|
-
|
|
48327
|
-
if (_call.call(path, opts.enter))
|
|
48328
|
-
return path.shouldStop;
|
|
48329
|
-
|
|
48330
|
-
if (path.node) {
|
|
48331
|
-
if (_call.call(path, opts[node.type]?.enter))
|
|
48332
|
-
return path.shouldStop;
|
|
48333
|
-
}
|
|
48334
|
-
|
|
48335
|
-
path.shouldStop = traverseNode(path.node, opts, path.scope, ctx.state, path, path.skipKeys);
|
|
48336
|
-
|
|
48337
|
-
if (path.node) {
|
|
48338
|
-
if (_call.call(path, opts.exit))
|
|
48339
|
-
return true;
|
|
48340
|
-
}
|
|
48341
|
-
|
|
48342
|
-
if (path.node) {
|
|
48343
|
-
_call.call(path, opts[node.type]?.exit);
|
|
48344
|
-
}
|
|
48345
|
-
|
|
48346
|
-
return path.shouldStop;
|
|
48347
|
-
}
|
|
48348
|
-
|
|
48349
|
-
function traverseNode(node, opts, scope2, state, path, skipKeys, visitSelf) {
|
|
48350
|
-
const keys2 = VISITOR_KEYS$12[node.type];
|
|
48351
|
-
|
|
48352
|
-
if (!keys2?.length)
|
|
48353
|
-
return false;
|
|
48354
|
-
|
|
48355
|
-
const ctx = new TraversalContext(scope2, opts, state, path);
|
|
48356
|
-
|
|
48357
|
-
if (visitSelf) {
|
|
48358
|
-
if (skipKeys?.[path.parentKey])
|
|
48359
|
-
return false;
|
|
48360
|
-
|
|
48361
|
-
return _visitPaths(ctx, [path]);
|
|
48362
|
-
}
|
|
48363
|
-
|
|
48364
|
-
const hub = path == null ? node.type === 'Program' || node.type === 'File' ? new Hub() : void 0 : path.hub;
|
|
48365
|
-
|
|
48366
|
-
for (const key of keys2) {
|
|
48367
|
-
if (skipKeys?.[key])
|
|
48368
|
-
continue;
|
|
48369
|
-
|
|
48370
|
-
const prop = node[key];
|
|
48371
|
-
|
|
48372
|
-
if (!prop)
|
|
48373
|
-
continue;
|
|
48374
|
-
|
|
48375
|
-
if (Array.isArray(prop)) {
|
|
48376
|
-
if (!prop.length)
|
|
48377
|
-
continue;
|
|
48378
|
-
|
|
48379
|
-
const paths = [];
|
|
48380
|
-
|
|
48381
|
-
for (let i = 0; i < prop.length; i++) {
|
|
48382
|
-
const childPath = NodePath_Final.get({
|
|
48383
|
-
parentPath: path,
|
|
48384
|
-
parent: node,
|
|
48385
|
-
container: prop,
|
|
48386
|
-
key: i,
|
|
48387
|
-
listKey: key,
|
|
48388
|
-
hub,
|
|
48389
|
-
});
|
|
48390
|
-
|
|
48391
|
-
paths.push(childPath);
|
|
48392
|
-
}
|
|
48393
|
-
|
|
48394
|
-
if (_visitPaths(ctx, paths))
|
|
48395
|
-
return true;
|
|
48396
|
-
} else {
|
|
48397
|
-
if (_visitPaths(ctx, [
|
|
48398
|
-
NodePath_Final.get({parentPath: path, parent: node, container: node, key, listKey: null, hub}),
|
|
48399
|
-
])) {
|
|
48400
|
-
return true;
|
|
48401
|
-
}
|
|
48402
|
-
}
|
|
48403
|
-
}
|
|
48404
|
-
|
|
48405
|
-
return false;
|
|
48406
|
-
}
|
|
48407
|
-
|
|
48408
|
-
function call(key) {
|
|
48409
|
-
const opts = this.opts;
|
|
48410
|
-
this.debug(key);
|
|
48411
|
-
|
|
48412
|
-
if (this.node) {
|
|
48413
|
-
if (_call.call(this, opts[key]))
|
|
48414
|
-
return true;
|
|
48415
|
-
}
|
|
48416
|
-
|
|
48417
|
-
if (this.node) {
|
|
48418
|
-
return _call.call(this, opts[this.node.type]?.[key]);
|
|
48419
|
-
}
|
|
48420
|
-
|
|
48421
|
-
return false;
|
|
48422
|
-
}
|
|
48423
|
-
|
|
48424
48081
|
function _call(fns) {
|
|
48425
48082
|
if (!fns)
|
|
48426
48083
|
return false;
|
|
@@ -48458,42 +48115,6 @@ function isDenylisted() {
|
|
|
48458
48115
|
return !!this.opts.denylist?.includes(this.node.type);
|
|
48459
48116
|
}
|
|
48460
48117
|
|
|
48461
|
-
function restoreContext(path, context) {
|
|
48462
|
-
if (path.context !== context) {
|
|
48463
|
-
path.context = context;
|
|
48464
|
-
path.state = context.state;
|
|
48465
|
-
path.opts = context.opts;
|
|
48466
|
-
}
|
|
48467
|
-
}
|
|
48468
|
-
|
|
48469
|
-
function visit() {
|
|
48470
|
-
if (!this.node) {
|
|
48471
|
-
return false;
|
|
48472
|
-
}
|
|
48473
|
-
|
|
48474
|
-
if (this.isDenylisted()) {
|
|
48475
|
-
return false;
|
|
48476
|
-
}
|
|
48477
|
-
|
|
48478
|
-
if (this.opts.shouldSkip?.(this)) {
|
|
48479
|
-
return false;
|
|
48480
|
-
}
|
|
48481
|
-
|
|
48482
|
-
const currentContext = this.context;
|
|
48483
|
-
|
|
48484
|
-
if (this.shouldSkip || call.call(this, 'enter')) {
|
|
48485
|
-
this.debug('Skip...');
|
|
48486
|
-
return this.shouldStop;
|
|
48487
|
-
}
|
|
48488
|
-
|
|
48489
|
-
restoreContext(this, currentContext);
|
|
48490
|
-
this.debug('Recursing into...');
|
|
48491
|
-
this.shouldStop = traverseNode(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
|
|
48492
|
-
restoreContext(this, currentContext);
|
|
48493
|
-
call.call(this, 'exit');
|
|
48494
|
-
return this.shouldStop;
|
|
48495
|
-
}
|
|
48496
|
-
|
|
48497
48118
|
function skip() {
|
|
48498
48119
|
this.shouldSkip = true;
|
|
48499
48120
|
}
|