analysisutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSSA

func BuildSSA(pkg *packages.Package) (*buildssa.SSA, error)

BuildSSA See: buildssa.Analyzer.

func FLC

func FLC(position token.Position) string

func GetCommentVerb

func GetCommentVerb(c *ast.Comment, prefix string) (string, string, bool)

func GetPosition

func GetPosition(pkg *ssa.Package, pos []token.Pos) token.Position

func HasCommentPrefix

func HasCommentPrefix(c *ast.Comment, prefix string) bool

func Include

func Include(u, v ast.Node) bool

func InstrToCallCommon

func InstrToCallCommon(instr ssa.Instruction) (*ssa.CallCommon, bool)

func IsFunc

func IsFunc(common *ssa.CallCommon, pkgPath, funcName string) bool

func Unquote

func Unquote(str string) (string, error)

func ValueToCallCommon

func ValueToCallCommon(value ssa.Value) (*ssa.CallCommon, bool)

func ValueToStrings

func ValueToStrings(v ssa.Value) ([]string, bool)

func WalkCommentGroup

func WalkCommentGroup(fset *token.FileSet, files []*ast.File, fn func(node ast.Node, cg *ast.CommentGroup) bool)

Types

type FuncInfo

type FuncInfo struct {
	PkgPath  string
	RcvName  string
	FuncName string
}

func GetFuncInfo

func GetFuncInfo(common *ssa.CallCommon) (funcInfo *FuncInfo, ok bool)

func (*FuncInfo) String

func (f *FuncInfo) String() string

Jump to

Keyboard shortcuts

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