Open bAndie91 opened 4 years ago
I was unable to reproduce this issue using version 0.18.
Hey, thanks for going over these issues. It would be extra awesome if you could add a test case that shows these parse correctly.
@idank: Absolutely!
In a Python interactive session (using bashlex v0.18):
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bashlex
>>> bashlex.parse('cmd1\ncmd2 \ncmd3\n')
[CommandNode(parts=[WordNode(parts=[] pos=(0, 4) word='cmd1')] pos=(0, 4)), CommandNode(parts=[WordNode(parts=[] pos=(5, 9) word='cmd2')] pos=(5, 9)), CommandNode(parts=[WordNode(parts=[] pos=(11, 15) word='cmd3')] pos=(11, 15))]