Documentation ¶
Index ¶
- Variables
- type Compiler
- func (p *Compiler) CallFn(fn interface{})
- func (p *Compiler) Cl(codeText []byte, fname string) int
- func (p *Compiler) Code() *exec.Code
- func (p *Compiler) Compile(fname string) int
- func (p *Compiler) Done()
- func (p *Compiler) Fntable() map[string]interface{}
- func (p *Compiler) Grammar() string
- func (p *Compiler) SetLibs(libs string)
- func (p *Compiler) Stack() interpreter.Stack
- func (p *Compiler) Vars() map[string]interface{}
- type Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FindEntry specifies the policy how qlang searches library file. FindEntry = findEntry // ReadFile specifies the policy how qlang reads source file. ReadFile = ioutil.ReadFile )
View Source
var DumpCode int
DumpCode is mode how to dump code. 1 means to dump code with `rem` instruction; 2 means to dump clean code; 0 means don't dump code.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
A Compiler represents a qlang compiler.
func (*Compiler) CallFn ¶
func (p *Compiler) CallFn(fn interface{})
CallFn generates a function call instruction. It is required by tpl.Interpreter engine.
func (*Compiler) Fntable ¶
Fntable returns the qlang compiler's function table. It is required by tpl.Interpreter engine.
func (*Compiler) Grammar ¶
Grammar returns the qlang compiler's grammar. It is required by tpl.Interpreter engine.
func (*Compiler) SetLibs ¶
SetLibs sets searching paths when qlang searchs a library (ie. import a module).
Source Files ¶
Click to show internal directories.
Click to hide internal directories.