diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-22 17:16:42 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-22 17:16:42 +0100 |
| commit | ac788f2082711161ec8208eede04d9a2bae02241 (patch) | |
| tree | b139e41d327af906163c0b177d402b855c04507e /src/parse/collection.rs | |
| parent | 0de4f3ed7bb20a94fd58f93b0793d3b5a8e13972 (diff) | |
Many more expressions 🥗
Boolean, equality, comparison and assignment expression parsing and evaluation.
Diffstat (limited to 'src/parse/collection.rs')
| -rw-r--r-- | src/parse/collection.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/parse/collection.rs b/src/parse/collection.rs index 58fd91ae..95ca9847 100644 --- a/src/parse/collection.rs +++ b/src/parse/collection.rs @@ -1,5 +1,4 @@ use super::*; -use crate::diag::Deco; /// Parse the arguments to a function call. pub fn arguments(p: &mut Parser) -> ExprArgs { @@ -54,9 +53,8 @@ fn argument(p: &mut Parser) -> Option<Argument> { let first = p.span_if(expr)?; if p.eat_if(Token::Colon) { 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)); + let expr = p.span_if(expr)?; Some(Argument::Named(Named { name, expr })) } else { p.diag(error!(first.span, "expected identifier")); |
