lisp: lisp_print: implement support for strings
This commit is contained in:
17
src/lisp.c
17
src/lisp.c
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user