Ejemplo n.º 1
0
 private static void WriteDoWhileStatement(BoundDoWhileStatement node, IndentedTextWriter writer)
 {
     writer.WriteKeyword(SyntaxKind.DoKeyword);
     writer.WriteLine();
     writer.WriteNestedStatement(node.Body);
     writer.WriteKeyword(SyntaxKind.WhileKeyword);
     writer.WriteSpace();
     node.Condition.WriteTo(writer);
 }
Ejemplo n.º 2
0
        protected virtual BoundStatement RewriteDoWhileStatement(BoundDoWhileStatement node)
        {
            var body = RewriteStatement(node.Body);
            var condition = RewriteExpression(node.Condition);
            if (body == node.Body && condition == node.Condition)
                return node;

            return new BoundDoWhileStatement(body, condition, node.BreakLabel, node.ContinueLabel);
        }
Ejemplo n.º 3
0
 private static void WriteDoWhileStatement(BoundDoWhileStatement node, IndentedTextWriter writer)
 {
     writer.WriteKeyword("do");
     writer.WriteLine();
     writer.WriteNestedStatement(node.Body);
     writer.WriteKeyword("while ");
     node.Condition.WriteTo(writer);
     writer.WriteLine();
 }
Ejemplo n.º 4
0
        protected virtual BoundStatement RewriteDoWhileStatement(BoundDoWhileStatement node)
        {
            var body      = RewriteStatement(node.Body);
            var condition = RewriteExpression(node.Condition);

            if (body == node.Body && condition == node.Condition)
            {
                return(node);
            }

            return(new BoundDoWhileStatement(body, condition));
        }