Exemplo n.º 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
        }
Exemplo n.º 2
0
        public static void RewriteRule(StandardRule rule)
        {
            AstRewriter ar = new AstRewriter(new RuleTempMaker(rule));

            ar.Rewrite(rule);
        }
Exemplo n.º 3
0
        public static void RewriteBlock(CodeBlock block)
        {
            AstRewriter ar = new AstRewriter(new BlockTempMaker(block));

            ar.Rewrite(block);
        }