Skip to content

Commit

Permalink
comment about column numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
dorchard committed Sep 30, 2024
1 parent 71917a7 commit a767a07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Language/Fortran/Util/Position.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ instance Binary Position
instance NFData Position

instance Show Position where
-- Column number decrement by 1 as the lexer generates column numbers
-- starting at position 1
-- See PR https://github.com/camfort/fortran-src/pull/292
show (Position _ c l _ _) = show l ++ ':' : show (c - 1)

initPosition :: Position
Expand Down

0 comments on commit a767a07

Please sign in to comment.