type

AxonContext

@Js
abstract class AxonContext : Obj, HaystackContext

AxonContext manages the environment of an Axon evaluation

methods

call

Lookup and call a function with the given arguments.

eval

Evaluate an Axon expression within this context.

evalExpr

Evaluate an expression

evalToFunc

Evaluate expression to a function expression

ns

Definition namespace

parse

Parse Axon expression

stash

Stash allows you to stash objects on the Context object during an Axon evaluation.

Slot Details

call

Obj? call(Str funcName, Obj?[] args)

Lookup and call a function with the given arguments. The arguments must be fully evaluated values such as Numbers, Dicts, Grids, etc.

eval

Obj? eval(Str src, Loc loc := Loc.eval)

Evaluate an Axon expression within this context. Convenience for evalExpr(parse(src, loc))

evalExpr

Obj? evalExpr(Expr expr)

Evaluate an expression

evalToFunc

Fn evalToFunc(Str src)

Evaluate expression to a function expression

ns

abstract Namespace ns()

Definition namespace

parse

Expr parse(Str src, Loc loc := Loc.eval)

Parse Axon expression

stash

Str:Obj? stash()

Stash allows you to stash objects on the Context object during an Axon evaluation. You should scope your string keys with your pod name to avoid naming collisions.