aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/token.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-18 12:06:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-05-18 12:06:16 +0300
commitdfb1415d5eaf006ee45235f275d17f52d3db38e5 (patch)
treebc617819ce3ecee2687252b82c9fb664d76b630b /libbuild2/script/token.cxx
parent96908ec43ed27d9f34da27b6a94a6db357465056 (diff)
Add dump(ostream,script::lines) (partial implementation)build-script
Diffstat (limited to 'libbuild2/script/token.cxx')
-rw-r--r--libbuild2/script/token.cxx6
1 files changed, 3 insertions, 3 deletions
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);
}
}
}