diff options
author | simonmar <unknown> | 2005-10-25 10:48:44 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-10-25 10:48:44 +0000 |
commit | 2909e581ddf0162ad2c113e17a8f19991862b89c (patch) | |
tree | b2a17f1c49a7fd8462148bac52e79e040a22b6bc | |
parent | 7d5216deadd492dbb027753ef83f1c43ec1e9222 (diff) | |
download | haskell-2909e581ddf0162ad2c113e17a8f19991862b89c.tar.gz |
[project @ 2005-10-25 10:48:44 by simonmar]
companion to Lexer.x rev. 1.29; columns now always count tabs as 1 in SrcLoc.
-rw-r--r-- | ghc/compiler/basicTypes/SrcLoc.lhs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ghc/compiler/basicTypes/SrcLoc.lhs b/ghc/compiler/basicTypes/SrcLoc.lhs index a8d037c052..2ab9e65ee3 100644 --- a/ghc/compiler/basicTypes/SrcLoc.lhs +++ b/ghc/compiler/basicTypes/SrcLoc.lhs @@ -108,14 +108,9 @@ srcLocCol (SrcLoc _ l c) = c srcLocCol other = panic "srcLocCol: unknown col" advanceSrcLoc :: SrcLoc -> Char -> SrcLoc -advanceSrcLoc (SrcLoc f l c) '\t' = SrcLoc f l (tab c) advanceSrcLoc (SrcLoc f l c) '\n' = SrcLoc f (l + 1) 0 advanceSrcLoc (SrcLoc f l c) _ = SrcLoc f l (c + 1) advanceSrcLoc loc _ = loc -- Better than nothing - --- Advance to the next tab stop. Tabs are at column positions 0, 8, 16, etc. -tab :: Int -> Int -tab c = (c `quot` 8 + 1) * 8 \end{code} %************************************************************************ |