Implemented subtree substitution.
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.
Showing
tests/test_rewrite.py
0 → 100644
Please register or sign in to comment