if (this.read_regx(stream, tokens)) continue;
if (this.read_numb(stream, tokens)) continue;
if (this.read_punc(stream, tokens)) continue;
- if(typeof(tokens) == 'undefined') {console.log('empty????');}
if (this.read_newline(stream, tokens)) continue;
if (this.read_space(stream, tokens)) continue;
if (this.read_word(stream, tokens)) continue;
if (this.collapseWhite) {
found = "\n";
}
- if (this.keepWhite) {
- var last = tokens.pop();
+ if (this.keepWhite) {
+ var last = tokens ? tokens.pop() : false;
if (last && last.name != "WHIT") {
tokens.push(last);
}