Implement a new StringInterner

This commit is contained in:
gingerBill
2026-03-17 09:18:39 +00:00
parent 8f2fd4f886
commit a8c6ea7c8a
6 changed files with 338 additions and 61 deletions

View File

@@ -773,8 +773,9 @@ gb_internal Ast *ast_matrix_index_expr(AstFile *f, Ast *expr, Token open, Token
gb_internal Ast *ast_ident(AstFile *f, Token token) {
Ast *result = alloc_ast_node(f, Ast_Ident);
result->Ident.token = token;
result->Ident.hash = string_hash(token.string);
result->Ident.token = token;
result->Ident.hash = string_hash(token.string);
result->Ident.interned = string_interner_insert(token.string);
return result;
}