Handle more patterns at reduce_ast level

This commit is contained in:
greg 2018-10-16 17:18:03 -07:00
parent d57a8045a9
commit dc9e493fa1

View File

@ -239,11 +239,16 @@ impl Pattern {
} }
}, },
PatternLiteral::StringPattern(_s) => unimplemented!(), PatternLiteral::StringPattern(_s) => unimplemented!(),
PatternLiteral::BoolPattern(_b) => unimplemented!(), PatternLiteral::BoolPattern(b) => {
unimplemented!()
},
PatternLiteral::VarPattern(var) => match symbol_table.lookup_by_name(var) { PatternLiteral::VarPattern(var) => match symbol_table.lookup_by_name(var) {
Some(symbol) => handle_symbol(symbol, &vec![], item), Some(symbol) => handle_symbol(symbol, &vec![], item),
None => { None => Alternative {
unimplemented!() tag: None,
guard: None,
bound_vars: vec![Some(var.clone())],
item
} }
} }
}, },