aboutsummaryrefslogtreecommitdiff
path: root/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-05 18:20:54 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-03-05 18:20:54 -0500
commit147e0f0269440fce15d6b88a8a90627f3a3b2df2 (patch)
treebc33522ba71b5a2996fae22e102cce5046cf1333 /tomo.c
parent2c4324670ff569ede360d13875c5e4b5720a626d (diff)
Overhaul of constructors, making it more consistent and correct. Also
changed T(), T, T_t, T_s type names to T(), T$$info, T$$type, T$$struct for unambiguity
Diffstat (limited to 'tomo.c')
-rw-r--r--tomo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tomo.c b/tomo.c
index 0fd3d2c2..81be5e67 100644
--- a/tomo.c
+++ b/tomo.c
@@ -230,19 +230,19 @@ static void _make_typedefs_for_library(libheader_info_t *info, ast_t *ast)
if (ast->tag == StructDef) {
auto def = Match(ast, StructDef);
CORD full_name = CORD_cat(namespace_prefix(info->env, info->env->namespace), def->name);
- CORD_put(CORD_all("typedef struct ", full_name, "_s ", full_name, "_t;\n"), info->output);
+ CORD_put(CORD_all("typedef struct ", full_name, "$$struct ", full_name, "$$type;\n"), info->output);
} else if (ast->tag == EnumDef) {
auto def = Match(ast, EnumDef);
CORD full_name = CORD_cat(namespace_prefix(info->env, info->env->namespace), def->name);
- CORD_put(CORD_all("typedef struct ", full_name, "_s ", full_name, "_t;\n"), info->output);
+ CORD_put(CORD_all("typedef struct ", full_name, "$$struct ", full_name, "$$type;\n"), info->output);
for (tag_ast_t *tag = def->tags; tag; tag = tag->next) {
if (!tag->fields) continue;
- CORD_put(CORD_all("typedef struct ", full_name, "$", tag->name, "_s ", full_name, "$", tag->name, "_t;\n"), info->output);
+ CORD_put(CORD_all("typedef struct ", full_name, "$", tag->name, "$$struct ", full_name, "$", tag->name, "$$type;\n"), info->output);
}
} else if (ast->tag == LangDef) {
auto def = Match(ast, LangDef);
- CORD_put(CORD_all("typedef Text_t ", namespace_prefix(info->env, info->env->namespace), def->name, "_t;\n"), info->output);
+ CORD_put(CORD_all("typedef Text_t ", namespace_prefix(info->env, info->env->namespace), def->name, "$$type;\n"), info->output);
}
}