Permalink
Browse files

better handling of the queue when ignoring

  • Loading branch information...
1 parent 2370c9b commit 878b2ef1b0c75d2c6ab3028d3b0ac8b03d37573b @Floby committed Apr 13, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Parser.js
View
@@ -4,9 +4,11 @@ var assert = require('assert');
function makeIgnore(ignored) {
return function ignore(token, type, next) {
- if(type === 'eof' && ignored.length) {
- console.warn('ignored %d tokens', ignored.length);
+ if(type === 'eof') {
this._ignored = ignored;
+ if(ignored.length) {
+ console.warn('ignored %d tokens', ignored.length);
+ }
return;
}
ignored.push(token);

0 comments on commit 878b2ef

Please sign in to comment.