Add internal error handling to VM, plus function arity
* VM is able to handle basic runtime errors although there is no way to catch this in executing code currently * If a function is called with the wrong number of arguments (arity) it will invoke a runtime error. Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ impl Compile {
|
||||
sym
|
||||
})
|
||||
.collect();
|
||||
Ok((self.const_data.const_pool, UserFun::new_obj(main, globals)))
|
||||
Ok((self.const_data.const_pool, UserFun::new_obj(main, globals, 0)))
|
||||
}
|
||||
|
||||
/// Gets the constant data that is interned in this compile session.
|
||||
|
||||
Reference in New Issue
Block a user