aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-06-05 15:38:09 +0200
committerFederico Angelilli <code@fedang.net>2024-06-05 15:38:09 +0200
commit31757b5cca25297be90fe092176a3296c2dc4f80 (patch)
tree23b4e1eae229b6c34ad3cc60ddd5c471f4d98e7d /test
parentc3d59b49767602ef2e53cd93f0f963e981af6cdd (diff)
Use stream for parsing sexp
Diffstat (limited to 'test')
-rw-r--r--test/sexp.c5
1 files changed, 3 insertions, 2 deletions
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;
}