internal static CellTreeNode Flatten(CellTreeNode node)
            {
                // First do simple flattening and then associative op flattening
                CellTreeNode newNode = FlatteningVisitor.Flatten(node);
                AssociativeOpFlatteningVisitor visitor = new AssociativeOpFlatteningVisitor();

                return(newNode.Accept <bool, CellTreeNode>(visitor, true));
            }
Exemplo n.º 2
0
 // effects: Like Flatten, flattens the tree and then collapses
 // associative operators, e.g., (A IJ B) IJ C is changed to A IJ B IJ C
 internal CellTreeNode AssociativeFlatten()
 {
     return(AssociativeOpFlatteningVisitor.Flatten(this));
 }