mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Disallow unescaped $ in string literals.
This commit is contained in:
parent
0064599a27
commit
7276e194ee
1 changed files with 1 additions and 4 deletions
|
@ -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 a new issue