aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockParse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/HaddockParse.y')
-rw-r--r--src/HaddockParse.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y
index db712c42..e1a1cb8c 100644
--- a/src/HaddockParse.y
+++ b/src/HaddockParse.y
@@ -10,8 +10,8 @@ import HsSyn
%token '/' { TokSpecial '/' }
'@' { TokSpecial '@' }
DQUO { TokSpecial '\"' }
- '#' { TokSpecial '#' }
URL { TokURL $$ }
+ ANAME { TokAName $$ }
'*' { TokBullet }
'(n)' { TokNumber }
'>..' { TokBirdTrack $$ }
@@ -65,12 +65,16 @@ seq1 :: { Doc }
elem1 :: { Doc }
: STRING { DocString $1 }
- | '/' STRING '/' { DocEmphasis (DocString $2) }
- | '#' STRING '#' { DocAName $2 }
+ | '/' strings '/' { DocEmphasis $2 }
| URL { DocURL $1 }
+ | ANAME { DocAName $1 }
| IDENT { DocIdentifier $1 }
| DQUO STRING DQUO { DocModule $2 }
+strings :: { Doc }
+ : STRING { DocString $1 }
+ | STRING strings { docAppend (DocString $1) $2 }
+
{
happyError :: [Token] -> Either String a
happyError toks =