diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-06 21:06:48 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-06 21:06:48 +0100 |
| commit | 59d811aeba4491d54d2b0220109fd21a8f838b9b (patch) | |
| tree | e3c22a86592252c157cb268404d5e176d60cac55 /src/parse/collection.rs | |
| parent | 7b4d4d6002a9c3da8fafd912f3c7b2da617f19c0 (diff) | |
Inline literal enum into expression enum 🔀
Diffstat (limited to 'src/parse/collection.rs')
| -rw-r--r-- | src/parse/collection.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/collection.rs b/src/parse/collection.rs index 889cfb0f..98d4219f 100644 --- a/src/parse/collection.rs +++ b/src/parse/collection.rs @@ -53,7 +53,7 @@ fn collection<T: Collection>(p: &mut Parser, mut collection: T) -> T { fn argument(p: &mut Parser) -> Option<Argument> { let first = p.span_if(expr)?; if p.eat_if(Token::Colon) { - if let Expr::Lit(Lit::Ident(ident)) = first.v { + if let Expr::Ident(ident) = first.v { let expr = p.span_if(expr)?; let name = ident.with_span(first.span); p.deco(Deco::Name.with_span(name.span)); @@ -131,7 +131,7 @@ impl Collection for State { fn take(expr: &mut Spanned<Expr>) -> Spanned<Expr> { // Replace with anything, it's overwritten anyway. - std::mem::replace(expr, Spanned::zero(Expr::Lit(Lit::Bool(false)))) + std::mem::replace(expr, Spanned::zero(Expr::Bool(false))) } fn diag(p: &mut Parser, arg: Spanned<Argument>) { |
