mirror of
https://github.com/MorizzG/rlox.git
synced 2025-12-06 04:12:42 +00:00
automatically heapify captured variables
This commit is contained in:
parent
9d447d9266
commit
8e847847a6
5 changed files with 136 additions and 40 deletions
|
|
@ -40,7 +40,7 @@ impl Runtime {
|
|||
self.debug = debug;
|
||||
}
|
||||
|
||||
pub fn debug(&self) -> bool {
|
||||
pub fn is_debug(&self) -> bool {
|
||||
self.debug
|
||||
}
|
||||
|
||||
|
|
@ -76,9 +76,11 @@ impl Runtime {
|
|||
*old_value = value;
|
||||
Ok(())
|
||||
} else {
|
||||
Err(RuntimeError::GlobalNotDefined {
|
||||
name: name.to_owned(),
|
||||
})
|
||||
panic!("Global not defined not caught by resolver");
|
||||
|
||||
// Err(RuntimeError::GlobalNotDefined {
|
||||
// name: name.to_owned(),
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue