fix: use generated tuple representation for Await AST nodes
This commit is contained in:
@@ -332,7 +332,7 @@ impl Builder {
|
||||
binding,
|
||||
});
|
||||
}
|
||||
ExprKind::Unary { operand, .. } | ExprKind::Await { operand } => {
|
||||
ExprKind::Unary { operand, .. } | ExprKind::Await(operand) => {
|
||||
self.expression(operand, globals)?
|
||||
}
|
||||
ExprKind::Binary { left, right, .. } => {
|
||||
|
||||
@@ -300,7 +300,7 @@ impl<'a> Emitter<'a> {
|
||||
}
|
||||
self.emit(Opcode::Call, arguments.len())?;
|
||||
}
|
||||
ExprKind::Await { operand } => {
|
||||
ExprKind::Await(operand) => {
|
||||
self.expression(operand)?;
|
||||
self.simple(Opcode::Await);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ peg::parser! {
|
||||
left:(@) slash() right:@ { binary(left, BinaryOp::Divide, right) }
|
||||
--
|
||||
start:keyword("await") operand:@ {
|
||||
Expr { span: start.through(operand.span), kind: ExprKind::Await { operand: Box::new(operand) } }
|
||||
Expr { span: start.through(operand.span), kind: ExprKind::Await(Box::new(operand)) }
|
||||
}
|
||||
start:minus() operand:@ {
|
||||
Expr { span: start.through(operand.span), kind: ExprKind::Unary { operation: UnaryOp::Negate, operand: Box::new(operand) } }
|
||||
|
||||
Reference in New Issue
Block a user