Add local variable collection to compilation
* Upon entering a new body, the local scope variables are collected. * VM instruction PushLocal now uses a `Local` value instead of a `Sym` value * Compilation of a new AST body will implicitly create a new scope Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ pub enum Inst {
|
||||
PushConst(ConstHandle),
|
||||
|
||||
/// Looks up and pushes a local value.
|
||||
PushLocal(Sym),
|
||||
PushLocal(Local),
|
||||
|
||||
/// Pop a value from the stack, possibly into a local symbol.
|
||||
Pop(Option<Sym>),
|
||||
|
||||
Reference in New Issue
Block a user