Added some more cases to the match handling

This commit is contained in:
greg 2018-08-19 10:53:43 -07:00
parent 99e6668c9a
commit 75a7a4499d
1 changed files with 12 additions and 1 deletions

View File

@ -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 }) => {