aboutsummaryrefslogtreecommitdiff
path: root/src/HsLexer.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HsLexer.lhs')
-rw-r--r--src/HsLexer.lhs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/HsLexer.lhs b/src/HsLexer.lhs
index ac5fa9ae..8f5c0174 100644
--- a/src/HsLexer.lhs
+++ b/src/HsLexer.lhs
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------------
--- $Id: HsLexer.lhs,v 1.3 2002/04/24 15:12:41 simonmar Exp $
+-- $Id: HsLexer.lhs,v 1.4 2002/04/25 14:40:05 simonmar Exp $
--
-- (c) The GHC Team, 1997-2000
--
@@ -66,7 +66,7 @@ data Token
| DocCommentNext String -- something beginning '-- |'
| DocCommentPrev String -- something beginning '-- ^'
- | DocCommentNamed String -- something beginning '-- @'
+ | DocCommentNamed String -- something beginning '-- $'
| DocSection Int String -- a section heading
-- Reserved operators
@@ -222,6 +222,7 @@ lexer cont input (SrcLoc _ x) y col =
doc (' ':'/':_) = True
doc (' ':'^':_) = True
doc (' ':'*':_) = True
+ doc (' ':'$':_) = True
doc _ = False
nextTab x = x + (tAB_LENGTH - (x-1) `mod` tAB_LENGTH)
@@ -280,6 +281,7 @@ lexToken cont s loc y x =
'-':'-':' ':'|':s -> docComment DocCommentNext cont s loc y x
'-':'-':' ':'/':s -> docComment DocCommentNext cont s loc y x
'-':'-':' ':'^':s -> docComment DocCommentPrev cont s loc y x
+ '-':'-':' ':'$':s -> docComment DocCommentNamed cont s loc y x
'-':'-':' ':'*':s -> docSection cont ('*':s) loc y x
'\'':s -> lexChar cont s loc y (x+1)