aboutsummaryrefslogtreecommitdiff
path: root/src/debug.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-11-07 13:09:44 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2023-11-07 13:09:44 +0200
commit8dce541c96a329e3b12f3ea3794fcc8202fbd134 (patch)
tree0b086b998c9d392242acba0a7518fa3d535b1c56 /src/debug.c
parentbb560b4201d8b813ed3999250845f365ff9d6c50 (diff)
downloadek-8dce541c96a329e3b12f3ea3794fcc8202fbd134.tar.gz
ek-8dce541c96a329e3b12f3ea3794fcc8202fbd134.zip
simplift syntax somewhat
+ Explicit macro expansion + Still have to simplify AST and type stuff, probably worth rewriting or something
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/debug.c b/src/debug.c
index 017f07f..ee410be 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -193,18 +193,18 @@ static void _type_str(FILE *fp, struct ast_node *type)
break;
}
- case AST_TYPE_TEMPLATE: {
- struct ast_node *template = type->_type.template.template;
- assert(template);
+ case AST_TYPE_TRAIT: {
+ struct ast_node *trait = type->_type.trait.trait;
+ assert(trait);
- struct ast_node *template_id = template->_template.id;
- struct ast_node *template_act = type->_type.template.actual;
- if (template_act) {
- fprintf(fp, "%s as ", template_id->_id.id);
- _type_str(fp, template_act);
+ struct ast_node *trait_id = trait->_trait.id;
+ struct ast_node *trait_act = type->_type.trait.actual;
+ if (trait_act) {
+ fprintf(fp, "%s as ", trait_id->_id.id);
+ _type_str(fp, trait_act);
}
else {
- fprintf(fp, "%s", template_id->_id.id);
+ fprintf(fp, "%s", trait_id->_id.id);
}
break;
}
@@ -284,7 +284,7 @@ char *type_str(struct ast_node *node)
char *buf = NULL; size_t size = 0;
FILE *memstream = open_memstream(&buf, &size);
- /* TODO: improve template detection */
+ /* TODO: improve trait detection */
/* we were given a plain type, pass it directly along to _type_str */
if (node->node_type == AST_TYPE)
_type_str(memstream, node);