diff options
author | c | 2024-03-09 11:01:23 -0500 |
---|---|---|
committer | c | 2024-03-09 11:01:23 -0500 |
commit | 099fd363f7972ad7e1c48f5fd9ab83aa38a40ea2 (patch) | |
tree | 7a2b81f5fba6630ec5d1da469135539007c16f3c /src/main.c | |
parent | 9a7e88e33213135da7c8fa3607ca455d997f4a39 (diff) |
Introduced mortality.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -10,7 +10,7 @@ int main(int argc, char* argv[]) { /* Get source. */ src = source_get(argv[1]); - LOG_INFF("Source: %s", src); + LOG_DBGF("Source: %s", src); /* Create pre-processor. */ pp = pp_init(src); @@ -20,7 +20,7 @@ int main(int argc, char* argv[]) { pp_run(pp); free(src); src = pp->psrc; - LOG_INFF("pre-processed source: %s", pp->psrc); + LOG_DBGF("pre-processed source: %s", pp->psrc); /* destroy pre-processor */ pp_destroy(pp); LOG_DBG("preprocessor ran"); @@ -39,12 +39,16 @@ int main(int argc, char* argv[]) { /* Create the parser from the lexer's tokens. */ parser = parser_init(lexer->tokenl); parser_run(parser); +#ifdef DBG tree_print(parser->tree, 0); +#endif doer_t* doer = doer_init(parser->tree); doer_do_block(doer); target_print(doer->targets); + sudden_death: + /* Clean up. */ doer_destroy(doer); token_destroy(lexer->tokenl); |