diff options
Diffstat (limited to 'c_compiler/src/compiler_main.cpp')
-rw-r--r-- | c_compiler/src/compiler_main.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/c_compiler/src/compiler_main.cpp b/c_compiler/src/compiler_main.cpp index dcc9e09..e9a12b9 100644 --- a/c_compiler/src/compiler_main.cpp +++ b/c_compiler/src/compiler_main.cpp @@ -6,20 +6,21 @@ Node* parseAST(); -int main(int argc, char *argv[]) +int main(int, char**) { - (void)argc, (void)argv; - - try { + try + { std::unique_ptr<Node> ast(parseAST()); VariableStackBindings bindings; unsigned label_count = 0; - ast->printAsm(bindings, label_count); - - } catch(std::string error_msg) { + ast->printAsm(bindings, label_count); + } + catch(std::string error_msg) + { fprintf(stderr, "%s\n", error_msg.c_str()); - - } catch(...) { + } + catch(...) + { fprintf(stderr, "Error : Exception thrown\n"); } |