diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-01 22:03:55 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-03-01 22:03:55 +0100 |
| commit | ffa09db5138dea853c910a0307fe5063511abb9f (patch) | |
| tree | f3bfc548c126fb8280fc44262d265d44eb0fb3c4 /src/voidc.cc | |
| parent | c638003e8aa684bae60e8b3736c6d9db8571e727 (diff) | |
fixing type errors working on strings
Diffstat (limited to 'src/voidc.cc')
| -rw-r--r-- | src/voidc.cc | 19 |
1 files changed, 18 insertions, 1 deletions
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 <stdlib.h> + +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); } |
