remove suffixed from Expr::Var

This commit is contained in:
Luke Boswell 2024-04-27 13:06:19 +10:00
parent 1640ee1321
commit 2fe03e6c91
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
15 changed files with 60 additions and 167 deletions

View file

@ -172,11 +172,7 @@ impl<'a> Formattable for Expr<'a> {
Str(literal) => {
fmt_str_literal(buf, *literal, indent);
}
Var {
module_name,
ident,
suffixed,
} => {
Var { module_name, ident } => {
buf.indent(indent);
if !module_name.is_empty() {
buf.push_str(module_name);
@ -184,11 +180,6 @@ impl<'a> Formattable for Expr<'a> {
}
buf.push_str(ident);
let count: u8 = *suffixed;
for _ in 0..count {
buf.push('!');
}
}
Underscore(name) => {
buf.indent(indent);

View file

@ -695,15 +695,7 @@ impl<'a> RemoveSpaces<'a> for Expr<'a> {
Expr::Record(a) => Expr::Record(a.remove_spaces(arena)),
Expr::RecordBuilder(a) => Expr::RecordBuilder(a.remove_spaces(arena)),
Expr::Tuple(a) => Expr::Tuple(a.remove_spaces(arena)),
Expr::Var {
module_name,
ident,
suffixed,
} => Expr::Var {
module_name,
ident,
suffixed,
},
Expr::Var { module_name, ident } => Expr::Var { module_name, ident },
Expr::Underscore(a) => Expr::Underscore(a),
Expr::Tag(a) => Expr::Tag(a),
Expr::OpaqueRef(a) => Expr::OpaqueRef(a),