MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Inspect

Function Inspect

pkg/sql/ast/visitor.go:310–312  ·  view source on GitHub ↗

Inspect traverses an AST in depth-first order using a simple function. Inspect is a convenience wrapper around Walk that allows AST traversal using a simple function instead of implementing the full Visitor interface. It's ideal for one-off traversals and simple node inspection tasks. Traversal Be

(node Node, f func(Node) bool)

Source from the content-addressed store, hash-verified

308//
309// See also: Walk(), Inspector, Visitor
310func Inspect(node Node, f func(Node) bool) {
311 _ = Walk(Inspector(f), node)
312}
313
314// VisitFunc is a function type that can be used to implement custom visitors
315// without creating a new type.

Callers 1

TestInspectorFunction · 0.85

Calls 2

WalkFunction · 0.85
InspectorFuncType · 0.85

Tested by 1

TestInspectorFunction · 0.68