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"
|
||||
case STRING:
|
||||
return "STRING"
|
||||
case BOOL:
|
||||
return "BOOL"
|
||||
case NUMBER:
|
||||
return "NUMBER"
|
||||
case SYMBOL:
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ func shs_while(in *ast.Token, vt ast.VarTable, ft ast.FuncTable) *ast.Token {
|
|||
var res *ast.Token
|
||||
|
||||
eval := cond.Eval(ft, vt, false)
|
||||
if cond == nil || cond.Tag != ast.BOOL {
|
||||
if eval == nil || eval.Tag != ast.BOOL {
|
||||
log.Log(log.ERR,
|
||||
"first argument to while must be a bool statement",
|
||||
"while")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue