Properly handling trailing newline
Closed this issue · 1 comments
isti115 commented
Extending the second branch of topLevel
as we've discussed (ws >> eof
) was not enough, as the parser eagerly commits to parsing a top-level definition as soon as it gets to the ending newline with zero indentation.
I have added a workaround in e7395d9 by extending the indentation check with a condition that ensures that the file does not end immediately after the newline character, but there is probably a cleaner solution.