luae

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalLua

func EvalLua(vm *lua.LState, code string, target any) (err error)

func MarshalLua

func MarshalLua(value any) (lua.LValue, error)

MarshalLua converts a Go value to a Lua value.

func NewFunc

func NewFunc(f func(L *lua.LState) int) *lua.LFunction

func UnmarshalLua

func UnmarshalLua(vm *lua.LState, value lua.LValue, target any) (err error)

UnmarshalLua converts a Lua value to a Go value.

Types

type DynTable

type DynTable interface {
	Get(L *lua.LState, key string) (value any, ok bool)
	Set(L *lua.LState, key string, value lua.LValue) (err error)
}

Dynamic table.

type Marshaler

type Marshaler interface {
	MarshalLua() (lua.LValue, error)
}

type Unmarshaler

type Unmarshaler interface {
	UnmarshalLua(vm *lua.LState, value lua.LValue) error
}

Jump to

Keyboard shortcuts

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