package buildir

import "honnef.co/go/tools/internal/passes/buildir"

Package buildir defines an Analyzer that constructs the IR of an error-free package and returns the set of all functions within it. It does not report any diagnostics itself but may be used as an input to other analyzers.

THIS INTERFACE IS EXPERIMENTAL AND MAY BE SUBJECT TO INCOMPATIBLE CHANGE.

Index

Variables

var Analyzer = &analysis.Analyzer{
	Name:       "buildir",
	Doc:        "build IR for later passes",
	Run:        run,
	ResultType: reflect.TypeOf(new(IR)),
	FactTypes:  []analysis.Fact{new(noReturn)},
}

Types

type IR

type IR struct {
	Pkg      *ir.Package
	SrcFuncs []*ir.Function
}

IR provides intermediate representation for all the non-blank source functions in the current package.

Source Files

buildir.go

Version
v0.2.0-0.dev
Published
Dec 14, 2020
Platform
js/wasm
Imports
5 packages
Last checked
20 minutes ago

Tools for package owners.