diff options
author | Johnny Richard <johnny@johnnyrichard.com> | 2023-05-17 15:31:24 +0200 |
---|---|---|
committer | Johnny Richard <johnny@johnnyrichard.com> | 2023-05-17 15:31:24 +0200 |
commit | 15196aa56339d34af9f74b019e6aeff5816e8dcc (patch) | |
tree | ffe7d6ec48bc6018b5eea7e9ef573cd1bbd57c2f /src/main.c | |
parent | ad54ee1182b1549880eddc8b1969d3992d9f7f1d (diff) | |
parent | ea7f65fe1250be8f49edcaaedd3410aed1401648 (diff) |
Merge commit 'ea7f65fe1250be8f49edcaaedd3410aed1401648' of https://git.sr.ht/~carlosmaniero/pipac-clone
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -27,11 +27,11 @@ #include "string_view.h" static void -generate_gas_x86_64_linux(ast_node_t *func) +generate_gas_x86_64_linux(ast_node_t *ns) { gas_assembly_generator_t gen; gas_assembly_generator_init(&gen, stdout); - gas_assembly_generator_compile(&gen, func); + gas_assembly_generator_compile_linux_main(&gen, ns); } static void @@ -89,20 +89,20 @@ main(int argc, char **argv) parser_t parser; parser_init(&parser, &lexer, scope); - ast_node_t *func = parser_parse_function_declaration(&parser); + ast_node_t *ns = parser_parse_ns(&parser); - if (func == NULL) { + if (ns == NULL) { parser_print_errors(&parser); return EXIT_FAILURE; } if (should_dump_ast) { - pretty_print_ast(func); + pretty_print_ast(ns); } else { - generate_gas_x86_64_linux(func); + generate_gas_x86_64_linux(ns); } scope_destroy(scope); - ast_node_destroy(func); + ast_node_destroy(ns); return EXIT_SUCCESS; } |