You are here

public function JSTokenizer::peek in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 8.4 advagg_js_minify/jsminplus.inc \JSTokenizer::peek()
  2. 8.2 advagg_js_minify/jsminplus.inc \JSTokenizer::peek()
  3. 8.3 advagg_js_minify/jsminplus.inc \JSTokenizer::peek()
  4. 7.2 advagg_js_compress/jsminplus.inc \JSTokenizer::peek()
  5. 7 advagg_js_compress/jsminplus.inc \JSTokenizer::peek()
2 calls to JSTokenizer::peek()
JSTokenizer::isDone in advagg_js_compress/jsminplus.inc
JSTokenizer::peekOnSameLine in advagg_js_compress/jsminplus.inc

File

advagg_js_compress/jsminplus.inc, line 1972

Class

JSTokenizer

Code

public function peek() {
  if ($this->lookahead) {
    $next = $this->tokens[$this->tokenIndex + $this->lookahead & 3];
    if ($this->scanNewlines && $next->lineno != $this->lineno) {
      $tt = TOKEN_NEWLINE;
    }
    else {
      $tt = $next->type;
    }
  }
  else {
    $tt = $this
      ->get();
    $this
      ->unget();
  }
  return $tt;
}