mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Interface based streams. Fix for initializing with a force unwrap inside. Allow $define to take a list. Allow $define to return error on argument type mismatch in call. Fixed broken bit operations on boolean vectors.
This commit is contained in:
committed by
Christoffer Lerno
parent
e4c1328ef2
commit
1aa038c92f
@@ -15,7 +15,7 @@ fault JsonParsingError
|
||||
INVALID_NUMBER,
|
||||
}
|
||||
|
||||
fn Object*! parse(Stream* s, Allocator* using = mem::heap())
|
||||
fn Object*! parse(InStream* 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;
|
||||
InStream* stream;
|
||||
Allocator* allocator;
|
||||
JsonTokenType token;
|
||||
DString last_string;
|
||||
|
||||
Reference in New Issue
Block a user