feature. See also
. The project being documented here (as the example) is the Zig library itself.
ConfigHeader.renderValueNasm
fn renderValueNasm(conf: *const Configuration, w: *Writer, newline: []const u8, name: []const u8, value: Value.Index) !void
File
Code
fn renderValueNasm(conf: *const Configuration, w: *Writer, newline: []const u8, name: []const u8, value: Value.Index) !void {
switch (value.unpack(conf)) {
.undef => try w.print("; %undef {s}{s}", .{ name, newline }),
.defined => try w.print("%define {s}{s}", .{ name, newline }),
.bool => |b| try w.print("%define {s} {c}{s}", .{ name, @as(u8, '0') + @intFromBool(b), newline }),
inline .u64, .i64 => |i| try w.print("%define {s} {d}{s}", .{ name, i, newline }),
.ident => |ident| try w.print("%define {s} {s}{s}", .{ name, ident, newline }),
.string => |string| try w.print("%define {s} \"{f}\"{s}", .{ name, std.zig.fmtString(string), newline }),
}
}