v.markused #

fn mark_used #

fn mark_used(mut the_table table.Table, pref &pref.Preferences, ast_files []ast.File)

mark_used walks the AST, starting at main() and marks all used fns transitively

struct Walker #

struct Walker {
pub mut:
	table       &table.Table
	used_fns    map[string]bool
	used_consts map[string]bool
	n_maps      int
	n_asserts   int
	files      []ast.File
	all_fns    map[string]ast.FnDecl
	all_consts map[string]ast.ConstField

fn (Walker) mark_fn_as_used #

fn (mut w Walker) mark_fn_as_used(fkey string)

fn (Walker) mark_const_as_used #

fn (mut w Walker) mark_const_as_used(ckey string)

fn (Walker) mark_root_fns #

fn (mut w Walker) mark_root_fns(all_fn_root_names []string)

fn (Walker) stmt #

fn (mut w Walker) stmt(node ast.Stmt)

fn (Walker) fn_decl #

fn (mut w Walker) fn_decl(mut node ast.FnDecl)

fn (Walker) call_expr #

fn (mut w Walker) call_expr(mut node ast.CallExpr)

fn (Walker) fn_by_name #

fn (mut w Walker) fn_by_name(fn_name string)

fn (Walker) struct_fields #

fn (mut w Walker) struct_fields(sfields []ast.StructField)

fn (Walker) const_fields #

fn (mut w Walker) const_fields(cfields []ast.ConstField)

fn (Walker) or_block #

fn (mut w Walker) or_block(node ast.OrExpr)