Documentation
¶
Index ¶
- Variables
- func Call(source string, env *object.Environment) (_env *object.Environment, obj object.Object, errors []string)
- func Evaluate() (env *object.Environment, obj object.Object, errors []string)
- func NewError(line int, message string, args ...interface{}) *object.Error
- func NewScript(source string)
- func RegisterFunction(name string, function object.BuiltinFunction)
- type Script
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Env = object.NewEnvironment() // Version returns the current version of Ghost. Version = version.String() // NULL represents a null value. NULL = value.NULL // TRUE represents a true value. TRUE = value.TRUE // FALSE represents a false value. FALSE = value.FALSE )
Global values
Functions ¶
func Call ¶ added in v0.6.0
func Call(source string, env *object.Environment) (_env *object.Environment, obj object.Object, errors []string)
Call evaluates the specified code directly with the passed environment.
func Evaluate ¶
func Evaluate() (env *object.Environment, obj object.Object, errors []string)
Evaluate runs the registered script through the Ghost evaluator.
func NewScript ¶
func NewScript(source string)
NewScript registers a new Ghost script to be evaluated.
func RegisterFunction ¶
func RegisterFunction(name string, function object.BuiltinFunction)
RegisterFunction registers a new native function with Ghost.
Types ¶
Click to show internal directories.
Click to hide internal directories.