diff options
author | simonmar <unknown> | 2002-04-25 14:40:05 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-04-25 14:40:05 +0000 |
commit | 6395502702ae2cf4f4ff969fce2b984e603f0f86 (patch) | |
tree | 69f42c9a9c3e49e0745a9d5937277b8587ebe79b /src/HsLexer.lhs | |
parent | 044cea8101424a367d578d4943553e5b20bd6ec0 (diff) |
[haddock @ 2002-04-25 14:40:05 by simonmar]
- Add support for named chunks of documentation which can be
referenced from the export list.
- Copy the icon from $libdir to the destination in HTML mode.
Diffstat (limited to 'src/HsLexer.lhs')
-rw-r--r-- | src/HsLexer.lhs | 6 |
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) |