summaryrefslogtreecommitdiff
path: root/src/voidc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/voidc.cc')
-rw-r--r--src/voidc.cc19
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);
}