php-parser/node/stmt/nop.go
2018-01-05 00:12:01 +02:00

37 lines
472 B
Go

package stmt
import (
"github.com/z7zmey/php-parser/node"
)
type Nop struct {
position *node.Position
}
func NewNop() node.Node {
return &Nop{
nil,
}
}
func (n Nop) Attributes() map[string]interface{} {
return nil
}
func (n Nop) Position() *node.Position {
return n.position
}
func (n Nop) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n Nop) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}
v.LeaveNode(n)
}