diff --git a/schala-lang/language/src/reduced_ast.rs b/schala-lang/language/src/reduced_ast.rs index de228b5..ae79e37 100644 --- a/schala-lang/language/src/reduced_ast.rs +++ b/schala-lang/language/src/reduced_ast.rs @@ -150,7 +150,7 @@ impl Expression { TupleLiteral(exprs) => Expr::Tuple(exprs.iter().map(|e| e.node().reduce(symbol_table)).collect()), IfExpression { discriminator, body } => reduce_if_expression(discriminator, body, symbol_table), Lambda { params, body, .. } => reduce_lambda(params, body, symbol_table), - NamedStruct { .. } => Expr::UnimplementedSigilValue, + NamedStruct { name, fields } => reduce_named_struct(name, fields), Index { .. } => Expr::UnimplementedSigilValue, WhileExpression { .. } => Expr::UnimplementedSigilValue, ForExpression { .. } => Expr::UnimplementedSigilValue, @@ -167,6 +167,10 @@ fn reduce_lambda(params: &Vec, body: &Block, symbol_table: &SymbolT }) } +fn reduce_named_struct(name: &Rc, fields: &Vec<(Rc, Meta)>) -> Expr { + panic!() +} + fn reduce_call_expression(func: &Meta, arguments: &Vec>, symbol_table: &SymbolTable) -> Expr { Expr::Call { f: Box::new(func.node().reduce(symbol_table)),