feature. See also
. The project being documented here (as the example) is the Zig library itself.
compile.StringTablesByLanguage
pub const StringTablesByLanguage = struct
File
Code
pub const StringTablesByLanguage = struct {
tables: std.array_hash_map.Auto(res.Language, StringTable) = .empty,
pub fn deinit(self: *StringTablesByLanguage, allocator: Allocator) void {
self.tables.deinit(allocator);
}
pub fn set(
self: *StringTablesByLanguage,
allocator: Allocator,
language: res.Language,
id: u16,
string_token: Token,
node: *Node,
source: []const u8,
code_page_lookup: *const CodePageLookup,
version: u32,
characteristics: u32,
) StringTable.SetError!void {
var get_or_put_result = try self.tables.getOrPut(allocator, language);
if (!get_or_put_result.found_existing) {
get_or_put_result.value_ptr.* = StringTable{};
}
return get_or_put_result.value_ptr.set(allocator, id, string_token, node, source, code_page_lookup, version, characteristics);
}
}