示例#1
0
        public override SyntaxList <StatementSyntax> VisitWhileStatement(CSS.WhileStatementSyntax node)
        {
            var condition = (ExpressionSyntax)node.Condition.Accept(_nodesVisitor);
            var stmt      = ConvertBlock(node.Statement);
            var block     = SyntaxFactory.WhileBlock(
                SyntaxFactory.WhileStatement(condition),
                stmt
                );

            return(SyntaxFactory.SingletonList <StatementSyntax>(block));
        }
            public override SyntaxList <VB.Syntax.StatementSyntax> VisitWhileStatement(CS.Syntax.WhileStatementSyntax node)
            {
                VB.Syntax.WhileStatementSyntax begin = VB.SyntaxFactory.WhileStatement(
                    nodeVisitor.VisitExpression(node.Condition));

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