From 75a7a4499d43564c40f1ba9b8729c635808f71f5 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 19 Aug 2018 10:53:43 -0700 Subject: [PATCH] Added some more cases to the match handling --- schala-lang/src/reduced_ast.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/schala-lang/src/reduced_ast.rs b/schala-lang/src/reduced_ast.rs index 89ff4fc..38bb8fb 100644 --- a/schala-lang/src/reduced_ast.rs +++ b/schala-lang/src/reduced_ast.rs @@ -195,10 +195,21 @@ fn reduce_if_expression(discriminator: &Discriminator, body: &IfExpressionBody, let (tag, bound_vars) = match arm.guard { Guard::Pat(ref p) => match p { Pattern::Ignored => (None, vec![]), + Pattern::Literal(lit) => match lit { + PatternLiteral::NumPattern(expr) => unimplemented!(), + PatternLiteral::StringPattern(s) => unimplemented!(), + PatternLiteral::BoolPattern(b) => unimplemented!(), + PatternLiteral::VarPattern(var) => unimplemented!(), + }, Pattern::TuplePattern(_) => { unimplemented!() }, - _ => unimplemented!() + Pattern::TupleStruct(name, subpatterns) => { + unimplemented!() + }, + Pattern::Record(name, pairs) => { + unimplemented!() + }, }, Guard::HalfExpr(HalfExpr { ref op, ref expr }) => {