update stdlib append after testing
This commit is contained in:
parent
9c25ac21f9
commit
fe5afcb345
3 changed files with 6 additions and 6 deletions
|
|
@ -38,7 +38,8 @@ func (t *Token) String() string {
|
|||
for i := t.Inner.(*Token); i != nil; i = i.Next {
|
||||
repr = repr + i.String() + " "
|
||||
}
|
||||
return repr + ")"
|
||||
// remove trailing space
|
||||
return repr[:len(repr)-1] + ")"
|
||||
|
||||
case SYMBOL:
|
||||
return "<" + t.Inner.(string) + ">"
|
||||
|
|
|
|||
|
|
@ -45,9 +45,8 @@ func l_append(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Tok
|
|||
src := input
|
||||
|
||||
if input.Tag != ast.LIST {
|
||||
// TODO: Position, if I can figure out what to do with it
|
||||
src = &ast.Token{Tag: ast.LIST, Inner: input}
|
||||
return src
|
||||
// TODO: position??
|
||||
return input
|
||||
}
|
||||
|
||||
// deref inner first
|
||||
|
|
@ -63,5 +62,5 @@ func l_append(input *ast.Token, vars ast.VarTable, funcs ast.FuncTable) *ast.Tok
|
|||
}
|
||||
(*iter).Next = input.Next
|
||||
|
||||
return src
|
||||
return *iter
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue