aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/name.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-03-10 17:31:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-03-11 12:57:10 +0300
commita061301ab789d00027f29f389627792dccbe1748 (patch)
tree79c83ae472f6fca965bbe3fc05a9ba3a16197878 /libbuild2/name.cxx
parent3fa110a72463dd3b4849d9b2d8f53ab9cb62d86b (diff)
Allow effective quoting for names that need curly braces in their representations
Diffstat (limited to 'libbuild2/name.cxx')
-rw-r--r--libbuild2/name.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/libbuild2/name.cxx b/libbuild2/name.cxx
index a285459..6c48bb3 100644
--- a/libbuild2/name.cxx
+++ b/libbuild2/name.cxx
@@ -90,10 +90,9 @@ namespace build2
bool curly = false)
{
// We don't expect the effective quoting mode to be specified for the
- // name patterns or names that need curly braces in their
- // representations.
+ // name patterns.
//
- assert (q != quote_mode::effective || (!pat && !curly));
+ assert (q != quote_mode::effective || !pat);
// Special characters, path pattern characters, and regex pattern
// characters. The latter only need to be quoted in the first position
@@ -121,7 +120,7 @@ namespace build2
};
char esc[] = {
- '$', '(', // Token endings.
+ '{', '}', '$', '(', // Token endings.
' ', '\t', '\n', '#', // Spaces.
'"', // Quoting.
pair, // Pair separator, if any.