summaryrefslogtreecommitdiff
path: root/src/binaryen-shell.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-11 19:54:40 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-11 19:54:40 -0800
commited47fbc9ce48e712548d937195e0f7d333da55c4 (patch)
treea9f4ab1242028aaafcf516ffd25d38d571c2ce72 /src/binaryen-shell.cpp
parent2e93ee803907bcea3724b67e80d44d6c02cb2d9a (diff)
downloadbinaryen-ed47fbc9ce48e712548d937195e0f7d333da55c4.tar.gz
binaryen-ed47fbc9ce48e712548d937195e0f7d333da55c4.tar.bz2
binaryen-ed47fbc9ce48e712548d937195e0f7d333da55c4.zip
improve printing
Diffstat (limited to 'src/binaryen-shell.cpp')
-rw-r--r--src/binaryen-shell.cpp6
1 files changed, 4 insertions, 2 deletions
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);
}
}