Documentation
¶
Overview ¶
Package compeval runs GX code at compile time.
Index ¶
- func EvalExpr(ctx evaluator.Context, expr ir.Expr) (cpevelements.Element, error)
- func EvalInt(fetcher ir.Fetcher, expr ir.Expr) (int, error)
- func EvalRank(fetcher ir.Fetcher, expr ir.Expr) (ir.ArrayRank, []canonical.Canonical, error)
- func NewOptionVariable(vr *ir.VarExpr) options.PackageOption
- type CompEval
- func (ev *CompEval) ArrayOps() elements.ArrayOps
- func (ev *CompEval) CallFuncLit(ctx evaluator.Context, ref *ir.FuncLit, args []elements.Element) ([]elements.Element, error)
- func (ev *CompEval) ElementFromAtom(src elements.ExprAt, val values.Array) (elements.NumericalElement, error)
- func (ev *CompEval) Importer() evaluator.Importer
- func (ev *CompEval) NewFunc(fn ir.Func, recv *elements.Receiver) elements.Func
- func (ev *CompEval) NewSub(elements.ArrayOps) evaluator.Evaluator
- func (ev *CompEval) Processor() *processor.Processor
- func (ev *CompEval) Trace(call elements.CallAt, fn elements.Func, irFunc *ir.FuncBuiltin, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptionVariable ¶
func NewOptionVariable(vr *ir.VarExpr) options.PackageOption
NewOptionVariable creates a package option to set a static variable of a package with its corresponding symbolic element.
Types ¶
type CompEval ¶
type CompEval struct {
// contains filtered or unexported fields
}
CompEval is the evaluator used for compilation evaluation.
func NewHostEvaluator ¶
NewHostEvaluator returns a new evaluator for the host.
func (*CompEval) CallFuncLit ¶
func (ev *CompEval) CallFuncLit(ctx evaluator.Context, ref *ir.FuncLit, args []elements.Element) ([]elements.Element, error)
CallFuncLit calls a function literal.
func (*CompEval) ElementFromAtom ¶
func (ev *CompEval) ElementFromAtom(src elements.ExprAt, val values.Array) (elements.NumericalElement, error)
ElementFromAtom returns an element from a GX value.
func (*CompEval) NewSub ¶
NewSub returns a new evaluator given a new array operator implementations.
Directories
¶
Path | Synopsis |
---|---|
Package cpevelements provides elements for the interpreter for compeval.
|
Package cpevelements provides elements for the interpreter for compeval. |
Click to show internal directories.
Click to hide internal directories.