File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -1029,10 +1029,15 @@ pub fn printInterfaceAsHtml(
10291029 }
10301030}
10311031
1032- pub fn printErrors (ast : Ast , src : []const u8 , path : ? []const u8 ) void {
1032+ pub fn printErrors (
1033+ ast : Ast ,
1034+ src : []const u8 ,
1035+ path : ? []const u8 ,
1036+ w : anytype ,
1037+ ) ! void {
10331038 for (ast .errors ) | err | {
10341039 const range = err .main_location .range (src );
1035- std . debug .print ("{s}:{}:{}: {s}\n " , .{
1040+ try w .print ("{s}:{}:{}: {s}\n " , .{
10361041 path orelse "<stdin>" ,
10371042 range .start .row ,
10381043 range .start .col ,
Original file line number Diff line number Diff line change @@ -168,10 +168,15 @@ pub fn cursor(ast: Ast, idx: u32) Cursor {
168168 return .{ .ast = ast , .idx = idx , .dir = .in };
169169}
170170
171- pub fn printErrors (ast : Ast , src : []const u8 , path : ? []const u8 ) void {
171+ pub fn printErrors (
172+ ast : Ast ,
173+ src : []const u8 ,
174+ path : ? []const u8 ,
175+ w : anytype ,
176+ ) ! void {
172177 for (ast .errors ) | err | {
173178 const range = err .main_location .range (src );
174- std . debug .print ("{s}:{}:{}: {s}\n " , .{
179+ try w .print ("{s}:{}:{}: {s}\n " , .{
175180 path orelse "<stdin>" ,
176181 range .start .row ,
177182 range .start .col ,
You can’t perform that action at this time.
0 commit comments