1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Allow "bare" dynamic attrs

Now, in addition to a."${b}".c, you can write a.${b}.c (applicable
wherever dynamic attributes are valid).

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2014-01-06 10:27:26 -05:00 committed by Eelco Dolstra
parent e640d67144
commit f9913f4422
4 changed files with 21 additions and 0 deletions

View file

@ -117,6 +117,8 @@ or { return OR_KW; }
return INT;
}
\$\{ { return DOLLAR_CURLY; }
\" { BEGIN(STRING); return '"'; }
<STRING>([^\$\"\\]|\$[^\{\"]|\\.)+ {
/* !!! Not quite right: we want a follow restriction on

View file

@ -509,6 +509,7 @@ attr
string_attr
: '"' string_parts '"' { $$ = $2; }
| DOLLAR_CURLY expr '}' { $$ = $2; }
;
expr_list