mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Desugar idents ending in !
to TrySuffix
This commit is contained in:
parent
56cdc749af
commit
aeeaab4b99
9 changed files with 62 additions and 38 deletions
|
@ -591,7 +591,13 @@ pub fn is_top_level_suffixed(expr: &Expr) -> bool {
|
|||
pub fn is_expr_suffixed(expr: &Expr) -> bool {
|
||||
match expr {
|
||||
// expression without arguments, `read!`
|
||||
Expr::Var { .. } => false,
|
||||
Expr::Var {
|
||||
module_name: _,
|
||||
ident,
|
||||
} => {
|
||||
// TODO remove when purity inference fully replaces Task
|
||||
ident.ends_with('!')
|
||||
}
|
||||
|
||||
Expr::TrySuffix { .. } => true,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue