aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-19 11:13:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-19 11:13:11 +0200
commit0cbd2d1d03ff96eb668fc6a14311d96ed0f9f8b5 (patch)
tree74fed02118a8ea7b78e8e069981301a6c511f633 /libbuild2/parser.cxx
parent86bd93d16bfb2d44c6d894db43b7ccd29374fccb (diff)
Restore newline escaping (line continuations) in double-quoted strings
Also make effective escaping in buildspec and command line variable overrides consistent with double-quoted strings.
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r--libbuild2/parser.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx
index 5128979..4350c88 100644
--- a/libbuild2/parser.cxx
+++ b/libbuild2/parser.cxx
@@ -8163,11 +8163,12 @@ namespace build2
buildspec parser::
parse_buildspec (istream& is, const path_name& in)
{
- // We do "effective escaping" and only for ['"\$(] (basically what's
- // necessary inside a double-quoted literal plus the single quote).
+ // We do "effective escaping" of the special `'"\$(` characters, line
+ // continuations, plus `)` for symmetry (basically what's escapable inside
+ // a double-quoted literal plus the single quote).
//
path_ = &in;
- lexer l (is, *path_, 1 /* line */, "\'\"\\$(");
+ lexer l (is, *path_, 1 /* line */, "\'\"\\$()\n");
lexer_ = &l;
root_ = &ctx->global_scope.rw ();