You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
457 B
Zig
15 lines
457 B
Zig
const std = @import("std");
|
|
pub fn report(line: usize, where: []const u8, message: []const u8) void {
|
|
std.debug.warn("[line {}] Error{}: {}", .{ line, where, message });
|
|
}
|
|
|
|
pub fn reportN(line: usize, message: []const u8) void {
|
|
report(line, "", message);
|
|
}
|
|
|
|
pub fn reportFmt(line: usize, comptime fmt: []const u8, args: anytype) void {
|
|
std.debug.warn("[line {}] Error", .{line});
|
|
std.debug.warn(fmt, args);
|
|
std.debug.warn("\n", .{});
|
|
}
|