diff --git a/schala-lang/language/src/parsing.rs b/schala-lang/language/src/parsing.rs index 04ee0b1..d2eb8da 100644 --- a/schala-lang/language/src/parsing.rs +++ b/schala-lang/language/src/parsing.rs @@ -1228,7 +1228,7 @@ mod parse_tests { } macro_rules! inv { - ($expr_type:expr) => { Meta::new(InvocationArgument::Positional(ex!($expr_type))) } + ($expr_type:expr) => { Meta::new(InvocationArgument::Positional($expr_type)) } } macro_rules! binexp { @@ -1363,7 +1363,7 @@ mod parse_tests { parse_test!("oi()", AST(vec![exst!(Call { f: bx!(ex!(m val!("oi"))), arguments: vec![] })])); parse_test!("oi(a, 2 + 2)", AST(vec![exst!(Call { f: bx!(ex!(m val!("oi"))), - arguments: vec![inv!(val!("a")).into(), inv!(binexp!("+", NatLiteral(2), NatLiteral(2))).into()] + arguments: vec![inv!(ex!(val!("a"))).into(), inv!(ex!(binexp!("+", NatLiteral(2), NatLiteral(2)))).into()] })])); parse_error!("a(b,,c)"); @@ -1626,7 +1626,7 @@ fn a(x) { type_anno: None, body: vec![exst!(s "y")] } )), - arguments: vec![inv!(NatLiteral(1)).into()] })])); + arguments: vec![inv!(ex!(NatLiteral(1))).into()] })])); parse_test_wrap_ast! { r#"\(x: Int): String { "q" }"#, @@ -1668,7 +1668,7 @@ fn a(x) { exst! { Call { f: bx!(ex!(m Call { f: bx!(ex!(m val!("wahoo"))), arguments: vec![] })), - arguments: vec![inv!(NatLiteral(3)).into()], + arguments: vec![inv!(ex!(NatLiteral(3))).into()], } } ])