aboutsummaryrefslogtreecommitdiff
path: root/build/lexer.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-09 16:20:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-09 16:20:41 +0200
commit1e61471d480575d069f96b858e4b46f43ba0530f (patch)
tree9a73101d555a2212fa68a36626fb850496da8e03 /build/lexer.cxx
parentea66709a853255c7957a8a7907fd21fa7f6cfd3f (diff)
For newline escaping, ignore whole thing instead of making it newline
To capture literal newline, use quoting.
Diffstat (limited to 'build/lexer.cxx')
-rw-r--r--build/lexer.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/build/lexer.cxx b/build/lexer.cxx
index e083b4a..b680234 100644
--- a/build/lexer.cxx
+++ b/build/lexer.cxx
@@ -225,7 +225,9 @@ namespace build
case '\\':
{
get ();
- lexeme += escape ();
+ c = escape ();
+ if (c != '\n') // Ignore.
+ lexeme += c;
continue;
}
case '\'':
@@ -362,10 +364,7 @@ namespace build
get ();
if (peek () == '\n')
- {
- r = true;
- break;
- }
+ break; // Ignore.
unget (c);
// Fall through.