• Sander Mathijs van Veen's avatar
    Implemented subtree substitution. · d9b28ea2
    Sander Mathijs van Veen authored
    Once a possibility is applied, the new subtree will be substituted into the
    parent node of the subtree. This requires a subtree_map to avoid traversing the
    expression tree. The subtree can also be the root node of the expression tree.
    In that case, there is no parent node found for the subtree. Otherwise the old
    subtree will be substituted with the new subtree node in the parent node.
    Also updated the test cases accordingly.
    d9b28ea2
node.py 7.73 KB