php-parser/node/stmt/stmt_list.go
2017-12-28 01:23:32 +02:00

35 lines
457 B
Go

package stmt
import (
"github.com/z7zmey/php-parser/node"
)
func (n StmtList) Name() string {
return "StmtList"
}
type StmtList struct {
name string
stmts []node.Node
}
func NewStmtList(stmts []node.Node) node.Node {
return StmtList{
"StmtList",
stmts,
}
}
func (n StmtList) Walk(v node.Visitor) {
if v.Visit(n) == false {
return
}
if n.stmts != nil {
vv := v.Children("stmts")
for _, nn := range n.stmts {
nn.Walk(vv)
}
}
}