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

33 lines
436 B
Go

package expr
import (
"github.com/z7zmey/php-parser/node"
)
func (n Variable) Name() string {
return "Variable"
}
type Variable struct {
name string
varName node.Node
}
func NewVariable(varName node.Node) node.Node {
return Variable{
"Variable",
varName,
}
}
func (n Variable) Walk(v node.Visitor) {
if v.Visit(n) == false {
return
}
if n.varName != nil {
vv := v.Children("varName")
n.varName.Walk(vv)
}
}