lua

package
v0.0.0-...-e537141 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultIterator = &DefaultIteratorImpl{}
View Source
var MismatchErrorChecker = &MismatchErrorOnCheck{}

Functions

func ValIsType

func ValIsType(val lua.LValue, ltype lua.LValueType) bool

Types

type Convertible

type Convertible interface {
	ConvertLua(val lua.LValue) error
}

type DefaultIteratorImpl

type DefaultIteratorImpl struct{}

func (DefaultIteratorImpl) ForEach

func (DefaultIteratorImpl) ForEach(tbl *lua.LTable, fn ForEachFn) error

type ErrMismatchedType

type ErrMismatchedType struct {
	Val           lua.LValue
	Expected, Got lua.LValueType
}

func (*ErrMismatchedType) Error

func (err *ErrMismatchedType) Error() string

type ForEachFn

type ForEachFn func(key, val lua.LValue) error

type Iterator

type Iterator interface {
	ForEach(tbl *lua.LTable, fn ForEachFn) error
}

type MismatchChecker

type MismatchChecker struct {
	OnMismatch OnTypeMismatch
}

func (MismatchChecker) ValMustBeType

func (m MismatchChecker) ValMustBeType(val lua.LValue, ltype lua.LValueType) error

type MismatchErrorOnCheck

type MismatchErrorOnCheck struct{}

func (MismatchErrorOnCheck) HandleTypeMismatch

func (MismatchErrorOnCheck) HandleTypeMismatch(val lua.LValue, expected, got lua.LValueType) error

type OnTypeMismatch

type OnTypeMismatch interface {
	HandleTypeMismatch(val lua.LValue, expected, got lua.LValueType) error
}

type Type

type Type interface {
	~int
	~float64
	~string
}

type ValChecker

type ValChecker interface {
	ValMustBeType(val lua.LValue, ltype lua.LValueType) error
}

Jump to

Keyboard shortcuts

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