diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-03-05 18:25:57 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 81b6004928015ced29b0b949e35753977aa17606 (patch) | |
tree | 410690c0ddc59b61bb471fe6cea0dcc71e133745 /src/std | |
parent | f41317b598e59eefaa912f0d49fe2b1817573d88 (diff) |
Add ast resolving using multiple threads
Fix issue where not all files are parsed
Diffstat (limited to 'src/std')
-rw-r--r-- | src/std/buffer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/std/buffer.c b/src/std/buffer.c index c4c9845..1fdcfd4 100644 --- a/src/std/buffer.c +++ b/src/std/buffer.c @@ -60,3 +60,16 @@ int buffer_pop(Buffer *self, void *data, usize size) { self->size -= size; return 0; } + +void* buffer_start(Buffer *self) { + return self->data; +} + +void *buffer_end(Buffer *self) { + return self->data + self->size; +} + +usize __buffer_get_size(Buffer *self, usize type_size) { + assert(type_size != 0); + return self->size / type_size; +}
\ No newline at end of file |