Skip to content

Commit

Permalink
Update documentation.cr
Browse files Browse the repository at this point in the history
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl>
  • Loading branch information
nobodywasishere and Sija authored Jun 13, 2024
1 parent 0969530 commit 898ad17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compiler/crystal/tools/documentation.cr
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ module Crystal

private def location_to_s(loc : Location)
f = loc.filename
if f.is_a?(String)
case f
when String
line = loc.line_number
column = loc.column_number
filename = f
elsif f.is_a?(VirtualFile)
when VirtualFile
macro_location = f.macro.location.not_nil!
filename = macro_location.filename.to_s
line = macro_location.line_number + loc.line_number
Expand Down

0 comments on commit 898ad17

Please sign in to comment.