diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-03 17:54:02 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 09:26:37 +0200 |
commit | 554475390b6d2912614778fe50788a09f99ac6a4 (patch) | |
tree | 2cc756aa363f0697291b4cbf8e7a9365bf65629b /build2/test/script/lexer.cxx | |
parent | 7ebe4aa8d07e8845f1669e2d43fbe6071d3ee463 (diff) |
Implement testscript inclusion support
Diffstat (limited to 'build2/test/script/lexer.cxx')
-rw-r--r-- | build2/test/script/lexer.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/test/script/lexer.cxx b/build2/test/script/lexer.cxx index b7a9f78..7a4e12c 100644 --- a/build2/test/script/lexer.cxx +++ b/build2/test/script/lexer.cxx @@ -143,7 +143,7 @@ namespace build2 xchar c (get ()); uint64_t ln (c.line), cn (c.column); - auto make_token = [sep, ln, cn] (type t) + auto make_token = [&sep, ln, cn] (type t) { return token (t, sep, ln, cn, token_printer); }; @@ -173,6 +173,7 @@ namespace build2 if (m == lexer_mode::variable_line) state_.pop (); + sep = true; // Treat newline as always separated. return make_token (type::newline); } @@ -426,7 +427,7 @@ namespace build2 { get (); state_.pop (); // Expire the description mode. - return token (type::newline, false, ln, cn, token_printer); + return token (type::newline, true, ln, cn, token_printer); } string lexeme; |