Added test for lambda call

This commit is contained in:
greg 2018-03-06 00:56:19 -08:00
parent e3671a579d
commit 355c8170a4

View File

@ -1192,5 +1192,10 @@ fn a(x) {
body: vec![exprstatement!(val!("a")), exprstatement!(val!("b")), exprstatement!(val!("c"))] body: vec![exprstatement!(val!("a")), exprstatement!(val!("b")), exprstatement!(val!("c"))]
}) })
])); ]));
parse_test!("{|x| y}(1)", AST(vec![
exprstatement!(Call { f: bx!(ex!(
Lambda { params: vec![(rc!(x), None)], body: vec![exprstatement!(val!("y"))] })),
arguments: vec![ex!(IntLiteral(1))] })]));
} }
} }