Add call stack error chain

This allows us to write out errors that follow the call stack and give
locations to where errors originated.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-01-16 15:25:58 -08:00
parent 2752bdf6d3
commit 9704e07c45
7 changed files with 90 additions and 24 deletions

View File

@@ -82,12 +82,6 @@ impl<'s> Compile<'s> {
Inst::Store(word).into()
}
Atom::Word(text) => {
// XXX : probably something better than this
// Check builtins
if text == "." {
return Inst::Print.into();
}
// Look for locally defined symbols first. One can't be found,
// then create a local variable. The local variable *should* be
// defined already, but sometimes things happen.