Handle more patterns at reduce_ast level
This commit is contained in:
parent
d57a8045a9
commit
dc9e493fa1
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user