From cf9ce7439483bc5837966e40a5b1e24daaf702a3 Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 20 Sep 2019 02:05:57 -0700 Subject: [PATCH] still more meta's --- schala-lang/language/src/ast.rs | 4 ++-- schala-lang/language/src/parsing/test.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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)")])) }) }