php-parser/node/nullable.go
2017-12-29 17:53:13 +02:00

37 lines
544 B
Go

package node
type Nullable struct {
name string
attributes map[string]interface{}
expr Node
}
func NewNullable(expression Node) Node {
return Nullable{
"Nullable",
map[string]interface{}{},
expression,
}
}
func (n Nullable) Name() string {
return "Nullable"
}
func (n Nullable) Attributes() map[string]interface{} {
return n.attributes
}
func (n Nullable) Walk(v Visitor) {
if v.EnterNode(n) == false {
return
}
if n.expr != nil {
vv := v.GetChildrenVisitor("expr")
n.expr.Walk(vv)
}
v.LeaveNode(n)
}