diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-07-04 16:25:06 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-07-04 16:25:06 -0400 |
| commit | dfb7bb1984b555519851d084ac8b5f8e760c55ce (patch) | |
| tree | ebf696fe09c05865757a560900e7e48133db9e93 | |
| parent | 9d9fe12987bc8e7c3266ec320d04a97a37c3fb1b (diff) | |
!! printing should quote strings by default
| -rw-r--r-- | compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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")); |
