changed table types to support implementing 'let', also integrated stdlib into repl
This commit is contained in:
parent
b01415d786
commit
9c25ac21f9
5 changed files with 16 additions and 58 deletions
|
|
@ -34,7 +34,7 @@ func (t *Token) Eval(funcs FuncTable, vars VarTable) *Token {
|
|||
|
||||
switch (t_.Tag) {
|
||||
case SYMBOL:
|
||||
maybeToken := vars.GetVar(t_.Inner.(string))
|
||||
maybeToken := GetVar(t_.Inner.(string), vars)
|
||||
if maybeToken != nil {
|
||||
tok := maybeToken.Eval(funcs, vars)
|
||||
if tok.Tag == LIST {
|
||||
|
|
@ -52,7 +52,7 @@ func (t *Token) Eval(funcs FuncTable, vars VarTable) *Token {
|
|||
|
||||
ret := reduce(t)
|
||||
if ret.Tag == SYMBOL {
|
||||
f := funcs.GetFunction(ret.Inner.(string))
|
||||
f := GetFunction(ret.Inner.(string), funcs)
|
||||
if f == nil {
|
||||
if !eligibleForSystemCall {
|
||||
log.Log(log.DEBUG,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue