fix variable declaration syntax

This commit is contained in:
Aidan 2020-07-08 19:33:25 -07:00
parent 19a16d8de0
commit 5a0a7e21f5
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -23,13 +23,12 @@ import (
) )
func export(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Token { func export(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Token {
input = input.Eval(funcs, vars, false)
name := input name := input
form := name.Next
if name.Tag != ast.STRING { form := name.Next.Eval(funcs, vars, false)
if name.Tag != ast.SYMBOL {
log.Log(log.ERR, log.Log(log.ERR,
"non string handed to name arg", "first arg should be a symbol",
"export") "export")
return nil return nil
} }