add suffixed to Identifer and QualifiedIdentifier

This commit is contained in:
Luke Boswell 2024-03-26 14:17:48 +11:00
parent 0a3b9c34b3
commit 3c3e523b45
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
115 changed files with 1587 additions and 1085 deletions

View file

@ -1016,9 +1016,11 @@ pub fn canonicalize_expr<'a>(
(expr, output)
}
}
ast::Expr::Var { module_name, ident } => {
canonicalize_var_lookup(env, var_store, scope, module_name, ident, region)
}
ast::Expr::Var {
module_name,
ident,
suffixed: _, // TODO should we use suffixed here?
} => canonicalize_var_lookup(env, var_store, scope, module_name, ident, region),
ast::Expr::Underscore(name) => {
// we parse underscores, but they are not valid expression syntax
@ -1441,12 +1443,6 @@ pub fn canonicalize_expr<'a>(
bad_expr
);
}
bad_expr @ ast::Expr::Suffixed(_) => {
internal_error!(
"A suffixed expression did not get desugared somehow: {:#?}",
bad_expr
);
}
};
// At the end, diff used_idents and defined_idents to see which were unused.
@ -2512,7 +2508,6 @@ pub fn is_valid_interpolation(expr: &ast::Expr<'_>) -> bool {
ast::RecordBuilderField::SpaceBefore(_, _)
| ast::RecordBuilderField::SpaceAfter(_, _) => false,
}),
ast::Expr::Suffixed(_) => todo!(),
}
}