mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
desugar ValueDef::Expect suffixed nodes
This commit is contained in:
parent
5f3a956137
commit
cce33c03d6
3 changed files with 330 additions and 1 deletions
|
@ -290,8 +290,21 @@ pub fn desugar_value_def_suffixed<'a>(arena: &'a Bump, value_def: ValueDef<'a>)
|
|||
}
|
||||
}
|
||||
|
||||
Expect {
|
||||
condition,
|
||||
preceding_comment,
|
||||
} => match unwrap_suffixed_expression(arena, condition, None) {
|
||||
Ok(new_condition) => ValueDef::Expect {
|
||||
condition: new_condition,
|
||||
preceding_comment,
|
||||
},
|
||||
Err(..) => {
|
||||
internal_error!("Unable to desugar the suffix inside an Expect value def");
|
||||
}
|
||||
},
|
||||
|
||||
// TODO support desugaring of Dbg, Expect, and ExpectFx
|
||||
Dbg { .. } | Expect { .. } | ExpectFx { .. } => value_def,
|
||||
Dbg { .. } | ExpectFx { .. } => value_def,
|
||||
ModuleImport { .. } | IngestedFileImport(_) => value_def,
|
||||
|
||||
Stmt(..) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue