diff --git a/schala-lang/language/src/reduced_ast.rs b/schala-lang/language/src/reduced_ast.rs index 96e0a5c..09a0bef 100644 --- a/schala-lang/language/src/reduced_ast.rs +++ b/schala-lang/language/src/reduced_ast.rs @@ -1,6 +1,6 @@ use std::rc::Rc; -use ast::{AST, Statement, Expression, ExpressionType, Declaration, Discriminator, IfExpressionBody, Pattern, PatternLiteral, Guard, HalfExpr}; +use ast::*; use symbol_table::{Symbol, SymbolSpec, SymbolTable}; use builtin::{BinOp, PrefixOp}; @@ -140,11 +140,20 @@ impl Expression { }, TupleLiteral(exprs) => Expr::Tuple(exprs.iter().map(|e| e.reduce(symbol_table)).collect()), IfExpression { discriminator, body } => reduce_if_expression(discriminator, body, symbol_table), - _ => Expr::UnimplementedSigilValue, + Lambda { params, body, .. } => reduce_lambda(params, body, symbol_table), + NamedStruct { .. } => Expr::UnimplementedSigilValue, + Index { .. } => Expr::UnimplementedSigilValue, + WhileExpression { .. } => Expr::UnimplementedSigilValue, + ForExpression { .. } => Expr::UnimplementedSigilValue, + ListLiteral { .. } => Expr::UnimplementedSigilValue, } } } +fn reduce_lambda(params: &Vec, body: &Block, symbol_table: &SymbolTable) -> Expr { + unimplemented!() +} + fn reduce_if_expression(discriminator: &Discriminator, body: &IfExpressionBody, symbol_table: &SymbolTable) -> Expr { let cond = Box::new(match *discriminator { Discriminator::Simple(ref expr) => expr.reduce(symbol_table),