Some more allocation cleanup in checker and lexer.
This commit is contained in:
@@ -569,7 +569,6 @@ scan_next_token :: (lexer : *Lexer) -> *Token {
|
||||
s : string = .{ count = 1, data = *c };
|
||||
record_error(lexer, tprint("Invalid token: %", s));
|
||||
return null;
|
||||
// return error_token(lexer, tprint("Invalid token: %", s));
|
||||
}
|
||||
|
||||
lex :: (ctx : *Compiler_Context, allocator := temp) {
|
||||
@@ -585,7 +584,7 @@ lex :: (ctx : *Compiler_Context, allocator := temp) {
|
||||
|
||||
lexer : Lexer;
|
||||
lexer.ctx = ctx;
|
||||
array_reserve(*lexer.ctx.tokens, 1024);
|
||||
array_reserve(*lexer.ctx.tokens, 128);
|
||||
|
||||
init_lexer_from_string(*lexer, ctx.file.source);
|
||||
lexer.path = ctx.file.path;
|
||||
|
||||
Reference in New Issue
Block a user