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

37 lines
523 B
Go

package node
type Identifier struct {
position *Position
Value string
}
func NewIdentifier(Value string) Node {
return &Identifier{
nil,
Value,
}
}
func (n Identifier) Attributes() map[string]interface{} {
return map[string]interface{}{
"Value": n.Value,
}
}
func (n Identifier) Position() *Position {
return n.position
}
func (n Identifier) SetPosition(p *Position) Node {
n.position = p
return n
}
func (n Identifier) Walk(v Visitor) {
if v.EnterNode(n) == false {
return
}
v.LeaveNode(n)
}