summaryrefslogtreecommitdiff
path: root/src/pipac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pipac.c')
-rw-r--r--src/pipac.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pipac.c b/src/pipac.c
index f1e5865..0df4a08 100644
--- a/src/pipac.c
+++ b/src/pipac.c
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "lexer.h"
+#include "parser.h"
void
print_usage()
@@ -46,8 +47,12 @@ main(int argc, char **argv)
lexer_init(&lexer, filepath);
printf("[INFO]: %ld bytes loaded [filename='%s']\n", lexer.srclen, lexer.filepath);
+
+ parser_t parser;
+ parser_init(&parser, &lexer);
+ ast_function_t func = parser_parse_function(&parser);
- print_tokens(&lexer);
+ printf("function name='%s' and return type '%d' with value %d\n", func.name, func.return_type, func.body.number);
return EXIT_SUCCESS;
}