Commit 9f770c65 authored by Damien's avatar Damien
Browse files

Fix up insertion of newline at end of lexer stream.

parent 4a175e1f
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment