mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
parse underscores in expressions
This commit is contained in:
parent
e1a78645aa
commit
28ba645121
7 changed files with 87 additions and 8 deletions
|
@ -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('(');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue