aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Haddock/Lex.x
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-03-30 09:16:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-03-30 09:16:10 -0700
commit5aec167e71b3da98a0f209e3c75af019682ad354 (patch)
tree9b40e96cb359b1f223880cb650e83edb4d506c60 /src/Text/Pandoc/Readers/Haddock/Lex.x
parent7cb8b60910ede36bba3598f85a06ddde6fc545d0 (diff)
parent86636677881ab7eace0fd9b2993cfdb01adb7b18 (diff)
downloadpandoc-5aec167e71b3da98a0f209e3c75af019682ad354.tar.gz
Merge pull request #808 from davidlazar/master
Improvements to Haddock reader
Diffstat (limited to 'src/Text/Pandoc/Readers/Haddock/Lex.x')
-rw-r--r--src/Text/Pandoc/Readers/Haddock/Lex.x8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock/Lex.x b/src/Text/Pandoc/Readers/Haddock/Lex.x
index 902ac84c0..a84204e83 100644
--- a/src/Text/Pandoc/Readers/Haddock/Lex.x
+++ b/src/Text/Pandoc/Readers/Haddock/Lex.x
@@ -19,7 +19,8 @@
module Text.Pandoc.Readers.Haddock.Lex (
Token(..),
LToken,
- tokenise
+ tokenise,
+ tokenPos
) where
import Data.Char
@@ -54,14 +55,15 @@ $ident = [$alphanum \'\_\.\!\#\$\%\&\*\+\/\<\=\>\?\@\\\\\^\|\-\~\:]
<line> {
$ws* \> { begin birdtrack }
$ws* \>\>\> { strtoken TokExamplePrompt `andBegin` exampleexpr }
- $ws* \n { token TokPara `andBegin` para }
- -- Here, we really want to be able to say
+ $ws* \n { token TokPara `andBegin` para }
+ -- ^ Here, we really want to be able to say
-- $ws* (\n | <eof>) { token TokPara `andBegin` para}
-- because otherwise a trailing line of whitespace will result in
-- a spurious TokString at the end of a docstring. We don't have <eof>,
-- though (NOW I realise what it was for :-). To get around this, we always
-- append \n to the end of a docstring.
+
() { begin string }
}