Commit c419a4f5 authored by nagayama15's avatar nagayama15

feature: Output the result

parent e5319c9b
......@@ -16,9 +16,20 @@ int main(int argc, char *argv[]) {
// Read the input module
wasm::Module module;
wasm::ModuleReader{}.read(inputFile, module);
// Output the result
wasm::ModuleWriter{}.writeText(module, "");
} catch (const wasm::ParseException &e) {
e.dump(std::cerr);
return 1;
} catch (const std::exception &e) {
fmt::print(std::cerr, "exception: {}\n", e.what());
return 1;
} catch (...) {
fmt::print(std::cerr, "unknown exception\n");
return 1;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment