mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
avoid bloating parse expr size
This commit is contained in:
parent
d2a3caacbb
commit
5e8974177c
7 changed files with 14 additions and 12 deletions
|
@ -302,7 +302,7 @@ pub enum Expr<'a> {
|
|||
Expect(&'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
|
||||
Dbg(&'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
|
||||
// This form of debug is a desugared call to roc_dbg
|
||||
LowLevelDbg(&'a str, &'a str, &'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
|
||||
LowLevelDbg(&'a (&'a str, &'a str), &'a Loc<Expr<'a>>, &'a Loc<Expr<'a>>),
|
||||
|
||||
// Application
|
||||
/// To apply by name, do Apply(Var(...), ...)
|
||||
|
@ -1537,7 +1537,7 @@ impl<'a> Malformed for Expr<'a> {
|
|||
Backpassing(args, call, body) => args.iter().any(|arg| arg.is_malformed()) || call.is_malformed() || body.is_malformed(),
|
||||
Expect(condition, continuation) |
|
||||
Dbg(condition, continuation) => condition.is_malformed() || continuation.is_malformed(),
|
||||
LowLevelDbg(_, _, condition, continuation) => condition.is_malformed() || continuation.is_malformed(),
|
||||
LowLevelDbg(_, condition, continuation) => condition.is_malformed() || continuation.is_malformed(),
|
||||
Apply(func, args, _) => func.is_malformed() || args.iter().any(|arg| arg.is_malformed()),
|
||||
BinOps(firsts, last) => firsts.iter().any(|(expr, _)| expr.is_malformed()) || last.is_malformed(),
|
||||
UnaryOp(expr, _) => expr.is_malformed(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue