mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
hash
This commit is contained in:
@@ -3482,7 +3482,7 @@ pub const Ast = struct {
|
||||
top_level_symbol_to_parts: AutoHashMap(Ref, std.ArrayList(u32)) = undefined,
|
||||
export_star_import_records: []u32 = &([_]u32{}),
|
||||
|
||||
pub const NamedImports = std.ArrayHashMap(Ref, NamedImport, Ref.hash, Ref.eql, true);
|
||||
pub const NamedImports = std.ArrayHashMap(Ref, NamedImport, RefHashCtx, true);
|
||||
pub const NamedExports = StringHashMap(NamedExport);
|
||||
|
||||
pub fn initTest(parts: []Part) Ast {
|
||||
|
||||
@@ -159,9 +159,9 @@ fn JSONLikeParser(opts: js_lexer.JSONOptions) type {
|
||||
}
|
||||
|
||||
var str = p.lexer.toEString();
|
||||
const is_duplicate = duplicates.exists(p.lexer.string_literal_slice);
|
||||
const is_duplicate = duplicates.contains(p.lexer.string_literal_slice);
|
||||
if (!is_duplicate) {
|
||||
duplicates.put(p.lexer.string_literal_slice) catch unreachable;
|
||||
duplicates.insert(p.lexer.string_literal_slice) catch unreachable;
|
||||
}
|
||||
var key_range = p.lexer.range();
|
||||
// Warn about duplicate keys
|
||||
|
||||
Reference in New Issue
Block a user