Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgCount ¶
type ArgCount byte
ArgCount is the number of arguments passed to a function to be evaluated.
type Config ¶
type Config struct {
Ctx *Context
}
Config holds configuration for evaluating expressions on QFrames. It should be considered a private implementation detail and should never be referenced or used directly outside of the QFrame code. To manipulate it use the functions returning ConfigFunc below.
func NewConfig ¶
func NewConfig(ff []ConfigFunc) Config
NewConfig creates a new Config object. This function should never be called from outside QFrame.
type ConfigFunc ¶
type ConfigFunc func(*Config)
ConfigFunc is a function that operates on a Config object.
func EvalContext ¶
func EvalContext(ctx *Context) ConfigFunc
EvalContext sets the evaluation context to use.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context describes the context in which an expression is executed. It maps function names to actual functions.
func NewDefaultCtx ¶
func NewDefaultCtx() *Context
NewDefaultCtx creates a default context containing a base set of functions. It can be used as is or enhanced with other/more functions. See the source code for the current set of functions.
func (*Context) GetFunc ¶
GetFunc returns a reference to a function matching the given function type, argument count and name. If no matching function is found in the context the second return value is set to false.