fn parse(gpa: Allocator, io: Io, file_path: []const u8) !Ast
fn parse(gpa: Allocator, io: Io, file_path: []const u8) !Ast { const source_code = Io.Dir.cwd().readFileAllocOptions( io, file_path, gpa, .limited(std.math.maxInt(u32)), .fromByteUnits(1), 0, ) catch |err| { fatal("unable to open '{s}': {s}", .{ file_path, @errorName(err) }); }; errdefer gpa.free(source_code); var tree = try Ast.parse(gpa, source_code, .{}); errdefer tree.deinit(gpa); if (tree.errors.len != 0) { @panic("syntax errors occurred"); } return tree; }