fix: use generated tuple representation for Await AST nodes

This commit is contained in:
2026-10-23 20:15:49 +08:00
parent ae75c54707
commit 89b817447e
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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, .. } => {
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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) } }