colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

"Failure: lexing: empty token." on scripts ending on a comment without newline. #97

Closed Niols closed 5 years ago

Niols commented 5 years ago

Morbig fails when parsing a file that ends on a comment but without newline.

$ printf 'echo foo\n# this is a comment' > comment-no-newline
$ morbig --as none comment-no-newline 
Failure: lexing: empty token.