Python 3 interpreter in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
376 B

package ast
import "github.com/brettlangdon/gython/token"
type ListNode struct {
children []interface{}
}
func (node *ListNode) initChildren() {
node.children = make([]interface{}, 0)
}
func (node *ListNode) AppendToken(t *token.Token) {
node.children = append(node.children, t)
}
func (node *ListNode) AppendNode(n Node) {
node.children = append(node.children, n)
}