From 31757b5cca25297be90fe092176a3296c2dc4f80 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Wed, 5 Jun 2024 15:38:09 +0200 Subject: Use stream for parsing sexp --- test/sexp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/sexp.c') diff --git a/test/sexp.c b/test/sexp.c index c71d4fa..3edceb0 100644 --- a/test/sexp.c +++ b/test/sexp.c @@ -14,8 +14,9 @@ int main() "'symbol 'another 'a\n" "'(a b c) '('a) ''x\n"; + any_sexp_string_stream_t stream; any_sexp_parser_t parser; - any_sexp_parser_init(&parser, s, strlen(s)); + any_sexp_parser_init_string(&parser, &stream, s, strlen(s)); any_sexp_t sexp = any_sexp_parser_next(&parser); while (!ANY_SEXP_IS_ERROR(sexp)) { @@ -25,7 +26,7 @@ int main() sexp = any_sexp_parser_next(&parser); } - printf("%zu\n", sizeof(any_sexp_t)); + //printf("%zu\n", sizeof(any_sexp_t)); return 0; } -- cgit v1.2.3