parse underscores in expressions

This commit is contained in:
Folkert 2021-04-11 21:02:31 +02:00
parent e1a78645aa
commit 28ba645121
7 changed files with 87 additions and 8 deletions

View file

@ -30,6 +30,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
| Access(_, _)
| AccessorFunction(_)
| Var { .. }
| Underscore { .. }
| MalformedIdent(_, _)
| MalformedClosure
| GlobalTag(_)
@ -189,6 +190,10 @@ impl<'a> Formattable<'a> for Expr<'a> {
buf.push_str(ident);
}
Underscore(name) => {
buf.push('_');
buf.push_str(name);
}
Apply(loc_expr, loc_args, _) => {
if apply_needs_parens {
buf.push('(');