Working on simplifying configurable allocation scheme

This commit is contained in:
Krzosa Karol
2023-01-01 12:40:58 +01:00
parent 8c0a8bf72b
commit c5539276ae
18 changed files with 169 additions and 347 deletions

View File

@@ -80,8 +80,8 @@ token_error(Token *t, String error_val){
CORE_Static void
lex_parse_u64(Core_Ctx *lexer, Token *t, S64 base){
Scratch scratch;
Set_BigInt_Arena(scratch);
Scratch_Scope _scope(lexer->scratch);
Set_BigInt_Arena(lexer->scratch);
t->kind = TK_Integer;
BigInt m = bigint_u64(1);
@@ -592,8 +592,8 @@ lex_restream(Core_Ctx *lexer, String istream, String file){
lexer->stream.line_begin = istream.str;
lexer->stream.file = lexer->intern(file);
Scratch scratch;
lexer->stream.indent_stack.allocator = scratch;
Scratch_Scope _scope(lexer->scratch);
lexer->stream.indent_stack.allocator = lexer->scratch;
lexer->stream.indent_stack.add(&token_null);
lex__stream(lexer);
}