Updated stream API.

This commit is contained in:
Christoffer Lerno
2023-09-02 19:48:51 +02:00
committed by Christoffer Lerno
parent a6cff5c2a5
commit 9a6d83f526
44 changed files with 837 additions and 952 deletions

View File

@@ -15,7 +15,7 @@ fault JsonParsingError
INVALID_NUMBER,
}
fn Object*! parse(Stream s, Allocator* using = mem::heap())
fn Object*! parse(Stream* s, Allocator* using = mem::heap())
{
JsonContext context = { .last_string = dstring::new_with_capacity(64, using), .stream = s, .allocator = using };
defer context.last_string.free();
@@ -44,7 +44,7 @@ enum JsonTokenType @local
struct JsonContext @local
{
uint line;
Stream stream;
Stream* stream;
Allocator* allocator;
JsonTokenType token;
DString last_string;