mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
* Disallow unescaped $ in string literals.
This commit is contained in:
parent
0064599a27
commit
7276e194ee
@ -73,10 +73,7 @@ inherit { return INHERIT; }
|
||||
}
|
||||
|
||||
\" { BEGIN(STRING); return '"'; }
|
||||
<STRING>([^\$\"\\]|\\.|\$[^\{\$])+ {
|
||||
/* Note: a dollar *is* allowed as-is in a string, as long as it's
|
||||
not followed by a open brace. This should probably be disallowed
|
||||
eventually. */
|
||||
<STRING>([^\$\"\\]|\\.)+ {
|
||||
yylval->t = unescapeStr(yytext); /* !!! alloc */
|
||||
return STR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user