waypoint ... somethings still a little off with the parser

This commit is contained in:
Jeremy Ashkenas
2010-02-12 19:45:20 -05:00
parent d61aaf393a
commit 207ec81821
7 changed files with 174 additions and 166 deletions

View File

@@ -228,7 +228,9 @@
this.token('OUTDENT', last_indent);
move_out -= last_indent;
}
this.token('TERMINATOR', "\n");
if (!(this.tag() === 'TERMINATOR')) {
this.token('TERMINATOR', "\n");
}
return true;
};
// Matches and consumes non-meaningful whitespace.
@@ -244,7 +246,7 @@
// Multiple newlines get merged together.
// Use a trailing \ to escape newlines.
lex.prototype.newline_token = function newline_token(newlines) {
if (!(this.value() === "\n")) {
if (!(this.tag() === 'TERMINATOR')) {
this.token('TERMINATOR', "\n");
}
return true;