/// <summary> /// Deep-clone the code object. /// </summary> public override CodeObject Clone() { While clone = (While)base.Clone(); clone.CloneField(ref clone._conditional, _conditional); clone.CloneField(ref clone._doWhile, _doWhile); return(clone); }
/// <summary> /// Parse a <see cref="For"/>. /// </summary> public static BlockStatement Parse(Parser parser, CodeObject parent, ParseFlags flags) { For @for = new For(parser, parent); if (AutomaticCodeCleanup && !parser.IsGenerated) { // Normalize 'for (;;)' to 'while (true)' (with a null conditional) if (@for._initializations == null && @for._conditional == null && @for._iterations == null && [email protected]) { While @while = new While(@for); @while.SetLineCol(@for); return(@while); } } return(@for); }
/// <summary> /// Create a <see cref="DoWhile"/>. /// </summary> public DoWhile(While parent) { _parent = parent; }