aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-07-04 16:25:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-07-04 16:25:06 -0400
commitdfb7bb1984b555519851d084ac8b5f8e760c55ce (patch)
treeebf696fe09c05865757a560900e7e48133db9e93
parent9d9fe12987bc8e7c3266ec320d04a97a37c3fb1b (diff)
!! printing should quote strings by default
-rw-r--r--compile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index b42a175b..9e07e4db 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"));