php-parser/node/expr/variable.go
2018-01-09 15:51:32 +02:00

33 lines
455 B
Go

package expr
import (
"github.com/z7zmey/php-parser/node"
)
type Variable struct {
VarName node.Node
}
func NewVariable(VarName node.Node) *Variable {
return &Variable{
VarName,
}
}
func (n *Variable) Attributes() map[string]interface{} {
return nil
}
func (n *Variable) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}
if n.VarName != nil {
vv := v.GetChildrenVisitor("VarName")
n.VarName.Walk(vv)
}
v.LeaveNode(n)
}