diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-12 18:55:12 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-12 18:55:12 +0100 |
| commit | d2ba1b705ed7a532266294aa100f19423bb07f4d (patch) | |
| tree | 1f06bf618f2190a3aabc26d69f0fb819e970341c /src/parse/collection.rs | |
| parent | 105cda0e698fe86266d706f4e3bacc081e65c2aa (diff) | |
Group and block expressions, unary plus 🧩
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 98d4219f..ca05b998 100644 --- a/src/parse/collection.rs +++ b/src/parse/collection.rs @@ -59,7 +59,7 @@ fn argument(p: &mut Parser) -> Option<Argument> { p.deco(Deco::Name.with_span(name.span)); Some(Argument::Named(Named { name, expr })) } else { - p.diag(error!(first.span, "name must be identifier")); + p.diag(error!(first.span, "expected identifier")); expr(p); None } @@ -93,7 +93,7 @@ impl State { fn into_expr(self) -> Expr { match self { Self::Unknown => Expr::Array(vec![]), - Self::Expr(expr) => expr.v, + Self::Expr(expr) => Expr::Group(Box::new(expr.v)), Self::Array(array) => Expr::Array(array), Self::Dict(dict) => Expr::Dict(dict), } |
