public override object Visit(IfElseStatement ifElseStatement, object data)
        {
            ProcessSpecials(ifElseStatement.Specials);

            CodeConditionStatement ifStmt = new CodeConditionStatement();

            ifStmt.Condition = (CodeExpression)ifElseStatement.Condition.AcceptVisitor(this, data);

            codeStack.Push(ifStmt.TrueStatements);
            ifElseStatement.EmbeddedStatement.AcceptChildren(this, data);
            codeStack.Pop();

            codeStack.Push(ifStmt.FalseStatements);
            ifElseStatement.EmbeddedElseStatement.AcceptChildren(this, data);
            codeStack.Pop();

            AddStmt(ifStmt);

            return ifStmt;
        }
        public override object Visit(IfElseStatement ifElseStatement, object data)
        {
            DebugOutput(ifElseStatement);
            AppendIndentation();sourceText.Append("If ");
            sourceText.Append(ifElseStatement.Condition.AcceptVisitor(this, data).ToString());
            sourceText.Append(" Then");
            AppendNewLine();

            ++indentLevel;
            ifElseStatement.EmbeddedStatement.AcceptVisitor(this, data);
            --indentLevel;

            AppendIndentation();sourceText.Append("Else");
            AppendNewLine();

            ++indentLevel;
            ifElseStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
            --indentLevel;

            AppendIndentation();sourceText.Append("End If");
            AppendNewLine();
            return null;
        }
 public virtual object Visit(IfElseStatement ifElseStatement, object data)
 {
     object ret = data;
     if (ifElseStatement.Condition != null) {
         ret = ifElseStatement.Condition.AcceptVisitor(this, data);
     }
     if (ifElseStatement.EmbeddedStatement != null) {
         ret = ifElseStatement.EmbeddedStatement.AcceptVisitor(this, data);
     }
     if (ifElseStatement.EmbeddedElseStatement != null) {
         ret = ifElseStatement.EmbeddedElseStatement.AcceptVisitor(this, data);
     }
     return ret;
 }
 public override object Visit(IfElseStatement ifElseStatement, object data)
 {
     Console.WriteLine(ifElseStatement.ToString());
     return ifElseStatement.AcceptChildren(this, data);
 }
 public override object Visit(IfElseStatement ifElseStatement, object data)
 {
     outputFormatter.Indent();
     outputFormatter.PrintToken(Tokens.If);
     outputFormatter.Space();
     outputFormatter.PrintToken(Tokens.OpenParenthesis);
     ifElseStatement.Condition.AcceptVisitor(this,data);
     outputFormatter.PrintToken(Tokens.CloseParenthesis);
     outputFormatter.NewLine();
     ifElseStatement.EmbeddedStatement.AcceptVisitor(this,data);
     outputFormatter.Indent();
     outputFormatter.PrintToken(Tokens.Else);
     outputFormatter.NewLine();
     ifElseStatement.EmbeddedElseStatement.AcceptVisitor(this,data);
     return null;
 }