summaryrefslogtreecommitdiff
path: root/src/parse/collection.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-12 18:55:12 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-12 18:55:12 +0100
commitd2ba1b705ed7a532266294aa100f19423bb07f4d (patch)
tree1f06bf618f2190a3aabc26d69f0fb819e970341c /src/parse/collection.rs
parent105cda0e698fe86266d706f4e3bacc081e65c2aa (diff)
Group and block expressions, unary plus 🧩
Diffstat (limited to 'src/parse/collection.rs')
-rw-r--r--src/parse/collection.rs4
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),
}