diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-20 11:27:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-20 11:27:42 +0200 |
commit | e9da884cc5e87b7a677871d9f46c7fe5377b1d26 (patch) | |
tree | 78f124bb7ca9945d87b131199e96a6857255b2d0 /libbuild2/cc/lexer.cxx | |
parent | 01665e5501954961b6f72ce50d2fc3cbfadcddf6 (diff) |
Fix raw string literal lexing bug in cc:lexer (GH issue #268)
Diffstat (limited to 'libbuild2/cc/lexer.cxx')
-rw-r--r-- | libbuild2/cc/lexer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbuild2/cc/lexer.cxx b/libbuild2/cc/lexer.cxx index beeb970..467c0b1 100644 --- a/libbuild2/cc/lexer.cxx +++ b/libbuild2/cc/lexer.cxx @@ -734,8 +734,8 @@ namespace build2 // R"<delimiter>(<raw_characters>)<delimiter>" // // Where <delimiter> is a potentially-empty character sequence made of - // any source character but parentheses, backslash and spaces. It can be - // at most 16 characters long. + // any source character but parentheses, backslash, and spaces (in + // particular, it can be `"`). It can be at most 16 characters long. // // Note that the <raw_characters> are not processed in any way, not even // for line continuations. @@ -750,7 +750,7 @@ namespace build2 { c = geth (); - if (eos (c) || c == '\"' || c == ')' || c == '\\' || c == ' ') + if (eos (c) || c == ')' || c == '\\' || c == ' ') fail (l) << "invalid raw string literal"; if (c == '(') |