"@ensure" now correctly only runs on non-optional results. Subtypes now merge to a single type. Beginning deprecation of "std::core::str". Refreshed String functions. Consistent use of ".using" parameter. Functions moved to string methods. Tests on more string methods. Fixes to split, rindex_of.

This commit is contained in:
Christoffer Lerno
2023-03-07 19:32:47 +01:00
committed by Christoffer Lerno
parent 33cc2d889b
commit 89de0a70d2
27 changed files with 410 additions and 245 deletions

View File

@@ -46,9 +46,9 @@ fault JsonParsingError
INVALID_NUMBER,
}
fn void JsonParser.init(JsonParser* parser, Stream s, Allocator* allocator = mem::heap())
fn void JsonParser.init(JsonParser* parser, Stream s, Allocator* using = mem::heap())
{
*parser = { .last_string = dstring::new_with_capacity(64, allocator), .stream = s, .allocator = allocator };
*parser = { .last_string = dstring::new_with_capacity(64, using), .stream = s, .allocator = using };
}
fn Object*! JsonParser.parse_from_token(JsonParser* this, JsonTokenType token)