Documentation
¶
Overview ¶
Package compiler owns the public compilation pipeline.
Index ¶
Constants ¶
View Source
const MainFunction = "main"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
Filename string
Mode string
AST *ast.Program
IR *ir.Program
Output []byte
SourceMap sourcemap.Map
CompilerOwned bool
Official bool
ExternalPackage bool
}
func CompileProject ¶
func CompileProject(sources []SourceUnit, options Options) ([]*Artifact, error)
CompileProject parses every unit before resolving or checking any body. This establishes a stable project catalog, import graph, and exported signature environment shared by all files.
type CompileError ¶
type CompileError struct {
Filename string
Diagnostics []diagnostic.Diagnostic
}
func NewCompileError ¶ added in v0.2.4
func NewCompileError(filename string, fallback diagnostic.Code, items []diagnostic.Diagnostic) *CompileError
func (*CompileError) Error ¶
func (e *CompileError) Error() string
type Options ¶
type Options struct {
Mode string
Package string
ModulePath string
GoModule string
RubyLoader string
TypeScriptRuntime string
SourceRoot string
ProjectRoot string
PackageOptions map[string][]byte
PackageAliases map[string]string
JobsConfiguration string
AllowUnusedImports bool
InteractiveModule string
NativePackages *nativepackage.Catalog
}
Click to show internal directories.
Click to hide internal directories.