diff --git a/schala-lang/language/src/ast.rs b/schala-lang/language/src/ast.rs index 76d458a..ffc933f 100644 --- a/schala-lang/language/src/ast.rs +++ b/schala-lang/language/src/ast.rs @@ -300,11 +300,11 @@ pub enum PatternLiteral { #[derive(Debug, PartialEq, Clone)] pub struct Enumerator { pub id: Rc, - pub generator: Meta, + pub generator: Expression, } #[derive(Debug, PartialEq, Clone)] pub enum ForBody { - MonadicReturn(Meta), + MonadicReturn(Expression), StatementBlock(Block), } diff --git a/schala-lang/language/src/parsing/test.rs b/schala-lang/language/src/parsing/test.rs index 29b3e6f..3620e03 100644 --- a/schala-lang/language/src/parsing/test.rs +++ b/schala-lang/language/src/parsing/test.rs @@ -601,14 +601,14 @@ fn for_expr() { parse_test_wrap_ast! { "for { a <- maybeValue } return 1", exst!(ForExpression { - enumerators: vec![Enumerator { id: rc!(a), generator: ex!(m val!("maybeValue")) }], - body: bx!(MonadicReturn(Meta::new(ex!(s "1")))) + enumerators: vec![Enumerator { id: rc!(a), generator: ex!(val!("maybeValue")) }], + body: bx!(MonadicReturn(ex!(s "1"))) }) } parse_test_wrap_ast! { "for n <- someRange { f(n); }", - exst!(ForExpression { enumerators: vec![Enumerator { id: rc!(n), generator: ex!(m val!("someRange"))}], + exst!(ForExpression { enumerators: vec![Enumerator { id: rc!(n), generator: ex!(val!("someRange"))}], body: bx!(ForBody::StatementBlock(vec![exst!(s "f(n)")])) }) }