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.
 

28 lines
531 B

package ast
import "github.com/brettlangdon/gython/token"
type FileInput struct {
BaseNode
children []interface{}
}
func NewFileInput() *FileInput {
node := &FileInput{
children: make([]interface{}, 0),
}
node.initBaseNode(FILE_INPUT)
return node
}
func (node *FileInput) AppendToken(t *token.Token) {
node.children = append(node.children, t)
}
func (node *FileInput) AppendNode(n StatementNode) {
node.children = append(node.children, n)
}
func (node *FileInput) Children() []interface{} {
return node.children
}