Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused if string literal begins with - #16

Open
leonerd opened this issue Mar 14, 2022 · 2 comments · May be fixed by #18
Open

Confused if string literal begins with - #16

leonerd opened this issue Mar 14, 2022 · 2 comments · May be fixed by #18
Labels
OHMAGERD What on earth?

Comments

@leonerd
Copy link
Owner

leonerd commented Mar 14, 2022

A string literal like "-I" confuses the parser.

perl-wtf-1

Without the leading "-" as the first character within it, it's fine.

perl-wtf-2
perl-wtf-3

@leonerd leonerd added the OHMAGERD What on earth? label Mar 14, 2022
@leonerd
Copy link
Owner Author

leonerd commented Mar 14, 2022

Of course, since it accepts "-D..." first, the answer isn't quite that simple. It seems more subtle even, because if I simply insert a linefeed after the comma then it parses fine:

perl-wtf-4

@leonerd
Copy link
Owner Author

leonerd commented Mar 16, 2022

Actually it seems that a leading "+" symbol can confuse it too. I really now have no idea what's going on:

perl-wtf-5

@rabbiveesh rabbiveesh linked a pull request Mar 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OHMAGERD What on earth?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant