diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-03 10:57:46 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-03 10:57:46 +0100 |
| commit | a134e9d3651cc502c1653f8da8515cb4f30eb5fb (patch) | |
| tree | abff4de2e6b111c36111888f27908e983e070bd1 /src/voidc.cc | |
| parent | d9858df1ed62a323016a82daa6a8e73b248788a1 (diff) | |
fixing linked list behavior
Diffstat (limited to 'src/voidc.cc')
| -rw-r--r-- | src/voidc.cc | 11 |
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 = {}; |
