fix typo, update tag to string function
This commit is contained in:
parent
53adeacc6d
commit
c253dc6375
2 changed files with 3 additions and 1 deletions
|
|
@ -152,6 +152,8 @@ func GetTagAsStr(tag Token_t) string {
|
||||||
return "LIST"
|
return "LIST"
|
||||||
case STRING:
|
case STRING:
|
||||||
return "STRING"
|
return "STRING"
|
||||||
|
case BOOL:
|
||||||
|
return "BOOL"
|
||||||
case NUMBER:
|
case NUMBER:
|
||||||
return "NUMBER"
|
return "NUMBER"
|
||||||
case SYMBOL:
|
case SYMBOL:
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ func shs_while(in *ast.Token, vt ast.VarTable, ft ast.FuncTable) *ast.Token {
|
||||||
var res *ast.Token
|
var res *ast.Token
|
||||||
|
|
||||||
eval := cond.Eval(ft, vt, false)
|
eval := cond.Eval(ft, vt, false)
|
||||||
if cond == nil || cond.Tag != ast.BOOL {
|
if eval == nil || eval.Tag != ast.BOOL {
|
||||||
log.Log(log.ERR,
|
log.Log(log.ERR,
|
||||||
"first argument to while must be a bool statement",
|
"first argument to while must be a bool statement",
|
||||||
"while")
|
"while")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue