Example #1
0
        public static void Rewrite(CodeBlock block) {
            ForestRewriter fr = new ForestRewriter();

            // Collect the blocks that need rewriting
            fr.WalkNode(block);


#if FULL
            // If any do need rewriting, rewrite the blocks now
            if (fr._blocks != null) {
                foreach (CodeBlock cb in fr._blocks) {
                    AstRewriter.RewriteBlock(cb);
                }
            } 
#endif

        }
Example #2
0
        public static void Rewrite(CodeBlock block)
        {
            ForestRewriter fr = new ForestRewriter();

            // Collect the blocks that need rewriting
            fr.WalkNode(block);


#if FULL
            // If any do need rewriting, rewrite the blocks now
            if (fr._blocks != null)
            {
                foreach (CodeBlock cb in fr._blocks)
                {
                    AstRewriter.RewriteBlock(cb);
                }
            }
#endif
        }