summaryrefslogtreecommitdiff
path: root/src/parse/tests.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2020-12-31 17:05:00 +0100
committerLaurenz <laurmaedje@gmail.com>2020-12-31 17:48:56 +0100
commit4069f0744dc24c05d5a6fd6d0530984c4c7ff881 (patch)
tree64fb7211e638462779b03b4ae5b2ea0cc25d23d7 /src/parse/tests.rs
parentba3d43f7b2a18984be27f3d472884a19f3adce4c (diff)
Parsing improvements 🧽
- Simplified scanner code - Peek eagerly - Skip whitespace and comments automatically in header mode - Parse simple block expressions - Move literal definitions into expression module - Raw resolving tests
Diffstat (limited to 'src/parse/tests.rs')
-rw-r--r--src/parse/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/tests.rs b/src/parse/tests.rs
index 95d04928..632fe36e 100644
--- a/src/parse/tests.rs
+++ b/src/parse/tests.rs
@@ -102,7 +102,7 @@ macro_rules! Call {
fn Unary(op: impl Into<Spanned<UnOp>>, expr: impl Into<Spanned<Expr>>) -> Expr {
Expr::Unary(ExprUnary {
op: op.into(),
- expr: expr.into().map(Box::new),
+ expr: Box::new(expr.into()),
})
}
@@ -112,9 +112,9 @@ fn Binary(
rhs: impl Into<Spanned<Expr>>,
) -> Expr {
Expr::Binary(ExprBinary {
- lhs: lhs.into().map(Box::new),
+ lhs: Box::new(lhs.into()),
op: op.into(),
- rhs: rhs.into().map(Box::new),
+ rhs: Box::new(rhs.into()),
})
}