fix bug in repeated function calls
This commit is contained in:
parent
93cd5c5a48
commit
81d299aa5e
3 changed files with 20 additions and 11 deletions
12
ast/token.go
12
ast/token.go
|
|
@ -48,6 +48,18 @@ func (t *Token) Append(arg *Token) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Shallow Copy
|
||||
* in case of a LIST,
|
||||
* inner will point to the same list.
|
||||
*/
|
||||
func (t *Token) Copy() *Token {
|
||||
return &Token{
|
||||
Tag: t.Tag,
|
||||
inner: t.inner,
|
||||
Next: t.Next,
|
||||
}
|
||||
}
|
||||
|
||||
/* Print function which is better suited for repl.
|
||||
* This one prints the SEXPRs as one would write them.
|
||||
* Does not evaluate tokens.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue