filecompiler

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCompiler

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

FileCompiler is an AST file compiler.

Turns AST declaration into a single file.

func NewFileCompiler

func NewFileCompiler(pkgName string) *FileCompiler

NewFileCompiler returns a new file compiler.

func (*FileCompiler) AddDecl

func (fc *FileCompiler) AddDecl(decl models.Decl)

AddDecl adds a declaration.

func (*FileCompiler) AddImport

func (fc *FileCompiler) AddImport(path string, alias string)

AddImport adds an import.

func (*FileCompiler) Compile

func (fc *FileCompiler) Compile() *ast.File

Compile compiles a file.

Jump to

Keyboard shortcuts

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