Merge pull request #7 from antham/patch-2
Various change to visitor doc
This commit is contained in:
commit
ebe06da6e0
@ -13,7 +13,7 @@ import (
|
|||||||
"github.com/z7zmey/php-parser/walker"
|
"github.com/z7zmey/php-parser/walker"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Dumper prints ast hierarchy to stdout
|
// Dumper writes ast hierarchy to an io.Writer
|
||||||
// Also prints comments and positions attached to nodes
|
// Also prints comments and positions attached to nodes
|
||||||
type Dumper struct {
|
type Dumper struct {
|
||||||
Writer io.Writer
|
Writer io.Writer
|
||||||
@ -23,7 +23,7 @@ type Dumper struct {
|
|||||||
NsResolver *NamespaceResolver
|
NsResolver *NamespaceResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnterNode is invoked at every node in heirerchy
|
// EnterNode is invoked at every node in hierarchy
|
||||||
func (d Dumper) EnterNode(w walker.Walkable) bool {
|
func (d Dumper) EnterNode(w walker.Walkable) bool {
|
||||||
n := w.(node.Node)
|
n := w.(node.Node)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user