cctools
|
Implements evaluation of JX expressions. More...
#include "jx.h"
Go to the source code of this file.
Functions | |
struct jx * | jx_eval (struct jx *j, struct jx *context) |
Evaluate an expression. More... | |
struct jx * | jx_eval_with_defines (struct jx *j, struct jx *context) |
Evaluate an expression with embedded definitions. More... | |
Implements evaluation of JX expressions.
Evaluate an expression.
Traverses the expression, evaluates all operators and evalutes unbound symbols by looking for matches in the context object.
j | The expression to evaluate. |
context | An object in which values will be found. |
Evaluate an expression with embedded definitions.
Same as jx_eval, except first looks for a "defines" clause and combines that with the context. Allows an expression to have its own bound values, for convenience.
j | The expression to evaluate, which may contain a "defines" clause. |
context | An object in which values will be found. |