Documentation ¶
Overview ¶
Package cl compiles Go+ syntax trees (ast) into a backend code. For now the supported backends are `bytecode` and `golang`.
Package cl compiles Go+ syntax trees (ast) into a backend code. For now the supported backends are `bytecode` and `golang`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFuncArgNoReturnValue error. ErrFuncArgNoReturnValue = errors.New("function argument expression doesn't have return value") // ErrFuncArgCantBeMultiValue error. ErrFuncArgCantBeMultiValue = errors.New("function argument expression can't be multi values") )
View Source
var ( // ErrNotFound error ErrNotFound = syscall.ENOENT // ErrNotAMainPackage error ErrNotAMainPackage = errors.New("not a main package") // ErrMainFuncNotFound error ErrMainFuncNotFound = errors.New("main function not found") // ErrSymbolNotVariable error ErrSymbolNotVariable = errors.New("symbol exists but not a variable") // ErrSymbolNotFunc error ErrSymbolNotFunc = errors.New("symbol exists but not a func") // ErrSymbolNotType error ErrSymbolNotType = errors.New("symbol exists but not a type") )
View Source
var (
// CallBuiltinOp calls BuiltinOp
CallBuiltinOp func(kind exec.Kind, op exec.Operator, data ...interface{}) interface{}
)
Functions ¶
Types ¶
type CompileError ¶
CompileError represents a compiling time error.
func (*CompileError) Error ¶
func (p *CompileError) Error() string
type FuncDecl ¶
type FuncDecl struct {
// contains filtered or unexported fields
}
FuncDecl represents a function declaration.
type Package ¶
type Package struct {
// contains filtered or unexported fields
}
A Package represents a Go+ package.
func NewPackage ¶
func NewPackage(out exec.Builder, pkg *ast.Package, fset *token.FileSet, act PkgAct) (p *Package, err error)
NewPackage creates a Go+ package instance.
func NewPackageEx ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.