blob: e6c76e82cc6fdaa3b13616b8da41c4e3dcf663ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <cstdlib>
#include "common.cc"
#include "memory.cc"
#include "source.cc"
#include "tokenizer.cc"
static const char* SOURCE = R"(
#include <stdlib.h>
int main() {
return EXIT_FAILURE;
}
)";
static const char* SOURCE_FILE = "source.c";
int main() {
String source(SOURCE);
String file(SOURCE_FILE);
Buffer_Stack stack{};
Buffer* buffer = nullptr;
bool ret = buffer_init(heap_allocator(), &source, &file, &buffer);
if (!ret) return EXIT_FAILURE;
buffer_stack_push(&stack, buffer);
Tokenizer tokenizer(&stack);
}
|