exprtrace

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTree

func PrintTree(trace *EvalTraceStore, env EvalEnv, node ast.Node, options ...TreePrinterOption) (treeprint.Tree, error)

Types

type ArrayNodeTraceInfo

type ArrayNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type BinaryNodeTraceInfo

type BinaryNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type BuiltinNodeTraceInfo

type BuiltinNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type CallNodeTraceInfo

type CallNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type ConditionalNodeTraceInfo

type ConditionalNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type EvalEnv

type EvalEnv map[string]any

type EvalResult

type EvalResult struct {
	Output             any
	Trace              *EvalTraceStore
	Source             string
	Env                EvalEnv
	TreePrinterOptions []TreePrinterOption
}

func (*EvalResult) FormatTraceTree

func (e *EvalResult) FormatTraceTree(opts ...TreePrinterOption) (string, error)

func (*EvalResult) OutputAsBool

func (e *EvalResult) OutputAsBool() bool

type EvalTraceStore

type EvalTraceStore struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore() *EvalTraceStore

func (*EvalTraceStore) AddTrace

func (ts *EvalTraceStore) AddTrace(tag EvalTraceTag, payload TraceEntry)

func (*EvalTraceStore) TraceEntryByTag

func (ts *EvalTraceStore) TraceEntryByTag(tag EvalTraceTag) (TraceEntry, bool)

type EvalTraceTag

type EvalTraceTag struct {
	NodeIndex int
}

func (*EvalTraceTag) TraceStoreKey

func (t *EvalTraceTag) TraceStoreKey() TraceStoreKey

type FloatNodeTraceInfo

type FloatNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type IdentifierNodeTraceInfo

type IdentifierNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type IntegerNodeTraceInfo

type IntegerNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type MapNodeTraceInfo

type MapNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type MemberNodeTraceInfo

type MemberNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type NodeEvalResult

type NodeEvalResult interface {
	Output() any
}

type PairNodeTraceInfo

type PairNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type PointerNodeTraceInfo

type PointerNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type PredicateNodeTraceInfo added in v0.129.0

type PredicateNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type SliceNodeTraceInfo

type SliceNodeTraceInfo struct {
	// contains filtered or unexported fields
}

type TagMapper

type TagMapper struct {
	// contains filtered or unexported fields
}

func (*TagMapper) Visit

func (m *TagMapper) Visit(node *ast.Node)

type TraceEntry

type TraceEntry interface {
	EvalResultByCallCount(callCount int) NodeEvalResult
}

type TraceStoreKey

type TraceStoreKey int

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

func NewTracer

func NewTracer(trace *EvalTraceStore, store EvalEnv) *Tracer

func (*Tracer) InstallTracerFunctions

func (t *Tracer) InstallTracerFunctions(store any) any

func (*Tracer) Patches

func (t *Tracer) Patches() []expr.Option

type TreePrinter

type TreePrinter interface {
	EvalEnv() EvalEnv
	PeekNodeEvalResultOutput(node ast.Node) any
}

type TreePrinterOption

type TreePrinterOption func(*treePrinterConfig) error

func WithOnCallNodeHook

func WithOnCallNodeHook(fn func(tp TreePrinter, tree treeprint.Tree, callNode *ast.CallNode, callOutput any)) TreePrinterOption

type VariableDeclaratorNodeTraceInfo

type VariableDeclaratorNodeTraceInfo struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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