ast: Give for loops a dedicated node and remove eager desugar

This commit is contained in:
2025-12-01 23:16:47 -05:00
parent 7ea483fe26
commit e566ea62e5
3 changed files with 19 additions and 73 deletions

View File

@@ -184,6 +184,7 @@ pub enum Use {
/// fn Pat Expr
/// mod Pat Expr
/// impl Pat Expr
/// for Pat in Expr Expr (else Expr)?
/// Pat => Expr // in match
/// ```
#[derive(Clone, Debug, PartialEq, Eq)]
@@ -214,6 +215,8 @@ pub enum BindOp {
Struct,
/// An enum definition
Enum,
/// A `for Pat in Expr Expr (else Expr)?` binding
For,
/// A `Pat => Expr` binding
Match,
}