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 }
public static void RewriteRule(StandardRule rule) { AstRewriter ar = new AstRewriter(new RuleTempMaker(rule)); ar.Rewrite(rule); }
public static void RewriteBlock(CodeBlock block) { AstRewriter ar = new AstRewriter(new BlockTempMaker(block)); ar.Rewrite(block); }