Fix up insertion of newline at end of lexer stream.

osx
Damien 2013-10-18 19:54:31 +01:00
parent 4a175e1f11
commit 9f770c658f
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ static void next_char(py_lexer_t *lex) {
lex->chr2 = lex->src_cur[2];
} else {
// EOF
if (lex->chr1 != '\n' && lex->chr1 != '\r') {
if (lex->chr1 != CHR_EOF && lex->chr1 != '\n' && lex->chr1 != '\r') {
lex->chr2 = '\n'; // insert newline at end of file
} else {
lex->chr2 = CHR_EOF;