From 373728f324b82d305748cfe3c853053fe2a9f761 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 26 Mar 2023 02:01:04 +0200 Subject: struct member naming --- src/debug.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/debug.c') diff --git a/src/debug.c b/src/debug.c index 2bb4af4..566da42 100644 --- a/src/debug.c +++ b/src/debug.c @@ -191,6 +191,21 @@ static void _type_str(FILE *fp, struct ast_node *type) } break; } + + case AST_TYPE_STRUCT: { + struct ast_node *struc_id = type->_type.struc.struc; + fprintf(fp, "%s", struc_id->_id.id); + + struct ast_node *impls = type->_type.struc.impls; + if (impls) { + fprintf(fp, " ("); + while (impls) { + _type_str(fp, impls); + impls = impls->next; + } + fprintf(fp, ")"); + } + } } _type_str(fp, type->_type.next); -- cgit v1.3