From c12c5720bd233752f4ce5e7396bb1709c10b55be Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 7 Jun 2024 02:22:26 +0200 Subject: Add number sexp and pretty-print quote --- test/sexp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/sexp.c') diff --git a/test/sexp.c b/test/sexp.c index 6f8dfc5..8070156 100644 --- a/test/sexp.c +++ b/test/sexp.c @@ -13,8 +13,9 @@ int main() "() id ciao 20 a1020|x|3a\n" ";comm\n3433 ;s\n" "'symbol 'another 'a\n" - "'(a b c) '('a) ''x \"escape \\\"inside the string\"\n" - "\"string very long sus\" (\"a\" \"b\")\n"; + "'(a b c z) '('a) ''x \"escape \\\"inside the string\"\n" + "\"string very long sus\" (\"a\" \"b\")\n" + "10 -20 30 41 -22345 123456789 '1\n"; any_sexp_reader_t reader; any_sexp_reader_string_t string; @@ -22,9 +23,10 @@ int main() any_sexp_t sexp = any_sexp_read(&reader); while (!ANY_SEXP_IS_ERROR(sexp)) { - printf(" %d ", any_sexp_print(sexp)); + //printf(" %d ", any_sexp_print(sexp)); + any_sexp_print(sexp); putchar('\n'); - any_sexp_free(sexp); + any_sexp_free_list(sexp); sexp = any_sexp_read(&reader); } -- cgit v1.2.3