v.ast.walker #
fn inspect #
fn inspect(node &ast.Node, data voidptr, inspector_callback InspectorFn)
inspect traverses and checks the AST node on a depth-first order and based on the data given
fn walk #
fn walk(mut visitor Visitor, node &ast.Node)
walk traverses the AST using the given visitor
interface Visitor #
interface Visitor {
mut:
visit(node &ast.Node) !
}
Visitor defines a visit method which is invoked by the walker in each node it encounters.
fn (Inspector) visit #
fn (i &Inspector) visit(node &ast.Node) !
type InspectorFn #
type InspectorFn = fn (node &ast.Node, data voidptr) bool