From 1e61471d480575d069f96b858e4b46f43ba0530f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Sep 2015 16:20:41 +0200 Subject: For newline escaping, ignore whole thing instead of making it newline To capture literal newline, use quoting. --- build/lexer.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'build') 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. -- cgit v1.1