Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
Definitions map[string]Definition
}
type Definition ¶
type Definition struct { Params []ParamDefinition Body string }
func (Definition) AsCall ¶
func (d Definition) AsCall(name string, args ...interface{}) string
AsCall returns a call instruction of the function with the given param values.
func (Definition) AsScript ¶
func (d Definition) AsScript(name string) string
AsScript returns the function as a compilable script.
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment() Environment
func (Environment) Compile ¶
func (e Environment) Compile(script string) error
Compile the script and returns the environment needed to run it.
func (Environment) Execute ¶
func (e Environment) Execute(script string) (interface{}, error)
Execute parses script and executes in the specified environment.
type ParamDefinition ¶
type ParamDefinition struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.