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

38 lines
514 B
Go

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