abouttreesummaryrefslogcommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7d8d5c7..199f04d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -7,6 +7,7 @@
#include "toc.h"
#include "repr.h"
#include "repr_get.h"
+#include "check.h"
using namespace antlr4;
@@ -33,15 +34,12 @@ int main(int argc, const char * argv[]) {
//std::cout << "Parse Tree: " << s << std::endl;
Program prg = getProgram(prog);
- std::cout << "Variables:\n";
- for (auto v : prg.variables)
- std::cout << " " << v.name << endl;
- std::cout << "Functions:\n";
- for (auto f : prg.functions)
- std::cout << " " << f.name << endl;
tocProgram(std::cout, prg);
+ if (!checkProgram(prg))
+ std::cerr << "Error" << std::endl;
+
//std::ofstream ofs("output.c");
//tocProg(ofs, prg);
//ofs.close();