clean up segfaults on bad variable decls
This commit is contained in:
parent
530dbe7e21
commit
bc8ed07125
1 changed files with 6 additions and 0 deletions
|
|
@ -34,6 +34,12 @@ func Export(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Token
|
|||
name := input
|
||||
|
||||
form := name.Next.Eval(funcs, vars, false)
|
||||
|
||||
// error in eval process
|
||||
if form == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if name.Tag != ast.SYMBOL {
|
||||
log.Log(log.ERR,
|
||||
"first arg should be a symbol",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue