Bugfix :text_content() for DSLs

This commit is contained in:
Bruce Hill 2024-08-19 13:21:28 -04:00
parent 178dca6e88
commit 3ddaf92505

View File

@ -362,7 +362,7 @@ void bind_statement(env_t *env, ast_t *statement)
new(binding_t, .type=Type(FunctionType, .args=new(arg_t, .name="text", .type=TEXT_TYPE), .ret=type),
.code=CORD_all("(", namespace_prefix(env->libname, env->namespace), def->name, "_t)")));
set_binding(ns_env, "text_content",
new(binding_t, .type=Type(FunctionType, .args=new(arg_t, .name="text", .type=TEXT_TYPE), .ret=type),
new(binding_t, .type=Type(FunctionType, .args=new(arg_t, .name="text", .type=type), .ret=TEXT_TYPE),
.code="(Text_t)"));
for (ast_list_t *stmt = def->namespace ? Match(def->namespace, Block)->statements : NULL; stmt; stmt = stmt->next)