MCPcopy Create free account
hub / github.com/z7zmey/php-parser / Walk

Method Walk

node/expr/n_array.go:46–62  ·  view source on GitHub ↗

Walk traverses nodes Walk is invoked recursively until v.EnterNode returns true

(v walker.Visitor)

Source from the content-addressed store, hash-verified

44// Walk traverses nodes
45// Walk is invoked recursively until v.EnterNode returns true
46func (n *Array) Walk(v walker.Visitor) {
47 if v.EnterNode(n) == false {
48 return
49 }
50
51 if n.Items != nil {
52 v.EnterChildList("Items", n)
53 for _, nn := range n.Items {
54 if nn != nil {
55 nn.Walk(v)
56 }
57 }
58 v.LeaveChildList("Items", n)
59 }
60
61 v.LeaveNode(n)
62}

Callers

nothing calls this directly

Calls 5

EnterNodeMethod · 0.65
EnterChildListMethod · 0.65
WalkMethod · 0.65
LeaveChildListMethod · 0.65
LeaveNodeMethod · 0.65

Tested by

no test coverage detected