summary refs log tree commit diff
path: root/cccl.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-03-24 22:53:57 +0300
committerNakidai <nakidai@disroot.org>2025-03-24 22:53:57 +0300
commite8703c985af8cbe2de5eb235c7ec295ce1811c7f (patch)
treea6f82af9b65624d46ef19160f24ac0d7f2e03211 /cccl.c
parentf312b357ab2ec3cf83a67945f3641b964a59e8d2 (diff)
download3cl-e8703c985af8cbe2de5eb235c7ec295ce1811c7f.tar.gz
3cl-e8703c985af8cbe2de5eb235c7ec295ce1811c7f.zip
Some improvements
- Fix paser
- Add verbose mode
Diffstat (limited to 'cccl.c')
-rw-r--r--cccl.c6
1 files changed, 4 insertions, 2 deletions
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);
 }