php-parser/node/stmt/trait_use_precedence.go
2017-12-28 13:36:27 +02:00

42 lines
670 B
Go

package stmt
import (
"github.com/z7zmey/php-parser/node"
)
func (n TraitUsePrecedence) Name() string {
return "TraitUsePrecedence"
}
type TraitUsePrecedence struct {
name string
ref node.Node
insteadof node.Node
}
func NewTraitUsePrecedence(ref node.Node, insteadof node.Node) node.Node {
return TraitUsePrecedence{
"TraitUsePrecedence",
ref,
insteadof,
}
}
func (n TraitUsePrecedence) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}
if n.ref != nil {
vv := v.GetChildrenVisitor("ref")
n.ref.Walk(vv)
}
if n.insteadof != nil {
vv := v.GetChildrenVisitor("insteadof")
n.insteadof.Walk(vv)
}
v.LeaveNode(n)
}