Documentation ¶
Index ¶
- Variables
- func Debug(fn func())
- func IfSwitchExists(argsA []string, switchStrA string) bool
- func Import(mod string, table map[string]interface{})
- func SetAutoCall(t reflect.Type)
- func SetDumpCode(dumpCode string)
- func SetFindEntry(fn func(file string, libs []string) (string, error))
- func SetOnPop(fn func(v interface{}))
- func SetReadFile(fn func(file string) ([]byte, error))
- type Options
- type Qlang
- func (p *Qlang) Cl(codeText []byte, fname string) (end int, err error)
- func (p *Qlang) DumpEngine() error
- func (p *Qlang) Eval(expr string) (err error)
- func (p *Qlang) Exec(codeText []byte, fname string) (err error)
- func (p *Qlang) InjectMethods(pcls interface{}, code []byte) (err error)
- func (p *Qlang) Run() (err error)
- func (p *Qlang) SafeCl(codeText []byte, fname string) (end int, err error)
- func (p *Qlang) SafeEval(expr string) (err error)
- func (p *Qlang) SafeExec(code []byte, fname string) (err error)
- func (p *Qlang) SetLibs(libs string)
- func (p *Qlang) TXCompile(srcA string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Exports = map[string]interface{}{ "new": New, "New": New, }
Exports is the export table of this module.
View Source
var ( // InsertSemis is interpreter options that means to insert semis smartly. InsertSemis = (*Options)(interpreter.InsertSemis) )
Functions ¶
func IfSwitchExists ¶
func SetDumpCode ¶
func SetDumpCode(dumpCode string)
SetDumpCode sets dump code mode:
"1" - dump code with rem instruction. "2" - dump code without rem instruction. else - don't dump code.
func SetFindEntry ¶
SetFindEntry sets the `FindEntry` function.
func SetReadFile ¶
SetReadFile sets the `ReadFile` function.
Types ¶
type Qlang ¶
A Qlang represents the qlang compiler and executor.
func (*Qlang) DumpEngine ¶
func (*Qlang) InjectMethods ¶
InjectMethods injects some methods into a class. `pcls` can be a `*exec.Class` object or a `string` typed class name.
func (*Qlang) SafeCl ¶
SafeCl compiles a source code, without panic (will convert panic into an error).
func (*Qlang) SafeEval ¶
SafeEval compiles and executes a source code, without panic (will convert panic into an error).
func (*Qlang) SafeExec ¶
SafeExec compiles and executes a source code, without panic (will convert panic into an error).
Click to show internal directories.
Click to hide internal directories.