diff options
author | Damien <damien.p.george@gmail.com> | 2013-10-18 19:54:31 +0100 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-10-18 19:54:31 +0100 |
commit | 9f770c658f1dad3ea1aa3d32bf08277ba6411806 (patch) | |
tree | 79d7b85389a7e20c48df581b4a0c3ca4b477bca4 /py/lexer.c | |
parent | 4a175e1f110e0d6ad1b784054050be59a6e2c706 (diff) | |
download | micropython-9f770c658f1dad3ea1aa3d32bf08277ba6411806.tar.gz micropython-9f770c658f1dad3ea1aa3d32bf08277ba6411806.zip |
Fix up insertion of newline at end of lexer stream.
Diffstat (limited to 'py/lexer.c')
-rw-r--r-- | py/lexer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/lexer.c b/py/lexer.c index 656dc6d329..7167b93276 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -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; |