front

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindIdent

func BindIdent(bindings BindingsT, ident *ast.Ident, typeInfo *types.Info) *VariableT

func ConvertFuncDecl added in v0.1.3

func ConvertFuncDecl(decl *ast.FuncDecl, env *envT) *CallNodeT

func CpsFunc added in v0.1.3

func CpsFunc(name string, funcType *ast.FuncType, body *ast.BlockStmt, typ types.Type, env *envT) *CallNodeT

func MakeEnv added in v0.1.3

func MakeEnv(typeInfo *types.Info, pkgBindings PackageBindingsT) *envT

func SimplifyTopLevel

func SimplifyTopLevel(lambda *CallNodeT)

Types

type BindingsT

type BindingsT map[types.Object]*VariableT

type FrontEndT added in v0.1.3

type FrontEndT struct {
	Packages        []*PackageT // each pkg appears before all its imports
	BuiltinPackages []*PackageT
	FileSet         *token.FileSet
	TypesInfo       *types.Info
	// contains filtered or unexported fields
}

func MakeFrontEnd added in v0.1.3

func MakeFrontEnd(builtinPackages []string, buildTags []string) *FrontEndT

func (*FrontEndT) FindPackage added in v0.1.3

func (frontEnd *FrontEndT) FindPackage(packagePath string, sourceDir string) *PackageT

func (*FrontEndT) Import added in v0.1.3

func (frontEnd *FrontEndT) Import(path string) (*types.Package, error)

They're supposed to call 'ImportFrom' instead.

func (*FrontEndT) ImportFrom added in v0.1.3

func (frontEnd *FrontEndT) ImportFrom(path string,
	importDir string,
	mode types.ImportMode) (*types.Package, error)

Returns the package for 'path' imported by a file in 'dir'. 'mode' is reserved for future use.

func (*FrontEndT) LoadPackage added in v0.1.3

func (frontEnd *FrontEndT) LoadPackage(sourceDir string)

func (*FrontEndT) ParseAndTypeCheck added in v0.1.3

func (frontEnd *FrontEndT) ParseAndTypeCheck()

func (*FrontEndT) ParseFile added in v0.1.3

func (frontEnd *FrontEndT) ParseFile(filename string, contents []byte) *ast.File

type LhsT

type LhsT interface {
	// contains filtered or unexported methods
}

type PackageBindingsT added in v0.1.3

type PackageBindingsT interface {
	LookupVar(obj types.Object) *VariableT
}

type PackageT added in v0.1.3

type PackageT struct {
	PackagePath  string
	BuildPackage *build.Package
	AstFiles     []*ast.File
	TypesPackage *types.Package
	TypesChecker *types.Checker // in case someone wants to add more code
}

type PointerLhsT

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

An LHS where the location is a single variable, which so far is all of them.

Jump to

Keyboard shortcuts

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