/
es5.ts
303 lines (296 loc) · 14.8 KB
/
es5.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
// ========================================================================== //
// DON'T EDIT THIS FILE DIRECTLY! //
// This file is automatically generated by the 'scripts/update-ast-files.ts'. //
// ========================================================================== //
/**
* @fileoverview The AST types for ES5.
*/
import * as ast from "./lib/ast"
import {
Comment,
Definition as ES5,
IndexRange,
LineColumnRange,
LineColumn,
Token,
} from "./es5-definition"
export { Comment, IndexRange, LineColumnRange, LineColumn, Token }
/** The map-like object that has all nodes and aliases. */
export type AST = ast.AST<ES5>
/** The namespace that has all nodes and aliases. */
export namespace AST {
/** The union type for all nodes. */
export type Node = AST["Node"]
/** The union type for the `AssignmentExpression` alias. */
export type AssignmentExpression = AST["AssignmentExpression"]
/** The union type for the `AssignmentTarget` alias. */
export type AssignmentTarget = AST["AssignmentTarget"]
/** The union type for the `BindingTarget` alias. */
export type BindingTarget = AST["BindingTarget"]
/** The union type for the `Declaration` alias. */
export type Declaration = AST["Declaration"]
/** The union type for the `Expression` alias. */
export type Expression = AST["Expression"]
/** The union type for the `Function` alias. */
export type Function = AST["Function"]
/** The union type for the `FunctionDeclaration` alias. */
export type FunctionDeclaration = AST["FunctionDeclaration"]
/** The union type for the `Literal` alias. */
export type Literal = AST["Literal"]
/** The union type for the `LogicalExpression` alias. */
export type LogicalExpression = AST["LogicalExpression"]
/** The union type for the `MemberExpression` alias. */
export type MemberExpression = AST["MemberExpression"]
/** The union type for the `ObjectProperty` alias. */
export type ObjectProperty = AST["ObjectProperty"]
/** The union type for the `Program` alias. */
export type Program = AST["Program"]
/** The union type for the `Property` alias. */
export type Property = AST["Property"]
/** The union type for the `SimpleAssignmentTarget` alias. */
export type SimpleAssignmentTarget = AST["SimpleAssignmentTarget"]
/** The union type for the `Statement` alias. */
export type Statement = AST["Statement"]
/** The union type for the `StaticPropertyKey` alias. */
export type StaticPropertyKey = AST["StaticPropertyKey"]
/** The type for the `AccessorProperty` node. */
export type AccessorProperty = AST["AccessorProperty"]
/** The type for the `ArrayExpression` node. */
export type ArrayExpression = AST["ArrayExpression"]
/** The type for the `BinaryExpression` node. */
export type BinaryExpression = AST["BinaryExpression"]
/** The type for the `BlockStatement` node. */
export type BlockStatement = AST["BlockStatement"]
/** The type for the `BooleanLiteral` node. */
export type BooleanLiteral = AST["BooleanLiteral"]
/** The type for the `BreakStatement` node. */
export type BreakStatement = AST["BreakStatement"]
/** The type for the `CallExpression` node. */
export type CallExpression = AST["CallExpression"]
/** The type for the `CatchClause` node. */
export type CatchClause = AST["CatchClause"]
/** The type for the `CompoundAssignmentExpression` node. */
export type CompoundAssignmentExpression = AST["CompoundAssignmentExpression"]
/** The type for the `ComputedMemberExpression` node. */
export type ComputedMemberExpression = AST["ComputedMemberExpression"]
/** The type for the `ConditionalExpression` node. */
export type ConditionalExpression = AST["ConditionalExpression"]
/** The type for the `ContinueStatement` node. */
export type ContinueStatement = AST["ContinueStatement"]
/** The type for the `DebuggerStatement` node. */
export type DebuggerStatement = AST["DebuggerStatement"]
/** The type for the `DoWhileStatement` node. */
export type DoWhileStatement = AST["DoWhileStatement"]
/** The type for the `EmptyStatement` node. */
export type EmptyStatement = AST["EmptyStatement"]
/** The type for the `ExpressionStatement` node. */
export type ExpressionStatement = AST["ExpressionStatement"]
/** The type for the `ForInStatement` node. */
export type ForInStatement = AST["ForInStatement"]
/** The type for the `ForStatement` node. */
export type ForStatement = AST["ForStatement"]
/** The type for the `FunctionExpression` node. */
export type FunctionExpression = AST["FunctionExpression"]
/** The type for the `Identifier` node. */
export type Identifier = AST["Identifier"]
/** The type for the `IfStatement` node. */
export type IfStatement = AST["IfStatement"]
/** The type for the `LabeledStatement` node. */
export type LabeledStatement = AST["LabeledStatement"]
/** The type for the `NewExpression` node. */
export type NewExpression = AST["NewExpression"]
/** The type for the `NullLiteral` node. */
export type NullLiteral = AST["NullLiteral"]
/** The type for the `NumberLiteral` node. */
export type NumberLiteral = AST["NumberLiteral"]
/** The type for the `ObjectExpression` node. */
export type ObjectExpression = AST["ObjectExpression"]
/** The type for the `PlainAssignmentExpression` node. */
export type PlainAssignmentExpression = AST["PlainAssignmentExpression"]
/** The type for the `PlainFunctionDeclaration` node. */
export type PlainFunctionDeclaration = AST["PlainFunctionDeclaration"]
/** The type for the `PlainLogicalExpression` node. */
export type PlainLogicalExpression = AST["PlainLogicalExpression"]
/** The type for the `PlainMemberExpression` node. */
export type PlainMemberExpression = AST["PlainMemberExpression"]
/** The type for the `PlainProperty` node. */
export type PlainProperty = AST["PlainProperty"]
/** The type for the `RegExpLiteral` node. */
export type RegExpLiteral = AST["RegExpLiteral"]
/** The type for the `ReturnStatement` node. */
export type ReturnStatement = AST["ReturnStatement"]
/** The type for the `ScriptProgram` node. */
export type ScriptProgram = AST["ScriptProgram"]
/** The type for the `SequenceExpression` node. */
export type SequenceExpression = AST["SequenceExpression"]
/** The type for the `StringLiteral` node. */
export type StringLiteral = AST["StringLiteral"]
/** The type for the `SwitchCase` node. */
export type SwitchCase = AST["SwitchCase"]
/** The type for the `SwitchStatement` node. */
export type SwitchStatement = AST["SwitchStatement"]
/** The type for the `ThisExpression` node. */
export type ThisExpression = AST["ThisExpression"]
/** The type for the `ThrowStatement` node. */
export type ThrowStatement = AST["ThrowStatement"]
/** The type for the `TryStatement` node. */
export type TryStatement = AST["TryStatement"]
/** The type for the `UnaryExpression` node. */
export type UnaryExpression = AST["UnaryExpression"]
/** The type for the `UpdateExpression` node. */
export type UpdateExpression = AST["UpdateExpression"]
/** The type for the `VariableDeclaration` node. */
export type VariableDeclaration = AST["VariableDeclaration"]
/** The type for the `VariableDeclarator` node. */
export type VariableDeclarator = AST["VariableDeclarator"]
/** The type for the `WhileStatement` node. */
export type WhileStatement = AST["WhileStatement"]
/** The type for the `WithStatement` node. */
export type WithStatement = AST["WithStatement"]
}
/** The union type for all alias names. */
export type AliasName = ast.AliasName<ES5>
/**
* The union type for all node type names in TypeScript.
*
* This is not the node type of ESTree because it may represent each ESTree node
* by multiple TypeScript types.
* Use the `TypeName` type if you want ESTree node type names.
*/
export type NodeName = ast.NodeName<ES5>
/**
* The union type for all node type names in ESTree.
*
* This is not the type name in TypeScript because it may represent each ESTree
* node by multiple TypeScript types.
* Use the `NodeName` type if you want node type names in TypeScript.
*/
export type TypeName = ast.ASTType<ES5>
/** The union type for all nodes. */
export type Node = AST["Node"]
/** The union type for the `AssignmentExpression` alias. */
export type AssignmentExpression = AST["AssignmentExpression"]
/** The union type for the `AssignmentTarget` alias. */
export type AssignmentTarget = AST["AssignmentTarget"]
/** The union type for the `BindingTarget` alias. */
export type BindingTarget = AST["BindingTarget"]
/** The union type for the `Declaration` alias. */
export type Declaration = AST["Declaration"]
/** The union type for the `Expression` alias. */
export type Expression = AST["Expression"]
/** The union type for the `Function` alias. */
export type Function = AST["Function"]
/** The union type for the `FunctionDeclaration` alias. */
export type FunctionDeclaration = AST["FunctionDeclaration"]
/** The union type for the `Literal` alias. */
export type Literal = AST["Literal"]
/** The union type for the `LogicalExpression` alias. */
export type LogicalExpression = AST["LogicalExpression"]
/** The union type for the `MemberExpression` alias. */
export type MemberExpression = AST["MemberExpression"]
/** The union type for the `ObjectProperty` alias. */
export type ObjectProperty = AST["ObjectProperty"]
/** The union type for the `Program` alias. */
export type Program = AST["Program"]
/** The union type for the `Property` alias. */
export type Property = AST["Property"]
/** The union type for the `SimpleAssignmentTarget` alias. */
export type SimpleAssignmentTarget = AST["SimpleAssignmentTarget"]
/** The union type for the `Statement` alias. */
export type Statement = AST["Statement"]
/** The union type for the `StaticPropertyKey` alias. */
export type StaticPropertyKey = AST["StaticPropertyKey"]
/** The type for the `AccessorProperty` node. */
export type AccessorProperty = AST["AccessorProperty"]
/** The type for the `ArrayExpression` node. */
export type ArrayExpression = AST["ArrayExpression"]
/** The type for the `BinaryExpression` node. */
export type BinaryExpression = AST["BinaryExpression"]
/** The type for the `BlockStatement` node. */
export type BlockStatement = AST["BlockStatement"]
/** The type for the `BooleanLiteral` node. */
export type BooleanLiteral = AST["BooleanLiteral"]
/** The type for the `BreakStatement` node. */
export type BreakStatement = AST["BreakStatement"]
/** The type for the `CallExpression` node. */
export type CallExpression = AST["CallExpression"]
/** The type for the `CatchClause` node. */
export type CatchClause = AST["CatchClause"]
/** The type for the `CompoundAssignmentExpression` node. */
export type CompoundAssignmentExpression = AST["CompoundAssignmentExpression"]
/** The type for the `ComputedMemberExpression` node. */
export type ComputedMemberExpression = AST["ComputedMemberExpression"]
/** The type for the `ConditionalExpression` node. */
export type ConditionalExpression = AST["ConditionalExpression"]
/** The type for the `ContinueStatement` node. */
export type ContinueStatement = AST["ContinueStatement"]
/** The type for the `DebuggerStatement` node. */
export type DebuggerStatement = AST["DebuggerStatement"]
/** The type for the `DoWhileStatement` node. */
export type DoWhileStatement = AST["DoWhileStatement"]
/** The type for the `EmptyStatement` node. */
export type EmptyStatement = AST["EmptyStatement"]
/** The type for the `ExpressionStatement` node. */
export type ExpressionStatement = AST["ExpressionStatement"]
/** The type for the `ForInStatement` node. */
export type ForInStatement = AST["ForInStatement"]
/** The type for the `ForStatement` node. */
export type ForStatement = AST["ForStatement"]
/** The type for the `FunctionExpression` node. */
export type FunctionExpression = AST["FunctionExpression"]
/** The type for the `Identifier` node. */
export type Identifier = AST["Identifier"]
/** The type for the `IfStatement` node. */
export type IfStatement = AST["IfStatement"]
/** The type for the `LabeledStatement` node. */
export type LabeledStatement = AST["LabeledStatement"]
/** The type for the `NewExpression` node. */
export type NewExpression = AST["NewExpression"]
/** The type for the `NullLiteral` node. */
export type NullLiteral = AST["NullLiteral"]
/** The type for the `NumberLiteral` node. */
export type NumberLiteral = AST["NumberLiteral"]
/** The type for the `ObjectExpression` node. */
export type ObjectExpression = AST["ObjectExpression"]
/** The type for the `PlainAssignmentExpression` node. */
export type PlainAssignmentExpression = AST["PlainAssignmentExpression"]
/** The type for the `PlainFunctionDeclaration` node. */
export type PlainFunctionDeclaration = AST["PlainFunctionDeclaration"]
/** The type for the `PlainLogicalExpression` node. */
export type PlainLogicalExpression = AST["PlainLogicalExpression"]
/** The type for the `PlainMemberExpression` node. */
export type PlainMemberExpression = AST["PlainMemberExpression"]
/** The type for the `PlainProperty` node. */
export type PlainProperty = AST["PlainProperty"]
/** The type for the `RegExpLiteral` node. */
export type RegExpLiteral = AST["RegExpLiteral"]
/** The type for the `ReturnStatement` node. */
export type ReturnStatement = AST["ReturnStatement"]
/** The type for the `ScriptProgram` node. */
export type ScriptProgram = AST["ScriptProgram"]
/** The type for the `SequenceExpression` node. */
export type SequenceExpression = AST["SequenceExpression"]
/** The type for the `StringLiteral` node. */
export type StringLiteral = AST["StringLiteral"]
/** The type for the `SwitchCase` node. */
export type SwitchCase = AST["SwitchCase"]
/** The type for the `SwitchStatement` node. */
export type SwitchStatement = AST["SwitchStatement"]
/** The type for the `ThisExpression` node. */
export type ThisExpression = AST["ThisExpression"]
/** The type for the `ThrowStatement` node. */
export type ThrowStatement = AST["ThrowStatement"]
/** The type for the `TryStatement` node. */
export type TryStatement = AST["TryStatement"]
/** The type for the `UnaryExpression` node. */
export type UnaryExpression = AST["UnaryExpression"]
/** The type for the `UpdateExpression` node. */
export type UpdateExpression = AST["UpdateExpression"]
/** The type for the `VariableDeclaration` node. */
export type VariableDeclaration = AST["VariableDeclaration"]
/** The type for the `VariableDeclarator` node. */
export type VariableDeclarator = AST["VariableDeclarator"]
/** The type for the `WhileStatement` node. */
export type WhileStatement = AST["WhileStatement"]
/** The type for the `WithStatement` node. */
export type WithStatement = AST["WithStatement"]