From ffa09db5138dea853c910a0307fe5063511abb9f Mon Sep 17 00:00:00 2001 From: Fabrice Date: Sun, 1 Mar 2026 22:03:55 +0100 Subject: fixing type errors working on strings --- src/voidc.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/voidc.cc') diff --git a/src/voidc.cc b/src/voidc.cc index a957815..9e9c38f 100644 --- a/src/voidc.cc +++ b/src/voidc.cc @@ -1,5 +1,22 @@ -#include "token.cc" +#include "memory.cc" +#include "common.cc" + +static const char* SOURCE = R"( +#include + +int main() { + return EXIT_FAILURE; +} + +)"; +static const String SOURCE_STRING = { (u8*)SOURCE, sizeof(SOURCE) - 1 }; int main() { + String source; + slice_copy(heap_allocator(), &SOURCE_STRING, &source); + + slice_write(&source, stdout); + fflush(stdout); + slice_deallocate(heap_allocator(), &source); } -- cgit v1.2.3