Actually substitute token array. init_language_core.

Seems like perf improved
This commit is contained in:
Krzosa Karol
2023-02-10 09:49:46 +01:00
parent 6f8a7ba6c8
commit dd6dc60d8b
2 changed files with 12 additions and 7 deletions

View File

@@ -209,6 +209,7 @@ lex_add_token(Core_Ctx *ctx, Token *token) {
Token *top = (Token *)arena_push_size(ctx->stage_arena, sizeof(Token));
*top = *token;
ctx->tokens.len += 1;
ctx->tokens.cap += 1;
ctx->tokens.data = (Token *)ctx->stage_arena->memory.data;
}