-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
parse $ followed by a ' inside ind_string #773
Conversation
<IND_STRING>(\'|\$) { | ||
char str[2] = "'"; | ||
str[0] = yytext[0]; | ||
yylval->e = new ExprIndStr(str); | ||
return IND_STR; | ||
} | ||
<IND_STRING>. return yytext[0]; /* just in case: shouldn't be reached */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funilly, there's now a warning that this rule is never matched.
This is not yet true for the STRING case, I suppose because there this rule (that shouldn't be matched) is matched when a string ends with \ or $ at the end of a file. (this is still a little 'bad' because whenever it is matched we get an error unexpected $undefined from bison)
Previously, e. g. ''$'' or '' $' '' would fail with 'unexpected , expecting IND_STR or DOLLAR_CURLY or IND_STRING_CLOSE' This fixes NixOS#772
Waiting for @edolstra as the last two got reverted. |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
* team membership list follow up Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Previously, e. g. ''$'' or '' $' '' would fail with 'unexpected $undefined, expecting IND_STR or DOLLAR_CURLY or IND_STRING_CLOSE'
This fixes #772