46 lines
670 B
Go
46 lines
670 B
Go
package expr
|
|
|
|
import (
|
|
"github.com/z7zmey/php-parser/node"
|
|
)
|
|
|
|
type Isset struct {
|
|
position *node.Position
|
|
Variables []node.Node
|
|
}
|
|
|
|
func NewIsset(Variables []node.Node) *Isset {
|
|
return &Isset{
|
|
nil,
|
|
Variables,
|
|
}
|
|
}
|
|
|
|
func (n *Isset) Attributes() map[string]interface{} {
|
|
return nil
|
|
}
|
|
|
|
func (n *Isset) Position() *node.Position {
|
|
return n.position
|
|
}
|
|
|
|
func (n *Isset) SetPosition(p *node.Position) node.Node {
|
|
n.position = p
|
|
return n
|
|
}
|
|
|
|
func (n *Isset) Walk(v node.Visitor) {
|
|
if v.EnterNode(n) == false {
|
|
return
|
|
}
|
|
|
|
if n.Variables != nil {
|
|
vv := v.GetChildrenVisitor("Variables")
|
|
for _, nn := range n.Variables {
|
|
nn.Walk(vv)
|
|
}
|
|
}
|
|
|
|
v.LeaveNode(n)
|
|
}
|