From e8703c985af8cbe2de5eb235c7ec295ce1811c7f Mon Sep 17 00:00:00 2001 From: Nakidai Date: Mon, 24 Mar 2025 22:53:57 +0300 Subject: Some improvements - Fix paser - Add verbose mode --- cccl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cccl.c') diff --git a/cccl.c b/cccl.c index 58301f5..eedea7c 100644 --- a/cccl.c +++ b/cccl.c @@ -8,6 +8,8 @@ void cccl(struct cccl_File file) { struct cccl_Token tokens[TOKENS_LIMIT]; - size_t tokens_amount = tokenize(file.buffer, file.size, tokens, TOKENS_LIMIT); - printf("Read: %lu\n", tokens_amount); + size_t tokens_amount = cccl_tokenize(file.buffer, file.size, tokens, TOKENS_LIMIT); + if (verbose) + fprintf(stderr, "Read: %lu\n", tokens_amount); + struct cccl_Node *parsed = cccl_parse(tokens, tokens_amount, 0, 0); } -- cgit 1.4.1