Documentation
¶
Index ¶
- Constants
- type Compiler
- func (self *Compiler) Assemble(source io.Reader) (asm []interface{}, errors []error)
- func (self *Compiler) AssemblerStage(asm ...interface{}) ([]byte, error)
- func (self *Compiler) Compile(source io.Reader) (bytecode []byte, errors []error)
- func (self *Compiler) CompileStage(instrs *frontend.IntInstr) (asm []interface{}, err error)
- func (self *Compiler) Intermediate(source io.Reader) (intCode *frontend.IntInstr, errors []error)
- func (self *Compiler) IntermediateStage(code string) (intCode *frontend.IntInstr, errors []error)
- func (self *Compiler) Optimize(intCode *frontend.IntInstr) *frontend.IntInstr
- func (self *Compiler) PreProcessorStage(str string) (string, error)
- func (self *Compiler) ReadAll(source io.Reader) (string, error)
- type CompilerBackend
Constants ¶
View Source
const (
Version = "0.6"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct { Backend CompilerBackend Debug bool Silent bool OptimizeCode bool // contains filtered or unexported fields }
func NewCompiler ¶
func NewCompiler(backend CompilerBackend) *Compiler
func (*Compiler) AssemblerStage ¶
func (*Compiler) CompileStage ¶
func (*Compiler) Intermediate ¶
func (*Compiler) IntermediateStage ¶
func (*Compiler) Optimize ¶
func (self *Compiler) Optimize(intCode *frontend.IntInstr) *frontend.IntInstr
func (*Compiler) PreProcessorStage ¶
type CompilerBackend ¶
type CompilerBackend interface {
Compile(*frontend.IntInstr) ([]interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.