model

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	Name       string           // Name of the function
	Node       ast.Node         // AST node of the function
	Type       *ast.FuncType    // Type of the function
	Body       *ast.BlockStmt   // Body of the function
	Block      *cfg.Block       // Control flow graph of the function
	Pos        token.Position   // Position of the function declaration
	IsWrapping bool             // Is true if this function returns wrapped errors
	CalledBy   Stack[*Function] // Functions that call this function
	Pkg        string           // Package containing the function
	Info       *Info            // Info used to load the function
}

type Info

type Info struct {
	Fset  *token.FileSet
	Types *types.Info
	Files []*ast.File
}

func NewInfo

func NewInfo(analysisPass *analysis.Pass) *Info

func (*Info) FormatNode

func (pass *Info) FormatNode(node any) string

FormatNode returns string representation of a node as code.

type Stack

type Stack[T comparable] []T

func (*Stack[T]) AddUnique

func (s *Stack[T]) AddUnique(v ...T) *Stack[T]

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() *T

func (*Stack[T]) Push

func (s *Stack[T]) Push(v ...T) *Stack[T]

Jump to

Keyboard shortcuts

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