Versions in this module Expand all Collapse all v1 v1.0.2 Jul 3, 2022 Changes in this version + const FramesPerSegment + var LuaDirSep string + var LuaExecDir = "!" + var LuaIgMark = "-" + var LuaPathMark = "?" + var LuaPathSep = ";" + var RegistryGrowStep = 32 type LState + func (ls *LState) IsClosed() bool + func (ls *LState) RemoveCallerFrame() *callFrame type Options + MinimizeStackMemory bool + RegistryGrowStep int + RegistryMaxSize int v1.0.1 Mar 28, 2022 v1.0.0 May 1, 2021 Changes in this version + const BaseLibName + const ChannelLibName + const CoroutineLibName + const DebugLibName + const EnvironIndex + const GlobalsIndex + const IoLibName + const LNumberBit + const LNumberScanFormat + const LoadLibName + const LuaVersion + const MathLibName + const MultRet + const OP_ADD + const OP_CALL + const OP_CLOSE + const OP_CLOSURE + const OP_CONCAT + const OP_DIV + const OP_EQ + const OP_FORLOOP + const OP_FORPREP + const OP_GETGLOBAL + const OP_GETTABLE + const OP_GETTABLEKS + const OP_GETUPVAL + const OP_JMP + const OP_LE + const OP_LEN + const OP_LOADBOOL + const OP_LOADK + const OP_LOADNIL + const OP_LT + const OP_MOD + const OP_MOVE + const OP_MOVEN + const OP_MUL + const OP_NEWTABLE + const OP_NOP + const OP_NOT + const OP_POW + const OP_RETURN + const OP_SELF + const OP_SETGLOBAL + const OP_SETLIST + const OP_SETTABLE + const OP_SETTABLEKS + const OP_SETUPVAL + const OP_SUB + const OP_TAILCALL + const OP_TEST + const OP_TESTSET + const OP_TFORLOOP + const OP_UNM + const OP_VARARG + const OsLibName + const PackageAuthors + const PackageCopyRight + const PackageName + const PackageVersion + const RegistryIndex + const StringLibName + const TabLibName + const VarArgHasArg + const VarArgIsVarArg + const VarArgNeedsArg + var CallStackSize = 256 + var CompatVarArg = true + var FieldsPerFlush = 50 + var LFalse = LBool(false) + var LNil = LValue(&LNilType{}) + var LTrue = LBool(true) + var LuaLDir string + var LuaOS string + var LuaPath = "LUA_PATH" + var LuaPathDefault string + var MaxArrayIndex = 67108864 + var MaxTableGetLoop = 100 + var RegistrySize = 256 * 20 + func LVAsBool(v LValue) bool + func LVAsString(v LValue) string + func LVCanConvToString(v LValue) bool + func LVIsFalse(v LValue) bool + func OpenBase(L *LState) int + func OpenChannel(L *LState) int + func OpenCoroutine(L *LState) int + func OpenDebug(L *LState) int + func OpenIo(L *LState) int + func OpenMath(L *LState) int + func OpenOs(L *LState) int + func OpenPackage(L *LState) int + func OpenString(L *LState) int + func OpenTable(L *LState) int + func UpvalueIndex(i int) int + type ApiError struct + Cause error + Object LValue + StackTrace string + Type ApiErrorType + func (e *ApiError) Error() string + type ApiErrorType int + const ApiErrorError + const ApiErrorFile + const ApiErrorPanic + const ApiErrorRun + const ApiErrorSyntax + type CompileError struct + Line int + Message string + func (e *CompileError) Error() string + type DbgCall struct + Name string + Pc int + type DbgLocalInfo struct + EndPc int + Name string + StartPc int + type Debug struct + CurrentLine int + LastLineDefined int + LineDefined int + NUpvalues int + Name string + Source string + What string + type FunctionProto struct + Code []uint32 + Constants []LValue + DbgCalls []DbgCall + DbgLocals []*DbgLocalInfo + DbgSourcePositions []int + DbgUpvalues []string + FunctionPrototypes []*FunctionProto + IsVarArg uint8 + LastLineDefined int + LineDefined int + NumParameters uint8 + NumUpvalues uint8 + NumUsedRegisters uint8 + SourceName string + func Compile(chunk []ast.Stmt, name string) (proto *FunctionProto, err error) + func (fp *FunctionProto) String() string + type Global struct + CurrentThread *LState + Global *LTable + MainThread *LState + Registry *LTable + type LBool bool + func (bl LBool) String() string + func (bl LBool) Type() LValueType + type LChannel chan LValue + func (ch LChannel) String() string + func (ch LChannel) Type() LValueType + type LFunction struct + Env *LTable + GFunction LGFunction + IsG bool + Proto *FunctionProto + Upvalues []*Upvalue + func (fn *LFunction) LocalName(regno, pc int) (string, bool) + func (fn *LFunction) String() string + func (fn *LFunction) Type() LValueType + type LGFunction func(*LState) int + type LNilType struct + func (nl *LNilType) String() string + func (nl *LNilType) Type() LValueType + type LNumber float64 + func LVAsNumber(v LValue) LNumber + func (nm LNumber) Format(f fmt.State, c rune) + func (nm LNumber) String() string + func (nm LNumber) Type() LValueType + type LState struct + Dead bool + Env *LTable + G *Global + Options Options + Panic func(*LState) + Parent *LState + func NewState(opts ...Options) *LState + func (ls *LState) ArgError(n int, message string) + func (ls *LState) Call(nargs, nret int) + func (ls *LState) CallByParam(cp P, args ...LValue) error + func (ls *LState) CallMeta(obj LValue, event string) LValue + func (ls *LState) CheckAny(n int) LValue + func (ls *LState) CheckBool(n int) bool + func (ls *LState) CheckChannel(n int) chan LValue + func (ls *LState) CheckFunction(n int) *LFunction + func (ls *LState) CheckInt(n int) int + func (ls *LState) CheckInt64(n int) int64 + func (ls *LState) CheckNumber(n int) LNumber + func (ls *LState) CheckOption(n int, options []string) int + func (ls *LState) CheckString(n int) string + func (ls *LState) CheckTable(n int) *LTable + func (ls *LState) CheckThread(n int) *LState + func (ls *LState) CheckType(n int, typ LValueType) + func (ls *LState) CheckTypes(n int, typs ...LValueType) + func (ls *LState) CheckUserData(n int) *LUserData + func (ls *LState) Close() + func (ls *LState) Concat(values ...LValue) string + func (ls *LState) Context() context.Context + func (ls *LState) CreateTable(acap, hcap int) *LTable + func (ls *LState) DoFile(path string) error + func (ls *LState) DoString(source string) error + func (ls *LState) Equal(lhs, rhs LValue) bool + func (ls *LState) Error(lv LValue, level int) + func (ls *LState) FindTable(obj *LTable, n string, size int) LValue + func (ls *LState) ForEach(tb *LTable, cb func(LValue, LValue)) + func (ls *LState) GPCall(fn LGFunction, data LValue) error + func (ls *LState) Get(idx int) LValue + func (ls *LState) GetFEnv(obj LValue) LValue + func (ls *LState) GetField(obj LValue, skey string) LValue + func (ls *LState) GetGlobal(name string) LValue + func (ls *LState) GetInfo(what string, dbg *Debug, fn LValue) (LValue, error) + func (ls *LState) GetLocal(dbg *Debug, no int) (string, LValue) + func (ls *LState) GetMetaField(obj LValue, event string) LValue + func (ls *LState) GetMetatable(obj LValue) LValue + func (ls *LState) GetStack(level int) (*Debug, bool) + func (ls *LState) GetTable(obj LValue, key LValue) LValue + func (ls *LState) GetTop() int + func (ls *LState) GetTypeMetatable(typ string) LValue + func (ls *LState) GetUpvalue(fn *LFunction, no int) (string, LValue) + func (ls *LState) Insert(value LValue, index int) + func (ls *LState) LessThan(lhs, rhs LValue) bool + func (ls *LState) Load(reader io.Reader, name string) (*LFunction, error) + func (ls *LState) LoadFile(path string) (*LFunction, error) + func (ls *LState) LoadString(source string) (*LFunction, error) + func (ls *LState) NewClosure(fn LGFunction, upvalues ...LValue) *LFunction + func (ls *LState) NewFunction(fn LGFunction) *LFunction + func (ls *LState) NewFunctionFromProto(proto *FunctionProto) *LFunction + func (ls *LState) NewTable() *LTable + func (ls *LState) NewThread() (*LState, context.CancelFunc) + func (ls *LState) NewTypeMetatable(typ string) *LTable + func (ls *LState) NewUserData() *LUserData + func (ls *LState) Next(tb *LTable, key LValue) (LValue, LValue) + func (ls *LState) ObjLen(v1 LValue) int + func (ls *LState) OpenLibs() + func (ls *LState) OptBool(n int, d bool) bool + func (ls *LState) OptChannel(n int, ch chan LValue) chan LValue + func (ls *LState) OptFunction(n int, d *LFunction) *LFunction + func (ls *LState) OptInt(n int, d int) int + func (ls *LState) OptInt64(n int, d int64) int64 + func (ls *LState) OptNumber(n int, d LNumber) LNumber + func (ls *LState) OptString(n int, d string) string + func (ls *LState) OptTable(n int, d *LTable) *LTable + func (ls *LState) OptUserData(n int, d *LUserData) *LUserData + func (ls *LState) PCall(nargs, nret int, errfunc *LFunction) (err error) + func (ls *LState) Pop(n int) + func (ls *LState) PreloadModule(name string, loader LGFunction) + func (ls *LState) Push(value LValue) + func (ls *LState) RaiseError(format string, args ...interface{}) + func (ls *LState) RawEqual(lhs, rhs LValue) bool + func (ls *LState) RawGet(tb *LTable, key LValue) LValue + func (ls *LState) RawGetInt(tb *LTable, key int) LValue + func (ls *LState) RawSet(tb *LTable, key LValue, value LValue) + func (ls *LState) RawSetInt(tb *LTable, key int, value LValue) + func (ls *LState) Register(name string, fn LGFunction) + func (ls *LState) RegisterModule(name string, funcs map[string]LGFunction) LValue + func (ls *LState) Remove(index int) + func (ls *LState) RemoveContext() context.Context + func (ls *LState) Replace(idx int, value LValue) + func (ls *LState) Resume(th *LState, fn *LFunction, args ...LValue) (ResumeState, error, []LValue) + func (ls *LState) SetContext(ctx context.Context) + func (ls *LState) SetFEnv(obj LValue, env LValue) + func (ls *LState) SetField(obj LValue, key string, value LValue) + func (ls *LState) SetFuncs(tb *LTable, funcs map[string]LGFunction, upvalues ...LValue) *LTable + func (ls *LState) SetGlobal(name string, value LValue) + func (ls *LState) SetLocal(dbg *Debug, no int, lv LValue) string + func (ls *LState) SetMetatable(obj LValue, mt LValue) + func (ls *LState) SetMx(mx int) + func (ls *LState) SetTable(obj LValue, key LValue, value LValue) + func (ls *LState) SetTop(idx int) + func (ls *LState) SetUpvalue(fn *LFunction, no int, lv LValue) string + func (ls *LState) Status(th *LState) string + func (ls *LState) String() string + func (ls *LState) ToBool(n int) bool + func (ls *LState) ToChannel(n int) chan LValue + func (ls *LState) ToFunction(n int) *LFunction + func (ls *LState) ToInt(n int) int + func (ls *LState) ToInt64(n int) int64 + func (ls *LState) ToNumber(n int) LNumber + func (ls *LState) ToString(n int) string + func (ls *LState) ToStringMeta(lv LValue) LValue + func (ls *LState) ToTable(n int) *LTable + func (ls *LState) ToThread(n int) *LState + func (ls *LState) ToUserData(n int) *LUserData + func (ls *LState) Type() LValueType + func (ls *LState) TypeError(n int, typ LValueType) + func (ls *LState) Where(level int) string + func (ls *LState) XMoveTo(other *LState, n int) + func (ls *LState) Yield(values ...LValue) int + type LString string + func (st LString) Format(f fmt.State, c rune) + func (st LString) String() string + func (st LString) Type() LValueType + type LTable struct + Metatable LValue + func (tb *LTable) Append(value LValue) + func (tb *LTable) ForEach(cb func(LValue, LValue)) + func (tb *LTable) Insert(i int, value LValue) + func (tb *LTable) Len() int + func (tb *LTable) MaxN() int + func (tb *LTable) Next(key LValue) (LValue, LValue) + func (tb *LTable) RawGet(key LValue) LValue + func (tb *LTable) RawGetH(key LValue) LValue + func (tb *LTable) RawGetInt(key int) LValue + func (tb *LTable) RawGetString(key string) LValue + func (tb *LTable) RawSet(key LValue, value LValue) + func (tb *LTable) RawSetH(key LValue, value LValue) + func (tb *LTable) RawSetInt(key int, value LValue) + func (tb *LTable) RawSetString(key string, value LValue) + func (tb *LTable) Remove(pos int) LValue + func (tb *LTable) String() string + func (tb *LTable) Type() LValueType + type LUserData struct + Env *LTable + Metatable LValue + Value interface{} + func (ud *LUserData) String() string + func (ud *LUserData) Type() LValueType + type LValue interface + String func() string + Type func() LValueType + type LValueType int + const LTBool + const LTChannel + const LTFunction + const LTNil + const LTNumber + const LTString + const LTTable + const LTThread + const LTUserData + func (vt LValueType) String() string + type Options struct + CallStackSize int + IncludeGoStackTrace bool + RegistrySize int + SkipOpenLibs bool + type P struct + Fn LValue + Handler *LFunction + NRet int + Protect bool + type ResumeState int + const ResumeError + const ResumeOK + const ResumeYield + type Upvalue struct + func (uv *Upvalue) Close() + func (uv *Upvalue) IsClosed() bool + func (uv *Upvalue) SetValue(value LValue) + func (uv *Upvalue) Value() LValue