Closed A-Walrus closed 1 year ago
Sometimes it hangs even with more file content below; but it's easier to reproduce with empty file
it works with use open qw(:std :utf8);
.
If I have it your way, perl says this
perl examples/test.pl
Can't find string terminator ")" anywhere before EOF at examples/test.pl line 6.
So is use open qw(:
a valid syntax?
It is invalid syntax, but the issue is that the parser hangs indefinitely on it. The parser is going to run on code as it is being written, and shouldn't get stuck on invalid code. It should be returning a tree with error nodes.
Got it. Pushed the fix in my latest commit. Will publish a new version sooner.
When trying to parse a file with the text
use open qw(:
and no newline at the end the parse hangs indefinitely.asciinema recording showing the problem: https://asciinema.org/a/XX8rqGY1Npllp1BUM3X7i9vMc
Downstream issue: helix-editor/helix#4070