php-parser/node/node.go

24 lines
372 B
Go
Raw Normal View History

2017-12-03 18:49:18 +00:00
package node
2017-12-31 10:59:22 +00:00
type Node interface {
Attributer
Positioner
Walk(v Visitor)
}
2017-12-31 09:57:55 +00:00
type Attributer interface {
Attributes() map[string]interface{}
Attribute(key string) interface{}
2018-01-02 12:11:08 +00:00
SetAttribute(key string, value interface{}) Node
2017-12-31 09:57:55 +00:00
}
2017-12-31 10:59:22 +00:00
type Positioner interface {
Position() *Position
SetPosition(p *Position) Node
}
type Position struct {
StartLine int
EndLine int
2017-12-03 18:49:18 +00:00
}