12.6.1 The do-while Statement
420237
private ParseTree parseDoWhileStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.DO);
    ParseTree body = parseStatement();
    eat(TokenType.WHILE);
    eat(TokenType.OPEN_PAREN);
    ParseTree condition = parseExpression();
    eat(TokenType.CLOSE_PAREN);
    // The semicolon after the "do-while" is optional.
    if (peek(TokenType.SEMI_COLON)) {
      eat(TokenType.SEMI_COLON);
    }
    return new DoWhileStatementTree(getTreeLocation(start), body, condition);
  }
421056
function process( $tpl, &$text, $nspace, $current_nspace )
    {
        $tmp = $tpl->doFunction( $this->Name, $this, $nspace, $current_nspace );
        if ( $tmp === false )
            return;
        $tpl->appendElement( $text, $tmp, $nspace, $current_nspace );
    }
173184
function(arr, iterator, callback) {
      callback = _doOnce(callback || noop);
      var amount = arr.length;

      if (!isArray(arr)) return callback();

      var completed = 0;
      doEach(arr, function(item) {
        iterator(item, doOnce(function(err) {
          if (err) {
            callback(err);
            callback = noop;
          } else {
            completed++;
            if (completed >= amount) callback(null);
          }
        }));
      });
    }
555830
private void forLoop(Env env, Scope scope, Writer writer) {
		Ctrl ctrl = scope.getCtrl();
		Object outer = scope.get("for");
		ForLoopStatus forLoopStatus = new ForLoopStatus(outer);
		scope.setLocal("for", forLoopStatus);
		
		Expr init = forCtrl.getInit();
		Expr cond = forCtrl.getCond();
		Expr update = forCtrl.getUpdate();
		
		ctrl.setLocalAssignment();
		for (init.eval(scope); cond == null || Logic.isTrue(cond.eval(scope)); update.eval(scope)) {
			ctrl.setWisdomAssignment();
			stat.exec(env, scope, writer);
			ctrl.setLocalAssignment();
			forLoopStatus.nextState();
			
			if (ctrl.isJump()) {
				if (ctrl.isBreak()) {
					ctrl.setJumpNone();
					break ;
				} else if (ctrl.isContinue()) {
					ctrl.setJumpNone();
					continue ;
				} else {
					ctrl.setWisdomAssignment();
					return ;
				}
			}
		}
		
		ctrl.setWisdomAssignment();
		if (_else != null && forLoopStatus.getIndex() == 0) {
			_else.exec(env, scope, writer);
		}
	}
991381
def visit_While(self, node):
        
        test = self.visit(node.test)
        body = [self.visit(n) for n in node.body]
        stmt = While(test, Block(body))
        return self.process_omp_attachements(node, stmt)
1360353
def program(self, prog, offset = 0):
		
		for addr, word in enumerate(prog):
			self.program_word(offset + addr, word)
1279670
function parseLoopStatement (input) {
  let current = 0
  let char = input[current]

  // parse through keys `each **foo, bar** in x`, which is everything before
  // the word "in"
  const keys = []
  let key = ''
  while (!`${char}${lookahead(3)}`.match(/\s(in|of)\s/)) {
    key += char
    next()

    // if we hit a comma, we're on to the next key
    if (char === ',') {
      keys.push(key.trim())
      key = ''
      next()
    }

    // if we reach the end of the string without getting "in/of", it's an error
    if (typeof char === 'undefined') {
      throw new Error("Loop statement lacking 'in' or 'of' keyword")
    }
  }
  keys.push(key.trim())

  // detect whether it's an in or of
  const loopType = lookahead(2)

  // space before, in/of, space after
  next(4)

  // the rest of the string is evaluated as the array/object to loop
  let expression = ''
  while (current < input.length) {
    expression += char
    next()
  }

  return {keys, expression, loopType}

  // Utility: Move to the next character in the parse
  function next (n = 1) {
    for (let i = 0; i < n; i++) { char = input[++current] }
  }

  // Utility: looks ahead n characters and returns the result
  function lookahead (n) {
    let counter = current
    const target = current + n
    let res = ''
    while (counter < target) {
      res += input[++counter]
    }
    return res
  }
}
1273550
def loop(self):
        
        self.eat(TokenTypes.FOR_LOOP)
        init = NoOp()
        if self.cur_token.type != TokenTypes.SEMI_COLON:
            init = self.assign_statement()
        else:
            self.eat(TokenTypes.SEMI_COLON)

        ctrl = NoOp()
        if self.cur_token.type != TokenTypes.SEMI_COLON:
            ctrl = self.expression()
        self.eat(TokenTypes.SEMI_COLON)

        inc = NoOp()
        if self.cur_token.type != TokenTypes.LBRACE:
            inc = self.assign_statement()

        block = self.block()
        return ForLoop(init, ctrl, inc, block)
632896
def text_base
      check_alive!
      base = Integer(execute('info proc stat').scan(/Start of text: (.*)/).flatten.first)
      execute("set $text = #{base}")
      base
    end
881576
def do_execute(self):
        
        for i in range(
                int(self.resolve_option("min")),
                int(self.resolve_option("max")) + 1,
                int(self.resolve_option("step"))):
            self._output.append(Token(i))
        return None
43400
def main_loop(self):
        
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        port = int(getattr(self, 'port', 1738))
        sock.bind(('127.0.0.1', port))
        while True:
            data, addr = sock.recvfrom(512)
            color = data.decode().strip()
            self.color = self.colors.get(color, color)
678157
function mainloop(){
		// console.log('mainloop()');
		var queue = [];
		if( !_this.canceled && _this.queue.length ){
			// var row = _this.queue.shift();
			queue = _this.queue;
			_this.queue = [];

			it79.ary(
				queue,
				5,
				function(it1, row, idx){
					searchInFile(row, function(){
						if( _this.canceled ){
							it1.break();
							return;
						}
						it1.next();
						return;
					});
				},
				function(){
					if( _this.canceled ){
						complete();
						return;
					}
				}
			);
		}

		if( _this.canceled || statusFilelist == true && !_this.queue.length && countTarget == countDone ){
			complete();
			return;
		}

		_this.mainloopTimer = setTimeout( mainloop, 3);
		return;
	}
466192
function(job, done) {
                    Async.whilst(
                        function() { return !job.properties().isDone; },
                        function(iterationDone) {
                            job.fetch(function(err, job) {
                                if (err) {
                                    callback(err);
                                }
                                else {
                                    // If the user asked for verbose output,
                                    // then write out the status of the search
                                    var properties = job.properties();
                                    if (isVerbose) {
                                        var progress    = (properties.doneProgress * 100.0) + "%";
                                        var scanned     = properties.scanCount;
                                        var matched     = properties.eventCount;
                                        var results     = properties.resultCount;
                                        var stats = "-- " +
                                            progress + " done | " +
                                            scanned  + " scanned | " +
                                            matched  + " matched | " +
                                            results  + " results";
                                        print("\r" + stats + "                                          ");
                                    }
                                    
                                    Async.sleep(1000, iterationDone);
                                }
                            });
                        },
                        function(err) {
                            if (isVerbose) {
                                print("\r");
                            }
                            done(err, job);
                        }
                    );
                }
1170286
def input_loop():
    ''''''
    while mpstate.status.exit != True:
        try:
            if mpstate.status.exit != True:
                line = input(mpstate.rl.prompt)
        except EOFError:
            mpstate.status.exit = True
            sys.exit(1)
        mpstate.input_queue.put(line)
599509
function(loop){
    var test = loop.test;
    this.buf.push('while (' + test + ') {');
    this.visit(loop.block, loop);
    this.buf.push('}');
  }
189807
def visit_while(self, node):
        """"""
        whiles = "while %s:\n%s" % (node.test.accept(self), self._stmt_list(node.body))
        if node.orelse:
            whiles = "%s\nelse:\n%s" % (whiles, self._stmt_list(node.orelse))
        return whiles
648964
function main() {
	// TODO: move loading of inputs into main function
	check(lookupQType(typeDecl.global,[]), {key: snapshot.global}, '', false, null, '<global>');
	if (program.missing) {
		findSuggestions()
	}
	if (program.coverage) {
		printCoverage();
	}
	if (program.stats) {
		console.log("# heap objects = " + snapshot.heap.length)
		console.log("# call signatures = " + num_callsigs_analyzed)
	}
}