idank / bashlex

Python parser for bash
GNU General Public License v3.0
550 stars 94 forks source link

fix backslash newline and multiple newlines at end #80

Closed lacraig2 closed 1 year ago

lacraig2 commented 2 years ago

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.

idank commented 2 years ago

nit: please use this commit message tokenizer: fix backslash newline and multiple newlines at end (fixes #...)

hsiam261 commented 1 year ago

Is anyone still working on this PR? If not, I can pick it up. @lacraig2 @idank

idank commented 1 year ago

Doesn't look like it, but it looks almost ready too, so feel free to take over.

hsiam261 commented 1 year ago

It seems like I don't have the permission to add changes in this PR. Should I create a new pull request? @idank

lacraig2 commented 1 year ago

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.

hsiam261 commented 1 year ago

We can close this PR as it got reopened and merged on https://github.com/idank/bashlex/pull/82.