From ea6f9797be2b6c1f65cf3b5594f8fb062ba92e9e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 19 Aug 2024 13:23:59 -0400 Subject: Support DSL constructor working on DSL itself --- compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compile.c b/compile.c index d3fb4523..485e247f 100644 --- a/compile.c +++ b/compile.c @@ -2502,6 +2502,9 @@ CORD compile(env_t *env, ast_t *ast) const char *lang = Match(t, TextType)->lang; if (lang) { // Escape for DSL type_t *first_type = get_type(env, call->args->value); + if (type_eq(first_type, t)) + return compile(env, call->args->value); + binding_t *esc = get_lang_escape_function(env, lang, first_type); if (!esc) code_err(ast, "I don't know how to convert %T to %T", first_type, t); -- cgit v1.2.3