Try to recover from LookupNotInScope until the error is reported

This commit is contained in:
Folkert 2021-08-18 23:12:12 +02:00
parent 4265b7b58e
commit bb5b733de4
2 changed files with 38 additions and 15 deletions

View file

@ -271,10 +271,20 @@ impl<'a> Context<'a> {
fn get_var_info(&self, symbol: Symbol) -> VarInfo {
match self.vars.get(&symbol) {
Some(info) => *info,
None => panic!(
"Symbol {:?} {} has no info in {:?}",
symbol, symbol, self.vars
),
None => {
eprintln!(
"Symbol {:?} {} has no info in self.vars",
symbol,
symbol, // self.vars
);
VarInfo {
persistent: true,
reference: false,
consume: false,
reset: false,
}
}
}
}