cctools
jx_sub.h File Reference
#include "jx.h"

Go to the source code of this file.

Functions

struct jxjx_sub (struct jx *j, struct jx *context)
 Substitute symbols from context. More...
 

Detailed Description

Implements context substitution of JX expressions.

Function Documentation

◆ jx_sub()

struct jx* jx_sub ( struct jx j,
struct jx context 
)

Substitute symbols from context.

Traverses the expression, searching for symbols Unbounds symbols by looking for matches in the context object.

Parameters
jThe expression whose symbols will be substituted.
contextAn object in which values will be found.
Returns
A newly created result expression, which must be deleted with jx_delete. If the expression is invalid in some way, an object of type JX_NULL is returned.