mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Update parser AST to support dbg as both a statment and expression
Make `Expr::Dbg` node specific to dbg expressions, add `Expr::DbgStmt` for dbg statements. Debug expressions don't have a continuation branch. Support formatting both kinds of `Dbg` nodes.
This commit is contained in:
parent
a16f757164
commit
43d932df3b
8 changed files with 54 additions and 20 deletions
|
@ -784,7 +784,8 @@ impl<'a> Normalize<'a> for Expr<'a> {
|
|||
arena.alloc(a.normalize(arena)),
|
||||
arena.alloc(b.normalize(arena)),
|
||||
),
|
||||
Expr::Dbg(a, b) => Expr::Dbg(
|
||||
Expr::Dbg(a) => Expr::Dbg(arena.alloc(a.normalize(arena))),
|
||||
Expr::DbgStmt(a, b) => Expr::DbgStmt(
|
||||
arena.alloc(a.normalize(arena)),
|
||||
arena.alloc(b.normalize(arena)),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue