From dfb1415d5eaf006ee45235f275d17f52d3db38e5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 18 May 2020 12:06:16 +0300 Subject: Add dump(ostream,script::lines) (partial implementation) --- libbuild2/test/script/token.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2/test/script/token.cxx') 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); } } } -- cgit v1.1