aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-25 13:42:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-28 10:10:44 +0200
commitbb02e152dc036879ab0b2d1d8aa2cb19084b8e16 (patch)
treeca3f3e950351f5bfadeec5b0ecb31d6c5bae084f /libbuild2/script
parentaf5fa9e744acf6da12f2eab7f44810195c0d3ecd (diff)
Recognize quoting of first character in token
Use this to relax the pattern inclusion/exclusion syntax to only require unquoted +/-.
Diffstat (limited to 'libbuild2/script')
-rw-r--r--libbuild2/script/lexer.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/script/lexer.cxx b/libbuild2/script/lexer.cxx
index a18c1df..7577149 100644
--- a/libbuild2/script/lexer.cxx
+++ b/libbuild2/script/lexer.cxx
@@ -127,7 +127,7 @@ namespace build2
bool q (m == lexer_mode::here_line_double);
return token (t, string (), sep,
- (q ? quote_type::double_ : quote_type::unquoted), q,
+ (q ? quote_type::double_ : quote_type::unquoted), q, q,
ln, cn,
token_printer);
};
@@ -180,7 +180,7 @@ namespace build2
auto make_token = [&sep, &c] (type t, string v = string ())
{
return token (t, move (v), sep,
- quote_type::unquoted, false,
+ quote_type::unquoted, false, false,
c.line, c.column,
token_printer);
};