Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
9f770c65
Commit
9f770c65
authored
Oct 18, 2013
by
Damien
Browse files
Fix up insertion of newline at end of lexer stream.
parent
4a175e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/lexer.c
View file @
9f770c65
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment