Same name and namespace in other branches
  1. 5.0.x advagg_js_minify/jsminplus.inc \JSTokenizer::peek() 1 comment
  2. 7.x-1.x advagg_js_compress/jsminplus.inc \JSTokenizer::peek() 1 comment
  3. 7.x-2.x advagg_js_compress/jsminplus.inc \JSTokenizer::peek() 1 comment
  4. 8.x-2.x advagg_js_minify/jsminplus.inc \JSTokenizer::peek() 1 comment
  5. 8.x-3.x advagg_js_minify/jsminplus.inc \JSTokenizer::peek() 1 comment
  6. 8.x-4.x advagg_js_minify/jsminplus.inc \JSTokenizer::peek() 1 comment
2 calls to JSTokenizer::peek()
JSTokenizer::isDone in advagg_js_minify/jsminplus.inc
JSTokenizer::peekOnSameLine in advagg_js_minify/jsminplus.inc

File

advagg_js_minify/jsminplus.inc, line 1988

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;
}