abouttreesummaryrefslogcommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPatrick Schönberger2021-07-29 09:58:14 +0200
committerPatrick Schönberger2021-07-29 09:58:14 +0200
commitb64d16088b29615d222d33450cf0315467400e59 (patch)
tree7fe3a5bdbe33fe286ad25282ce955bd906097755 /src/main.cpp
parent45409c781a9e35df68c43b1e2f028d30bf90c0a0 (diff)
downloadtoc-b64d16088b29615d222d33450cf0315467400e59.tar.gz
toc-b64d16088b29615d222d33450cf0315467400e59.zip
toc now uses internal representation instead of ast
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a7742ac..7d8d5c7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,12 +32,6 @@ int main(int argc, const char * argv[]) {
//std::cout << "Parse Tree: " << s << std::endl;
- //toc(std::cout, prog);
-
- //std::ofstream ofs("output.c");
- //toc(ofs, prog);
- //ofs.close();
-
Program prg = getProgram(prog);
std::cout << "Variables:\n";
for (auto v : prg.variables)
@@ -46,5 +40,11 @@ int main(int argc, const char * argv[]) {
for (auto f : prg.functions)
std::cout << " " << f.name << endl;
+ tocProgram(std::cout, prg);
+
+ //std::ofstream ofs("output.c");
+ //tocProg(ofs, prg);
+ //ofs.close();
+
return 0;
} \ No newline at end of file