*/
read_newline : function(/**JSDOC.TokenStream*/stream, tokens) {
var found = "";
-
+ var line = this.line;
while (!stream.look().eof && Lang.isNewline(stream.look())) {
this.line++;
found += stream.next();
}
if (this.keepWhite) {
var last = tokens.pop();
- if (last.name != "WHIT") {
+ if (last && last.name != "WHIT") {
tokens.push(last);
}
- tokens.push(new Token(found, "WHIT", "NEWLINE", this.line));
+ tokens.push(new Token(found, "WHIT", "NEWLINE", line));
}
return true;
},