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/script/token.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbuild2/script/token.cxx') diff --git a/libbuild2/script/token.cxx b/libbuild2/script/token.cxx index be0aa54..6c9de87 100644 --- a/libbuild2/script/token.cxx +++ b/libbuild2/script/token.cxx @@ -10,13 +10,13 @@ namespace build2 namespace script { void - token_printer (ostream& os, const token& t, bool d) + token_printer (ostream& os, const token& t, print_mode m) { const string& v (t.value); // Only quote non-name tokens for diagnostics. // - const char* q (d ? "'" : ""); + const char* q (m == print_mode::diagnostics ? "'" : ""); switch (t.type) { @@ -39,7 +39,7 @@ namespace build2 case token_type::out_file_ovr: os << q << ">=" << v << q; break; case token_type::out_file_app: os << q << ">+" << v << q; break; - default: build2::token_printer (os, t, d); + default: build2::token_printer (os, t, m); } } } -- cgit v1.1