mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
add a happy little main function to src/fmt.zig
Provided for debugging/testing purposes; unused by the compiler.
This commit is contained in:
parent
c4776d66af
commit
9222d201d7
@ -394,3 +394,12 @@ fn fmtPathFile(
|
||||
try stdout.print("{s}\n", .{file_path});
|
||||
}
|
||||
}
|
||||
|
||||
/// Provided for debugging/testing purposes; unused by the compiler.
|
||||
pub fn main() !void {
|
||||
const gpa = std.heap.smp_allocator;
|
||||
var arena_instance = std.heap.ArenaAllocator.init(gpa);
|
||||
const arena = arena_instance.allocator();
|
||||
const args = try process.argsAlloc(arena);
|
||||
return run(gpa, arena, args[1..]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user