engine

package
v0.0.0-...-3cc2fd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrintEnabled atomic.Bool

Functions

func PrintTree

func PrintTree(writer io.Writer, fset *token.FileSet, node ast.Node) error

Types

type Engine

type Engine struct {
	PrintAST bool

	ProgressFunc     func(current, total int)
	FileProgressFunc func(filename string)
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(printAST bool) *Engine

func (*Engine) IgnoreDirectives

func (e *Engine) IgnoreDirectives() map[string]map[int]map[string]map[int]bool

func (*Engine) ProjectRoot

func (e *Engine) ProjectRoot() string

func (*Engine) SetOperators

func (e *Engine) SetOperators(ops []mutator.Operator)

func (*Engine) SetProjectRoot

func (e *Engine) SetProjectRoot(root string)

func (*Engine) SetSuppressEntries

func (e *Engine) SetSuppressEntries(entries []config.SuppressEntry)

func (*Engine) Sites

func (e *Engine) Sites() []Site

func (*Engine) Traverse

func (e *Engine) Traverse(path string, visitor Visitor) error

type Site

type Site struct {
	File          *token.File
	FileAST       *ast.File
	Fset          *token.FileSet
	Line          int
	Column        int
	Node          ast.Node
	ReturnType    string
	FunctionName  string
	EnclosingFunc *ast.FuncDecl
}

type Visitor

type Visitor func(n ast.Node) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL