summaryrefslogtreecommitdiff
path: root/src/ast_pretty_printer.c
diff options
context:
space:
mode:
authorCarlos Maniero <carlos@maniero.me>2023-05-10 16:53:05 -0300
committerCarlos Maniero <carlos@maniero.me>2023-05-10 19:23:52 -0300
commit3129b741064c2b4f2c6c2408bd42cc83f7341ea8 (patch)
treeec499cf238b266f963f8b6524b4b96190ccac9bf /src/ast_pretty_printer.c
parent75639fbf01bd6ae1212521b6cf822025eb8b598d (diff)
gas: Generate function call
This is an initial commit that enables function calls. At this point only functions with no parameters is going to work. Signed-off-by: Carlos Maniero <carlos@maniero.me>
Diffstat (limited to 'src/ast_pretty_printer.c')
-rw-r--r--src/ast_pretty_printer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast_pretty_printer.c b/src/ast_pretty_printer.c
index f5fcf70..0d8b66c 100644
--- a/src/ast_pretty_printer.c
+++ b/src/ast_pretty_printer.c
@@ -155,6 +155,11 @@ ast_pretty_printer_print_ast(ast_pretty_printer_t *printer, ast_node_t *ast)
}
break;
}
+ case AST_FUNCTION_CALL: {
+ ast_function_call_t var = ast->data.function_call;
+ ast_pretty_printer_printf(printer, "FunctionCall name='" SVFMT "'\n", SVARG(&var.identifier->name));
+ break;
+ }
case AST_BLOCK: {
ast_pretty_printer_printf(printer, "Block\n");
ast_pretty_printer_add_indentation(printer);