@@ -53,7 +53,7 @@ An expression can be one of the following:
53
53
type Expression = ThisExpression | Identifier | Literal |
54
54
ArrayExpression | ObjectExpression | FunctionExpression | ArrowFunctionExpression | ClassExpression |
55
55
TaggedTemplateExpression | MemberExpression | Super | MetaProperty |
56
- NewExpression | CallExpression | UpdateExpression | UnaryExpression |
56
+ NewExpression | CallExpression | UpdateExpression | AwaitExpression | UnaryExpression |
57
57
BinaryExpression | LogicalExpression | ConditionalExpression |
58
58
YieldExpression | AssignmentExpression | SequenceExpression;
59
59
```
@@ -174,6 +174,7 @@ interface FunctionExpression {
174
174
params: FunctionParameter[];
175
175
body: BlockStatement;
176
176
generator: boolean;
177
+ async: boolean;
177
178
expression: boolean;
178
179
}
179
180
```
@@ -195,6 +196,7 @@ interface FunctionExpression {
195
196
params: FunctionParameter[];
196
197
body: BlockStatement | Expression;
197
198
generator: boolean;
199
+ async: boolean;
198
200
expression: false ;
199
201
}
200
202
```
@@ -320,6 +322,15 @@ interface UpdateExpression {
320
322
}
321
323
` ` `
322
324
325
+ ### Await Expression
326
+
327
+ ` ` ` js
328
+ interface AwaitExpression {
329
+ type: ' AwaitExpression' ;
330
+ argument: Expression;
331
+ }
332
+ ` ` `
333
+
323
334
### Unary Expression
324
335
325
336
` ` ` js
@@ -414,7 +425,7 @@ type Statement = BlockStatement | BreakStatement | ContinueStatement |
414
425
A declaration can be one of the following:
415
426
416
427
` ` ` js
417
- type Declaration = ClassDeclaration | FunctionDeclaration VariableDeclaration;
428
+ type Declaration = ClassDeclaration | FunctionDeclaration | VariableDeclaration;
418
429
` ` `
419
430
420
431
A statement list item is either a statement or a declaration:
@@ -545,6 +556,7 @@ interface FunctionDeclaration {
545
556
params: FunctionParameter[];
546
557
body: BlockStatement;
547
558
generator: boolean;
559
+ async: boolean;
548
560
expression: false ;
549
561
}
550
562
` ` `
0 commit comments