From 0b6bd969ce9982aa7c8b31c38e64034d3d949b8e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 15 Sep 2026 18:19:26 -0300 Subject: Mark omitted source after result declaration context with ellipses --- src/locations.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/locations.zig') diff --git a/src/locations.zig b/src/locations.zig index 43d99005..45d72c57 100644 --- a/src/locations.zig +++ b/src/locations.zig @@ -256,6 +256,11 @@ pub fn format(p: *pardes.Pardes, dir: []const u8, input: []const u8, anchor: ?us try out.writer.writeByte('\t'); const code_start = out.written().len - before; try out.writer.writeAll(row.code); + if (row.declaration and index + 1 < pending.items.len) { + const next = pending.items[index + 1]; + if (std.mem.eql(u8, row.path, next.path) and next.at.line -| row.at.line > 1) + try out.writer.writeAll(" ..."); + } if (index + 1 < pending.items.len or std.mem.endsWith(u8, input, "\n")) try out.writer.writeByte('\n'); const owned_path = try p.gpa.dupe(u8, row.path); errdefer p.gpa.free(owned_path); -- cgit v1.3