php-parser/walker/walker.go
2018-01-17 19:01:28 +02:00

14 lines
401 B
Go

package walker
// Walker interface
type Walker interface {
Walk(v Visitor)
}
// Visitor interface
type Visitor interface {
EnterNode(w Walker) bool // EnterNode invoked for each node encountered by Walk.
GetChildrenVisitor(Key string) Visitor // GetChildrenVisitor returns visitor for children nodes
LeaveNode(w Walker) // LeaveNode invoked after process node
}