pub fn substitute(ast: &mut AstNode, bindings: &HashMap<String, AstNode>)Expand description
Replace variable references with sub-expressions.
Backs the GenApi <Constant> and named <Expression> elements, which let
a formula name a literal or a reusable sub-formula:
<IntSwissKnife Name="Example">
<pVariable Name="X">X</pVariable>
<Constant Name="TEN">10</Constant>
<Expression Name="XPLUS2">TEN + X</Expression>
<Formula>TEN * XPLUS2</Formula>
</IntSwissKnife>Substitution happens once, at build time, so evaluation stays a plain walk over the tree.