From eca46069f8a1d5230d9e9b33c170d3480a080a05 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 11 Feb 2026 08:05:34 +0000 Subject: [PATCH] main: print out expressions from reading --- src/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.c b/src/main.c index aac814c..632eafa 100644 --- a/src/main.c +++ b/src/main.c @@ -88,6 +88,21 @@ int main(int argc, char *argv[]) goto end; } } + + LOG("[INFO]: Utilised %lu bytes in parsing\n", sys_cost(&sys)); + LOG("[INFO]: Parsed %lu %s\n", VEC_SIZE(&ast, lisp_t *), + VEC_SIZE(&ast, lisp_t *) == 1 ? "expr" : "exprs"); + + { + for (u64 i = 0; i < VEC_SIZE(&ast, lisp_t *); ++i) + { + lisp_t *expr = VEC_GET(&ast, i, lisp_t *); + LOG("\t[%lu]: ", i); + lisp_print(stdout, expr); + printf("\n"); + } + } + end: sys_free(&sys); vec_free(&ast);