Restore onToken functionality for loose parser

This commit is contained in:
Marijn Haverbeke 2015-01-13 09:52:57 +01:00
parent d1f95ece42
commit 1b8069e48c

View File

@ -66,6 +66,8 @@
ahead.length = 0; ahead.length = 0;
token = ahead.shift() || readToken(forceRegexp); token = ahead.shift() || readToken(forceRegexp);
if (options.onToken)
options.onToken(token);
if (token.start >= nextLineStart) { if (token.start >= nextLineStart) {
while (token.start >= nextLineStart) { while (token.start >= nextLineStart) {