feat: compile Endor await expressions through the source pipeline

This commit is contained in:
2026-10-23 20:14:15 +08:00
parent 16816c38c7
commit 8a2135897e
8 changed files with 39 additions and 6 deletions
+3
View File
@@ -146,6 +146,9 @@ peg::parser! {
left:(@) star() right:@ { binary(left, BinaryOp::Multiply, right) }
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) } }
}
start:minus() operand:@ {
Expr { span: start.through(operand.span), kind: ExprKind::Unary { operation: UnaryOp::Negate, operand: Box::new(operand) } }
}