blob: e9a12b9154cd818bd6eabdb5b0030c8036dbbe5b (
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());
VariableStackBindings bindings;
unsigned label_count = 0;
ast->printAsm(bindings, label_count);
}
catch(std::string error_msg)
{
fprintf(stderr, "%s\n", error_msg.c_str());
}
catch(...)
{
fprintf(stderr, "Error : Exception thrown\n");
}
return 0;
}
|