コード例 #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);
 }
コード例 #2
0
ファイル: BoundTreeRewriter.cs プロジェクト: stefan991/minsk
        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);
        }
コード例 #3
0
ファイル: BoundNodePrinter.cs プロジェクト: GBS-Joel/minsk
 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();
 }
コード例 #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));
        }