php-parser/node/node.go
2017-12-31 13:15:50 +02:00

25 lines
382 B
Go

package node
type Node interface {
Attributer
Positioner
Name() string
Walk(v Visitor)
}
type Attributer interface {
Attributes() map[string]interface{}
Attribute(key string) interface{}
SetAttribute(key string, value interface{})
}
type Positioner interface {
Position() *Position
SetPosition(p *Position) Node
}
type Position struct {
StartLine int
EndLine int
}