Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func New ¶
func New( parser Parser, desugarer Desugarer, analyzer Analyzer, irgen IRGenerator, backend Backend, ) Compiler
New creates new Compiler instance. You can omit irgen and backend if all you need is Analyze method.
type Error ¶
Error represents end-user error that preserves not only message but also location in sourcecode where error occurred. It must be properly used by all compiler's dependencies so user face human-readable error.
func (Error) Merge ¶
Merge merges e (parent) Error with the child Error, every data child has is preferred to the parent's. Parent provides broad location while child provide more accurate. Ideally there's no need to wrap errors the old fashioned way by imitating stack-trace. Location should provide that.
type IRGenerator ¶
type RawModule ¶
type RawModule struct { Manifest src.ModuleManifest // Manifest must be parsed by builder before passing into compiler Packages map[string]RawPackage // Packages themselves on the other hand can be parsed by compiler }
type RawPackage ¶
Directories ¶
Path | Synopsis |
---|---|
Package analyzer implements source code static semantic analysis.
|
Package analyzer implements source code static semantic analysis. |
backend
|
|
Package irgen implements IR generation from source code.
|
Package irgen implements IR generation from source code. |
Package parser implements source code parsing.
|
Package parser implements source code parsing. |
Click to show internal directories.
Click to hide internal directories.