Skip to content

Commit

Permalink
Add annotations to output of crystal tool unreachable (crystal-lang…
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Nov 2, 2023
1 parent 7196d0f commit 6e3a66e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compiler/crystal/tools/unreachable.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ module Crystal
io << a_def.location << "\t"
io << a_def.short_reference << "\t"
io << a_def.length << " lines"
if annotations = a_def.all_annotations
io << "\t"
annotations.join(io, " ")
end
io.puts
end
end
Expand All @@ -59,6 +63,9 @@ module Crystal
if lines = a_def.length
builder.field "lines", lines
end
if annotations = a_def.all_annotations
builder.field "annotations", annotations.map(&.to_s)
end
end
end
end
Expand Down

0 comments on commit 6e3a66e

Please sign in to comment.