lua

package
v0.0.0-...-3525705 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LTNil      = lua.LTNil
	LTFunction = lua.LTFunction
	LTTable    = lua.LTTable
	LTBool     = lua.LTBool
	MultRet    = lua.MultRet
)

Variables

View Source
var LNil = lua.LNil

Functions

func ClearTable

func ClearTable(s *LState, t *LTable)

Types

type FunctionProto

type FunctionProto = lua.FunctionProto

func CompileReader

func CompileReader(reader io.Reader) (compiled *FunctionProto, err error)

type LBool

type LBool = lua.LBool

type LFunction

type LFunction = lua.LFunction

type LGFunction

type LGFunction = lua.LGFunction

type LState

type LState = lua.LState

type LString

type LString = lua.LString

type LTable

type LTable = lua.LTable

type LValue

type LValue = lua.LValue

type VM

type VM struct {
	*lua.LState
	Top lua.LValue
	interfaces.Pool[LTable, *LTable]
}

func (*VM) GetTopFunctionOrError

func (vm *VM) GetTopFunctionOrError() (t *LFunction, err error)

func (*VM) GetTopFunctionOrFunctionNamedError

func (vm *VM) GetTopFunctionOrFunctionNamedError(
	args []string,
) (t *LFunction, argsOut []string, err error)

func (*VM) GetTopTableOrError

func (vm *VM) GetTopTableOrError() (t *LTable, err error)

type VMPool

type VMPool struct {
	interfaces.PoolWithErrorsPtr[VM, *VM]
	Require  LGFunction
	Searcher LGFunction
	// contains filtered or unexported fields
}

func MakeVMPoolWithRequire

func MakeVMPoolWithRequire(
	script string,
	require LGFunction,
	apply interfaces.FuncIter[*VM],
) (ml *VMPool, err error)

func MakeVMPoolWithSearcher

func MakeVMPoolWithSearcher(
	script string,
	searcher LGFunction,
	apply interfaces.FuncIter[*VM],
) (ml *VMPool, err error)

func (*VMPool) PrepareVM

func (sp *VMPool) PrepareVM(
	vm *VM,
	apply interfaces.FuncIter[*VM],
) (err error)

func (*VMPool) SetCompiled

func (sp *VMPool) SetCompiled(
	compiled *FunctionProto,
	apply interfaces.FuncIter[*VM],
) (err error)

func (*VMPool) SetReader

func (sp *VMPool) SetReader(
	reader io.Reader,
	apply interfaces.FuncIter[*VM],
) (err error)

type VMPoolBuilder

type VMPoolBuilder struct {
	// contains filtered or unexported fields
}

func (*VMPoolBuilder) Build

func (vpb *VMPoolBuilder) Build() (vmp *VMPool, err error)

func (*VMPoolBuilder) Clone

func (vpb *VMPoolBuilder) Clone() *VMPoolBuilder

func (*VMPoolBuilder) WithApply

func (sp *VMPoolBuilder) WithApply(
	apply interfaces.FuncIter[*VM],
) *VMPoolBuilder

func (*VMPoolBuilder) WithCompiled

func (sp *VMPoolBuilder) WithCompiled(
	compiled *FunctionProto,
) *VMPoolBuilder

func (*VMPoolBuilder) WithReader

func (sp *VMPoolBuilder) WithReader(
	r io.Reader,
) *VMPoolBuilder

func (*VMPoolBuilder) WithRequire

func (vpb *VMPoolBuilder) WithRequire(v LGFunction) *VMPoolBuilder

func (*VMPoolBuilder) WithScript

func (sp *VMPoolBuilder) WithScript(
	script string,
) *VMPoolBuilder

func (*VMPoolBuilder) WithSearcher

func (vpb *VMPoolBuilder) WithSearcher(v LGFunction) *VMPoolBuilder

Source Files

  • compile.go
  • main.go
  • table.go
  • vm.go
  • vm_builder.go
  • vm_pool.go
  • vm_pool_builder.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL