public void Process(FunctionDefinitionNode function, IReplacementListener listener)
        {
            ProcessReplacementsVisitorChain visitorChain = new ProcessReplacementsVisitorChain(this, listener, isPostOrder: true);
            ParseTreeChildrenVisitor        parseTreeChildrenVisitor
                = new ParseTreeChildrenVisitor(null, visitorChain.ReplacementVisitor, visitorChain.ChildrenVisitor);
            ProcessParseTreeReplacementsVisitor parseTreeReplacementsVisitor
                = new ProcessParseTreeReplacementsVisitor(this, listener);

            visitorChain.ExpressionChildrenVisitor.ExtensionChildrenVisitor = new ParseTreeVisitorExtension(parseTreeChildrenVisitor);
            visitorChain.ExpressionReplacementsVisitor.ExtensionVisitor     = new ParseTreeVisitorExtension(parseTreeReplacementsVisitor);
            visitorChain.ProcessReplacements(function);
        }
        public void Process(FunctionDefinitionNode function, IReplacementListener listener)
        {
            // TODO: Helper class to reduce repeating of this setup code.
            ProcessReplacementsVisitorChain visitorChain = new ProcessReplacementsVisitorChain(this, listener);
            ParseTreeChildrenVisitor        parseTreeChildrenVisitor
                = new ParseTreeChildrenVisitor(visitorChain.ReplacementVisitor, null, visitorChain.ChildrenVisitor);
            ProcessParseTreeReplacementsVisitor parseTreeReplacementsVisitor
                = new ProcessParseTreeReplacementsVisitor(this, listener);

            visitorChain.ExpressionChildrenVisitor.ExtensionChildrenVisitor = new ParseTreeVisitorExtension(parseTreeChildrenVisitor);
            visitorChain.ExpressionReplacementsVisitor.ExtensionVisitor     = new ParseTreeVisitorExtension(parseTreeReplacementsVisitor);

            visitorChain.ProcessReplacements(function);
        }
        public void Process(ITopLevelStatementNode topLevelStatement, IReplacementListener listener)
        {
            ProcessReplacementsVisitorChain replacementsVisitorChain = new ProcessReplacementsVisitorChain(this, listener);

            replacementsVisitorChain.ProcessReplacements(topLevelStatement);
        }
Exemple #4
0
        public void Process(FunctionDefinitionNode function, IReplacementListener listener)
        {
            ProcessReplacementsVisitorChain replacementsVisitorChain = new ProcessReplacementsVisitorChain(this, listener);

            replacementsVisitorChain.ProcessReplacements(function);
        }