diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-04-28 08:48:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 15:47:28 +0200 |
commit | b808c255b6a9ddba085bf5646e7d20ec344f2e2d (patch) | |
tree | 32730291f7e6de8ef0a227905520dd66fb4ec0f3 /libbuild2/test/script/lexer.test.cxx | |
parent | 3552356a87402727e663131994fa87f48b3cd4fb (diff) |
Initial support for ad hoc recipes (still work in progress)
Diffstat (limited to 'libbuild2/test/script/lexer.test.cxx')
-rw-r--r-- | libbuild2/test/script/lexer.test.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libbuild2/test/script/lexer.test.cxx b/libbuild2/test/script/lexer.test.cxx index 1512e58..9c64616 100644 --- a/libbuild2/test/script/lexer.test.cxx +++ b/libbuild2/test/script/lexer.test.cxx @@ -32,9 +32,6 @@ namespace build2 else if (s == "first-token") m = lexer_mode::first_token; else if (s == "second-token") m = lexer_mode::second_token; else if (s == "variable-line") m = lexer_mode::variable_line; - else if (s == "command-expansion") m = lexer_mode::command_expansion; - else if (s == "here-line-single") m = lexer_mode::here_line_single; - else if (s == "here-line-double") m = lexer_mode::here_line_double; else if (s == "description-line") m = lexer_mode::description_line; else if (s == "variable") m = lexer_mode::variable; else assert (false); @@ -46,14 +43,10 @@ namespace build2 // Some modes auto-expire so we need something underneath. // - bool u (m == lexer_mode::first_token || - m == lexer_mode::second_token || - m == lexer_mode::variable_line || - m == lexer_mode::description_line || - m == lexer_mode::variable); + bool u (m != lexer_mode::command_line); path_name in ("<stdin>"); - lexer l (cin, in, u ? lexer_mode::command_line : m); + lexer l (cin, in, lexer_mode::command_line); if (u) l.mode (m); @@ -63,7 +56,7 @@ namespace build2 { // Print each token on a separate line without quoting operators. // - t.printer (cout, t, false); + t.printer (cout, t, print_mode::normal); cout << endl; } } |