blob: f9a8ec58f660af6c9500b19cfe19cc2476a4dfd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "node.hpp"
#include "bindings.hpp"
#include <cstdio>
#include <string>
Node* parseAST();
int main(int, char**)
{
try
{
std::unique_ptr<Node> ast(parseAST());
Bindings bindings;
int label_count = 0;
ast->printAsm(bindings, label_count);
}
catch(const std::exception& e)
{
fprintf(stderr, "%s\n", e.what());
}
catch(...)
{
fprintf(stderr, "Error : Exception thrown\n");
}
return 0;
}
|