lisp: lisp_print: implement support for strings

This commit is contained in:
2026-03-05 20:27:00 +00:00
parent fd9cc93c45
commit c65ec319f5

View File

@@ -188,8 +188,23 @@ void lisp_print(FILE *fp, lisp_t *lisp)
break; break;
} }
case TAG_STR: case TAG_STR:
TODO("Implement lisp_print for strings"); {
#if VERBOSE_LOGS == 2
fprintf(fp, "STR[");
#else
fprintf(fp, "\"");
#endif
sv_t sv = string_sv(as_str(lisp));
fprintf(fp, PR_SV, SV_FMT(sv));
#if VERBOSE_LOGS == 2
fprintf(fp, "]");
#else
fprintf(fp, "\"");
#endif
break; break;
}
default: default:
FAIL("Unreachable"); FAIL("Unreachable");
break; break;