public function JSTokenizer::peek in Advanced CSS/JS Aggregation 8.2
Same name and namespace in other branches
- 8.4 advagg_js_minify/jsminplus.inc \JSTokenizer::peek()
- 8.3 advagg_js_minify/jsminplus.inc \JSTokenizer::peek()
- 6 advagg_js_compress/jsminplus.inc \JSTokenizer::peek()
- 7.2 advagg_js_compress/jsminplus.inc \JSTokenizer::peek()
- 7 advagg_js_compress/jsminplus.inc \JSTokenizer::peek()
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 - JSMinPlus version 1.4
Class
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;
}