diff options
Diffstat (limited to 'lc.c')
| -rw-r--r-- | lc.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -1,26 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include "lexer.h" -#include "parser.h" - -int main(void) -{ - FILE *fp = fopen("examples/hello_world.ll", "r"); - fseek(fp, 0, SEEK_END); - size_t length = ftell(fp); - fseek(fp, 0, SEEK_SET); - - char *src = malloc(length + 1); - fread(src, 1, length, fp); - src[length] = '\0'; - token *head = lexer_parse(src); - - if (!head) { - printf("Parsing error!\n"); - exit(1); - } - - ir_parse(head); - - return 0; -} |
