Versions in this module Expand all Collapse all v0 v0.1.0 Aug 30, 2021 Changes in this version + type Alias struct + Dependencies []*Value + type Array []*Value + type Builtin struct + Identifier string + Symbol *semantics.Symbol + Value *Value + type DefaultRuntime struct + func CreateDefaultRuntime() *DefaultRuntime + func (runtime *DefaultRuntime) Add(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) And(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Define(identifier string, value *Value) + func (runtime *DefaultRuntime) Divide(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Equals(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) GreaterThan(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) GreaterThanOrEqual(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Index(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) LessThan(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) LessThanOrEqual(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Modulo(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Multiply(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Negative(operand *Value) *Value + func (runtime *DefaultRuntime) Not(operand *Value) *Value + func (runtime *DefaultRuntime) NotEquals(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) Or(left *Value, right *Value) *Value + func (runtime *DefaultRuntime) PopScope() + func (runtime *DefaultRuntime) PushScope(scopeType ScopeType) + func (runtime *DefaultRuntime) Resolve(identifier string) *Value + func (runtime *DefaultRuntime) ResolveEscapes(value string) string + func (runtime *DefaultRuntime) Scope() *Scope + func (runtime *DefaultRuntime) Selector(value *Value, identifier string) *Value + func (runtime *DefaultRuntime) SetScope(scope *Scope) + func (runtime *DefaultRuntime) Shell(script string) + func (runtime *DefaultRuntime) ShellFormat(value *Value) string + func (runtime *DefaultRuntime) Subtract(left *Value, right *Value) *Value + type Delegate interface + Add func(left *Value, right *Value) *Value + And func(left *Value, right *Value) *Value + Define func(identifier string, value *Value) + Divide func(left *Value, right *Value) *Value + Equals func(left *Value, right *Value) *Value + GreaterThan func(left *Value, right *Value) *Value + GreaterThanOrEqual func(left *Value, right *Value) *Value + Index func(left *Value, right *Value) *Value + LessThan func(left *Value, right *Value) *Value + LessThanOrEqual func(left *Value, right *Value) *Value + Modulo func(left *Value, right *Value) *Value + Multiply func(left *Value, right *Value) *Value + Negative func(operand *Value) *Value + Not func(operand *Value) *Value + NotEquals func(left *Value, right *Value) *Value + Or func(left *Value, right *Value) *Value + PopScope func() + PushScope func(scopeType ScopeType) + Resolve func(identifier string) *Value + ResolveEscapes func(value string) string + Scope func() *Scope + Selector func(value *Value, identifier string) *Value + SetScope func(scope *Scope) + Shell func(script string) + ShellFormat func(value *Value) string + Subtract func(left *Value, right *Value) *Value + type Engine struct + Delegate Delegate + func CreateEngine(delegate Delegate) *Engine + func (engine *Engine) Evaluate(source *ast.Block) (err error) + func (engine *Engine) EvaluateTask(task string) (err error) + type Function struct + Arguments []string + Block *ast.Block + Handler FunctionHandler + IsRuleFunction bool + type FunctionHandler func(engine *Engine, arguments []*Value) *Value + type Object map[string]*Value + type Program struct + Builtins map[string]*Builtin + Delegate Delegate + Engine *Engine + Input string + RootScope *semantics.Scope + Source *ast.Block + func CreateProgram(input string, delegate Delegate) *Program + func (program *Program) BuildSymbols() []error + func (program *Program) DefineBuiltinFunction(identifier string, arguments int, handler FunctionHandler) + func (program *Program) DefineBuiltinSymbols() + func (program *Program) DefineBuiltinValue(identifier string, valueType ValueType, traits semantics.Trait, ...) + func (program *Program) DefineBuiltinValues() + func (program *Program) Parse() error + func (program *Program) Run() error + func (program *Program) RunTask(task string) error + func (program *Program) Validate() []error + type Rule struct + Block *ast.Block + Dependencies []*Value + Outputs []string + type RuntimeError struct + Message string + func CreateRuntimeError(message string) *RuntimeError + func (err *RuntimeError) Error() string + type Scope struct + ParentScope *Scope + Type ScopeType + Values map[string]*Value + func CreateScope(parentScope *Scope, scopeType ScopeType) *Scope + func (scope *Scope) CreateScope(scopeType ScopeType) *Scope + func (scope *Scope) Define(identifier string, value *Value) + func (scope *Scope) Lookup(identifier string) *Value + type ScopeType int + const ScopeTypeFunction + const ScopeTypeGeneric + const ScopeTypeGlobal + const ScopeTypeRule + const ScopeTypeRuleFunction + type Value struct + Exported bool + Type ValueType + Value interface{} + func (value *Value) String() string + type ValueType int + const ValueTypeAlias + const ValueTypeArray + const ValueTypeBool + const ValueTypeFunction + const ValueTypeNone + const ValueTypeNumber + const ValueTypeObject + const ValueTypeRule + const ValueTypeRuleFunction + const ValueTypeString + func (i ValueType) String() string