start using return stack to track evaluation location

This commit is contained in:
2021-02-14 14:27:02 -05:00
parent 199203e73f
commit 852aaa6387
5 changed files with 96 additions and 49 deletions

View File

@@ -9,11 +9,11 @@ type Dictionary map[string]Word
type Word struct {
Name string
Impl func() error
Source string
Source []string
}
// AddWord inserts a new word into the dictonary, optionally overwriting the existing word
func (d Dictionary) AddWord(name string, impl func() error, source string) {
func (d Dictionary) AddWord(name string, impl func() error, source []string) {
d[name] = Word{
Name: name,
Impl: impl,