Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Filename string Interp *command.Interpreter Exec executor.Executor Globals *types.Global }
Config is the parameters for the mruby engine
type MRuby ¶
type MRuby struct { *Config // contains filtered or unexported fields }
MRuby is an Evaluator that can handle mruby interpreters.
func (*MRuby) Result ¶
func (m *MRuby) Result() types.BuildResult
Result returns the last BuildResult for this evaluator.
func (*MRuby) RunCode ¶
RunCode runs the value intended to be a *gm.MrbValue in the mruby instance which is a proc to some code to run, and the previous stack reference (or 0 for none). The result is both a BuildResult and an integer that the refers to a stack in the mruby interpreter.
This is typically used for instantiating code in a REPL; so that it can be appropriately evaluated and on any evaluation error, return its position so the evaluation can continue.
Given this function is intended to run multiple times, it does not execute the after hooks if they are set.