Example #1
0
        /// <summary>
        /// Rewrites a for infinite statement.
        /// </summary>
        /// <param name="node">The for infinite statement to rewrite.</param>
        /// <returns>The rewritten for infinite statement.</returns>
        protected virtual BoundStatement RewriteForInfiniteStatement(BoundForInfiniteStatement node)
        {
            var body = RewriteStatement(node.Body);

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

            return(new BoundForInfiniteStatement(body, node.BreakLabel, node.ContinueLabel));
        }
Example #2
0
 private static void WriteForInfiniteStatement(BoundForInfiniteStatement node, IndentedTextWriter writer)
 {
     writer.WriteKeyword(SyntaxKind.ForKeyword);
     writer.WriteSpace();
     writer.WriteNestedStatement(node.Body);
 }