Exemplo n.º 1
0
        public override SyntaxList <StatementSyntax> VisitDoStatement(CSS.DoStatementSyntax node)
        {
            var condition = (ExpressionSyntax)node.Condition.Accept(_nodesVisitor);
            var stmt      = ConvertBlock(node.Statement);
            var block     = SyntaxFactory.DoLoopWhileBlock(
                SyntaxFactory.DoStatement(SyntaxKind.SimpleDoStatement),
                stmt,
                SyntaxFactory.LoopStatement(SyntaxKind.LoopWhileStatement, SyntaxFactory.WhileClause(condition))
                );

            return(SyntaxFactory.SingletonList <StatementSyntax>(block));
        }
            public override SyntaxList <VB.Syntax.StatementSyntax> VisitDoStatement(CS.Syntax.DoStatementSyntax node)
            {
                VB.Syntax.DoStatementSyntax begin = VB.SyntaxFactory.SimpleDoStatement();

                VB.Syntax.LoopStatementSyntax loop = VB.SyntaxFactory.LoopWhileStatement(
                    VB.SyntaxFactory.WhileClause(nodeVisitor.VisitExpression(node.Condition)));

                return(List <VB.Syntax.StatementSyntax>(
                           VB.SyntaxFactory.DoLoopWhileBlock(
                               begin,
                               Visit(node.Statement),
                               loop)));
            }