Implement a new StringInterner

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

No files matched your search

+3 -2
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;
}