Closed lacraig2 closed 1 year ago
nit: please use this commit message tokenizer: fix backslash newline and multiple newlines at end (fixes #...)
Is anyone still working on this PR? If not, I can pick it up. @lacraig2 @idank
Doesn't look like it, but it looks almost ready too, so feel free to take over.
It seems like I don't have the permission to add changes in this PR. Should I create a new pull request? @idank
Unfortunately I haven't had time to work on this in a while and likely won't in the near term.
Feel free to take over @hsiam261. I believe that will require issuing a new PR.
We can close this PR as it got reopened and merged on https://github.com/idank/bashlex/pull/82.
This PR fixes two active issues: #79 and #74.
It fixes the backslash newline issue by moving the tokenizer forward another index in the case that we see '\' followed by '\n'.
The second fix is a very specific one related to multiple newlines at the end of a file.
We fix this in yacc.py by explicitly checking for that condition.