LiveData.Tracked.FlatAst.Util (live_data v0.1.0-alpha0)

Link to this section Summary

Functions

Given an expression, will return a list of all subexpressions.

Given an arbitrarily nested list data structure, will flatten it into a single list.

Expression traversal/update primitive.

Traverses the AST starting at id.

Traverses the AST starting at id.

Link to this section Functions

Link to this function

child_exprs(expr)

Given an expression, will return a list of all subexpressions.

Link to this function

recursive_flatten(val)

Given an arbitrarily nested list data structure, will flatten it into a single list.

Link to this function

reduce_expr(expr, acc, fun)

Link to this function

transform_expr(expr, acc, fun)

Expression traversal/update primitive.

Given an expression, an accululator and a function, will apply the function over all subexpressions of the expression.

The accumulator will be woven through, and will be returned alongside the updated expression.

Link to this function

traverse(ast, id, expr \\ nil, acc, fun)

Traverses the AST starting at id.

User provided function will be called on a node before its children.

Link to this function

traverse_post(ast, id, expr \\ nil, acc, fun)

Traverses the AST starting at id.

User provided function will be called on a node after its children.

Link to this function

unique_integer()