diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-18 12:06:16 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-18 12:06:16 +0300 |
commit | dfb1415d5eaf006ee45235f275d17f52d3db38e5 (patch) | |
tree | bc617819ce3ecee2687252b82c9fb664d76b630b /libbuild2/test | |
parent | 96908ec43ed27d9f34da27b6a94a6db357465056 (diff) |
Add dump(ostream,script::lines) (partial implementation)build-script
Diffstat (limited to 'libbuild2/test')
-rw-r--r-- | libbuild2/test/script/lexer.test.cxx | 2 | ||||
-rw-r--r-- | libbuild2/test/script/token.cxx | 6 | ||||
-rw-r--r-- | libbuild2/test/script/token.hxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/libbuild2/test/script/lexer.test.cxx b/libbuild2/test/script/lexer.test.cxx index c728d68..9c64616 100644 --- a/libbuild2/test/script/lexer.test.cxx +++ b/libbuild2/test/script/lexer.test.cxx @@ -56,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; } } diff --git a/libbuild2/test/script/token.cxx b/libbuild2/test/script/token.cxx index df5493f..efeb17b 100644 --- a/libbuild2/test/script/token.cxx +++ b/libbuild2/test/script/token.cxx @@ -12,11 +12,11 @@ namespace build2 namespace script { void - token_printer (ostream& os, const token& t, bool d) + token_printer (ostream& os, const token& t, print_mode m) { // Only quote non-name tokens for diagnostics. // - const char* q (d ? "'" : ""); + const char* q (m == print_mode::diagnostics ? "'" : ""); switch (t.type) { @@ -27,7 +27,7 @@ namespace build2 case token_type::plus: os << q << '+' << q; break; case token_type::minus: os << q << '-' << q; break; - default: build2::script::token_printer (os, t, d); + default: build2::script::token_printer (os, t, m); } } } diff --git a/libbuild2/test/script/token.hxx b/libbuild2/test/script/token.hxx index 5bb2319..dead796 100644 --- a/libbuild2/test/script/token.hxx +++ b/libbuild2/test/script/token.hxx @@ -37,7 +37,7 @@ namespace build2 }; void - token_printer (ostream&, const token&, bool); + token_printer (ostream&, const token&, print_mode); } } } |