!! printing should quote strings by default

This commit is contained in:
Bruce Hill 2024-07-04 16:25:06 -04:00
parent 9d9fe12987
commit dfb7bb1984

View File

@ -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"));