From ed47fbc9ce48e712548d937195e0f7d333da55c4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 11 Nov 2015 19:54:40 -0800 Subject: improve printing --- src/binaryen-shell.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/binaryen-shell.cpp b/src/binaryen-shell.cpp index 0d6284f98..e0f524122 100644 --- a/src/binaryen-shell.cpp +++ b/src/binaryen-shell.cpp @@ -199,6 +199,7 @@ int main(int argc, char **argv) { if (debug) std::cout << root << '\n'; // A .wast may have multiple modules, with some asserts after them + bool checked = false; size_t i = 0; while (i < root.size()) { if (debug) std::cerr << "parsing s-expressions to wasm...\n"; @@ -219,6 +220,7 @@ int main(int argc, char **argv) { Element& curr = *root[i]; IString id = curr[0]->str(); if (id == MODULE) break; + checked = true; Colors::red(std::cerr); std::cerr << i << '/' << (root.size()-1); Colors::green(std::cerr); @@ -269,10 +271,10 @@ int main(int argc, char **argv) { } } - if (debug) { + if (checked) { Colors::green(std::cerr); Colors::bold(std::cerr); - std::cerr << "\ndone.\n"; + std::cerr << "all checks passed.\n"; Colors::normal(std::cerr); } } -- cgit v1.2.3