Esempio 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);
 }
Esempio 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);
        }
Esempio 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();
 }
Esempio 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));
        }