Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is an engine that is capable of evaluating Lua code from an io.Reader. The engine keeps track of state, so that multiple calls to Eval will build on the state that the last Eval call produced.
engine.Eval(strings.NewReader(`a=5`)) engine.Eval(strings.NewReader(`print(a)`)) // prints '5'
If an error occurs during parsing or evaluation, that error will be returned. In case of a parse error, the state of the engine will remain unaffected.
type Error ¶
type Error struct { Message value.Value Level value.Value Stack []StackFrame // contains filtered or unexported fields }
Error represents a value originating from Lua's error() function.
type StackFrame ¶
type StackFrame struct {
Name string
}
func (StackFrame) String ¶
func (f StackFrame) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.