diff options
Diffstat (limited to 'src/ast_pretty_printer.c')
-rw-r--r-- | src/ast_pretty_printer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ast_pretty_printer.c b/src/ast_pretty_printer.c index 0d8b66c..a211fa4 100644 --- a/src/ast_pretty_printer.c +++ b/src/ast_pretty_printer.c @@ -65,6 +65,8 @@ ast_pretty_printer_print_ast(ast_pretty_printer_t *printer, ast_node_t *ast) assert(ast); switch (ast->kind) { + case AST_FUNCTION_PARAMETER: + break; case AST_NAMESPACE: ast_pretty_printer_printf(printer, "Namespace\n"); ast_pretty_printer_add_indentation(printer); @@ -136,8 +138,8 @@ ast_pretty_printer_print_ast(ast_pretty_printer_t *printer, ast_node_t *ast) break; } case AST_FUNCTION_DECLARATION: { - ast_function_declaration_t function = ast->data.function; - ast_pretty_printer_printf(printer, "FunctionDecl name='" SVFMT "'\n", SVARG(&function.identifier.name)); + string_view_t function_name = ast_node_function_declaration_name(ast); + ast_pretty_printer_printf(printer, "FunctionDecl name='" SVFMT "'\n", SVARG(&function_name)); ast_pretty_printer_add_indentation(printer); { |