build

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 13 Imported by: ? 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 ClassInfo added in v1.7.6

func ClassInfo(fname string) (autoLambdas map[string]int, isProj, ok bool)

ClassInfo checks a fname is a known classfile or not. If it is, it returns the auto-lambda map, whether it is a project file, and true. See https://github.com/goplus/xgo/issues/2828 to learn about auto lambda.

func ClassKind deprecated

func ClassKind(fname string) (isProj, ok bool)

ClassKind checks a fname is a known classfile or not. If it is, then it checks the fname is a project file or not.

Deprecated: use ClassInfo instead.

func RegisterClassFileType

func RegisterClassFileType(ext string, class string, works []*Class, pkgPaths ...string) *cl.Project

Types

type Class

type Class = cl.Class

type Context

type Context struct {
	LoadConfig func(*cl.Config)
	// contains filtered or unexported fields
}

func Default

func Default() *Context

func NewContext

func NewContext(impl types.Importer, fset *token.FileSet) *Context

func (*Context) BuildDir

func (ctx *Context) BuildDir(dir string) (data []byte, err error)

func (*Context) BuildFSDir

func (ctx *Context) BuildFSDir(fs parser.FileSystem, dir string) (data []byte, err error)

func (*Context) BuildFile

func (ctx *Context) BuildFile(filename string, src any) (data []byte, err error)

func (*Context) Import

func (c *Context) Import(path string) (*types.Package, error)

func (*Context) ParseDir

func (c *Context) ParseDir(dir string) (*Package, error)

func (*Context) ParseFSDir

func (c *Context) ParseFSDir(fs parser.FileSystem, dir string) (*Package, error)

func (*Context) ParseFile

func (c *Context) ParseFile(file string, src any) (*Package, error)

type Package

type Package struct {
	Fset *token.FileSet
	Pkg  *gogen.Package
}

func (*Package) ToAst

func (p *Package) ToAst() *goast.File

func (*Package) ToSource

func (p *Package) ToSource() ([]byte, error)

Jump to

Keyboard shortcuts

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