Function init [src]

Prototype

pub fn init(wip: *Wip, gpa: Allocator) !void

Parameters

wip: *Wipgpa: Allocator

Source

pub fn init(wip: *Wip, gpa: Allocator) !void { wip.* = .{ .gpa = gpa, .string_bytes = .{}, .extra = .{}, .root_list = .{}, }; // So that 0 can be used to indicate a null string. try wip.string_bytes.append(gpa, 0); assert(0 == try addExtra(wip, ErrorMessageList{ .len = 0, .start = 0, .compile_log_text = 0, })); }