php-parser/node/stmt/echo.go
2017-12-29 17:20:24 +02:00

41 lines
527 B
Go

package stmt
import (
"github.com/z7zmey/php-parser/node"
)
type Echo struct {
name string
exprs []node.Node
}
func NewEcho(exprs []node.Node) node.Node {
return Echo{
"Echo",
exprs,
}
}
func (n Echo) Name() string {
return "Echo"
}
func (n Echo) Attributes() map[string]interface{} {
return nil
}
func (n Echo) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}
if n.exprs != nil {
vv := v.GetChildrenVisitor("exprs")
for _, nn := range n.exprs {
nn.Walk(vv)
}
}
v.LeaveNode(n)
}