-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
32 lines (25 loc) · 871 Bytes
/
main.cpp
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
29
30
31
32
#include "src/include/config.h"
#include "src/include/jit.h"
#include "src/include/text.h"
#include "src/include/tokens.h"
#include "src/include/IR.h"
int main (int argc, char *argv[])
{
log_init("jit.html");
int n_file_name_arg = 1;
int execution_status = check_arguments(argc, argv, &n_file_name_arg);
if (execution_status)
return execution_status;
tokens_t tokens = {};
execution_status = parse_my_binary_file(&tokens, argv[n_file_name_arg]);
if (execution_status)
goto terminate_process;
execution_status = save_tokens_in_text (&tokens, "IR.dump");
if (execution_status)
goto terminate_process;
execution_status = jit(&tokens);
terminate_process:
tokens_dtor(&tokens);
log_dtor();
return execution_status;
}