Skip to main content

prattify

Function prattify 

Source
pub fn prattify(expr: &Value, op: &OpRef) -> Value
Expand description

Embed a new operator into an expression tree, in place, according to operator precedence.

The node keeps its identity, so every rule holding it observes the rewrite: that is what preserves the referential integrity of the root expression while it is still being assembled. The returned handle is the sub-expression the new operator now heads, which is where its next term belongs.