summaryrefslogtreecommitdiff
path: root/src/voidc.cc
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-03-03 10:57:46 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-03-03 10:57:46 +0100
commita134e9d3651cc502c1653f8da8515cb4f30eb5fb (patch)
treeabff4de2e6b111c36111888f27908e983e070bd1 /src/voidc.cc
parentd9858df1ed62a323016a82daa6a8e73b248788a1 (diff)
fixing linked list behavior
Diffstat (limited to 'src/voidc.cc')
-rw-r--r--src/voidc.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/voidc.cc b/src/voidc.cc
index 63d2ef7..c6682b2 100644
--- a/src/voidc.cc
+++ b/src/voidc.cc
@@ -23,13 +23,18 @@ int main() {
String file(SOURCE_FILE);
Buffer_Stack stack{};
- Buffer* buffer = nullptr;
+ Buffer* buffer1 = nullptr;
+ Buffer* buffer2 = nullptr;
- bool ret = buffer_init(heap_allocator(), &source, &file, &buffer);
+ bool ret = buffer_init(heap_allocator(), &source, &file, &buffer1);
if (!ret) return EXIT_FAILURE;
- buffer_stack_push(&stack, buffer);
+ ret = buffer_init(heap_allocator(), &source, &file, &buffer2);
+ if (!ret) return EXIT_FAILURE;
+ buffer_stack_push(&stack, buffer1);
+ buffer_stack_push(&stack, buffer2);
+
Tokenizer tokenizer(&stack);
Token token = {};