From dfb7bb1984b555519851d084ac8b5f8e760c55ce Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 4 Jul 2024 16:25:06 -0400 Subject: [PATCH] !! printing should quote strings by default --- compile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compile.c b/compile.c index b42a175..9e07e4d 100644 --- a/compile.c +++ b/compile.c @@ -687,8 +687,7 @@ CORD compile_statement(env_t *env, ast_t *ast) CORD code = "say(CORD_all("; for (ast_list_t *chunk = to_print; chunk; chunk = chunk->next) { - type_t *t = get_type(env, chunk->ast); - if (t->tag == TextType && !Match(t, TextType)->lang) { + if (chunk->ast->tag == TextLiteral) { code = CORD_cat(code, compile(env, chunk->ast)); } else { code = CORD_cat(code, compile_string(env, chunk->ast, "USE_COLOR"));