aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/token.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/test/script/token.cxx')
-rw-r--r--libbuild2/test/script/token.cxx6
1 files changed, 3 insertions, 3 deletions
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);
}
}
}