build

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClassKind

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

func RegisterClassFileType

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

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 interface{}) (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 interface{}) (*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