예제 #1
0
 private static void WriteWhileStatement(BoundWhileStatement node, IndentedTextWriter writer)
 {
     writer.WriteKeyword("while ");
     node.Condition.WriteTo(writer);
     writer.WriteLine();
     writer.WriteNestedStatement(node.Body);
 }
예제 #2
0
        protected virtual BoundStatement RewriteWhileStatement(BoundWhileStatement node)
        {
            var condition = RewriteExpression(node.Condition);
            var body = RewriteStatement(node.Body);
            if (condition == node.Condition && body == node.Body)
                return node;

            return new BoundWhileStatement(condition, body, node.BreakLabel, node.ContinueLabel);
        }
예제 #3
0
        protected virtual BoundStatement RewriteWhileStatement(BoundWhileStatement node)
        {
            var condition = RewriteExpression(node.Condition);
            var body      = RewriteStatement(node.Body);

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

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