php-parser/walker/walker.go

14 lines
401 B
Go
Raw Normal View History

2018-01-17 16:58:45 +00:00
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
}