Documentation
¶
Index ¶
- func Equal(a, b Value) bool
- func FloatArg(name string, n int, args []Value) float64
- func FormatTraceback(entries []TracebackEntry) string
- func IntArg(name string, n int, args []Value) int64
- func IsTruthy(v Value) bool
- func NumArg(name string, n int, args []Value) (int64, float64, bool, bool)
- func OptInt(name string, n int, args []Value, dflt int64) int64
- func OptString(name string, n int, args []Value, dflt string) string
- func PatternGSub(s, pat string, repl Value, maxN int, ...) (string, int)
- func PatternHasSpecials(pat string) bool
- func PromoteToGlobal(v *VM, name string)
- func RegisterPreload(v *VM, name string, loader func(*VM, []Value) []Value)
- func StringArg(name string, n int, args []Value) string
- func ToFloat(v Value) (float64, bool)
- func ToInteger(v Value) (int64, bool)
- func ToNumber(v Value) (intVal int64, floatVal float64, isInt bool, ok bool)
- func ToString(v Value) string
- func ToStringMM(v *VM, val Value) string
- func TypeName(v Value) string
- type CallFrame
- type Closure
- type Coroutine
- type GMatchIter
- type GoFunc
- type LuaError
- type RuntimeError
- type Table
- type Thread
- type TracebackEntry
- type Upvalue
- type VM
- func (v *VM) AddScriptDir(dir string)
- func (v *VM) CallFrames() []*CallFrame
- func (v *VM) CallValue(fn Value, args []Value, nresults int) []Value
- func (v *VM) EqualMM(a, b Value) bool
- func (v *VM) Run(main *bytecode.InstructionSet) (err error)
- func (v *VM) RunMainChunkWithResults(main *bytecode.InstructionSet) (results []Value, err error)
- func (v *VM) SafeCall(fn Value, args []Value) (rs []Value, errVal Value, failed bool)
- func (v *VM) SafeCallTrace(fn Value, args []Value) (rs []Value, errVal Value, stack []TracebackEntry, failed bool)
- func (v *VM) SetGlobal(name string, val Value)
- func (v *VM) Traceback(skip int) []TracebackEntry
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatTraceback ¶
func FormatTraceback(entries []TracebackEntry) string
func PatternGSub ¶
func PatternHasSpecials ¶
func PromoteToGlobal ¶
func ToStringMM ¶
Types ¶
type Closure ¶
type Closure struct {
Proto *bytecode.InstructionSet
Upvalues []*Upvalue
}
type GMatchIter ¶
type GMatchIter struct {
// contains filtered or unexported fields
}
func NewGMatchIter ¶
func NewGMatchIter(s, pat string, init int) *GMatchIter
func (*GMatchIter) Next ¶
func (g *GMatchIter) Next() []Value
type RuntimeError ¶
type RuntimeError struct {
Value Value
Msg string
Stack []TracebackEntry
}
func (*RuntimeError) Error ¶
func (e *RuntimeError) Error() string
func (*RuntimeError) Message ¶
func (e *RuntimeError) Message() string
func (*RuntimeError) Traceback ¶
func (e *RuntimeError) Traceback() string
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func TableOrStringArg ¶
func (*Table) EntryCount ¶
func (*Table) SetMetatable ¶
type TracebackEntry ¶
func (TracebackEntry) String ¶
func (e TracebackEntry) String() string
type VM ¶
func (*VM) AddScriptDir ¶
func (*VM) CallFrames ¶
func (*VM) RunMainChunkWithResults ¶
func (v *VM) RunMainChunkWithResults(main *bytecode.InstructionSet) (results []Value, err error)
func (*VM) SafeCallTrace ¶
func (*VM) Traceback ¶
func (v *VM) Traceback(skip int) []TracebackEntry
Source Files
¶
- arith.go
- boolean.go
- call.go
- calldepth.go
- closure.go
- coroutine.go
- dispatch.go
- float.go
- frame.go
- integer.go
- loader.go
- loops.go
- metatable.go
- patterns.go
- preload.go
- stdlib.go
- stdlib_args.go
- stdlib_io.go
- stdlib_math.go
- stdlib_modules.go
- stdlib_string.go
- stdlib_table.go
- string.go
- strpack.go
- table.go
- tbc.go
- traceback.go
- upvalue.go
- value.go
- vm.go
Click to show internal directories.
Click to hide internal directories.