toonn
2698fe8611
manual: Update Attribute Set section to exclude indented strings and URIs
Indented strings and URIs are string literals but they are not allowed
as names for attrsets, `let` or `inherit`. The following snippets
illustrate that they lead to syntax errors.
==> examples/ind_str-attr.nix <==
{
''indented string'' = "error: syntax error, expecting '}'";
}
==> examples/ind_str-inherit.nix <==
{ inherit ({ "non-indented string" = "error: syntax error, expecting ';'"; })
''non-indented string'';
}
==> examples/ind_str-let.nix <==
let
''indented string'' = "error: syntax error, expecting 'in'";
in
true
==> examples/uri-attr.nix <==
{
http://example.org/foo.tar.bz2 = "error: syntax error, expecting '}'";
}
==> examples/uri-inherit.nix <==
{ inherit ({ "http://example.org/foo.tar.bz2" = "error: syntax error, expecting ';'"; })
http://example.org/foo.tar.bz2;
}
==> examples/uri-let.nix <==
let
http://example.org/foo.tar.bz2 = "error: syntax error, expecting 'in'";
in
true
Change-Id: I6774af93baf9f533877642a563775667c518ea88
2026-06-06 14:52:54 +00:00
..
2026-05-26 19:40:07 +00:00
2026-06-06 14:52:54 +00:00
2024-03-29 22:57:40 -07:00
2025-11-26 23:50:28 +01:00
2025-11-26 23:50:28 +01:00
2026-05-26 19:40:07 +00:00
2022-12-05 11:01:46 +01:00
2024-04-11 13:32:06 +00:00
2026-02-02 15:08:49 +01:00
2024-04-10 15:04:34 +02:00
2026-02-20 23:32:33 +00:00
2024-06-24 14:00:43 -07:00
2014-03-12 14:24:29 +01:00
2024-05-14 14:28:01 -07:00
2024-08-04 20:41:19 -07:00
2024-06-24 14:00:43 -07:00
2025-12-03 10:01:55 +00:00