Example #1
0
        /**Duplicate a tree, assuming this is a root node of a tree--
         * duplicate that node and what's below; ignore siblings of root node.
         */
        public static GrammarAST DupTreeNoActions(GrammarAST t, GrammarAST parent)
        {
            GrammarAST d = (GrammarAST)t.DupNode();

            foreach (GrammarAST subchild in GetChildrenForDupTree(t))
            {
                d.AddChild(DupTreeNoActions(subchild, d));
            }

            return(d);
        }
Example #2
0
        /**Duplicate a tree, assuming this is a root node of a tree--
         * duplicate that node and what's below; ignore siblings of root node.
         */
        public static GrammarAST DupTreeNoActions( GrammarAST t, GrammarAST parent )
        {
            GrammarAST d = (GrammarAST)t.DupNode();
            foreach ( GrammarAST subchild in GetChildrenForDupTree( t ) )
                d.AddChild( DupTreeNoActions( subchild, d ) );

            return d;
        }