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, 8 insertions, 2 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y
index 29b3b70a..dbc97446 100644
--- a/src/HaddockParse.y
+++ b/src/HaddockParse.y
@@ -9,10 +9,12 @@ import HsSyn
%token '/' { TokSpecial '/' }
'@' { TokSpecial '@' }
+ '[' { TokDefStart }
+ ']' { TokDefEnd }
DQUO { TokSpecial '\"' }
URL { TokURL $$ }
ANAME { TokAName $$ }
- '*' { TokBullet }
+ '-' { TokBullet }
'(n)' { TokNumber }
'>..' { TokBirdTrack $$ }
IDENT { TokIdent $$ }
@@ -35,14 +37,18 @@ doc :: { Doc }
apara :: { Doc }
: ulpara { DocUnorderedList [$1] }
| olpara { DocOrderedList [$1] }
+ | defpara { DocDefList [$1] }
| para { $1 }
ulpara :: { Doc }
- : '*' para { $2 }
+ : '-' para { $2 }
olpara :: { Doc }
: '(n)' para { $2 }
+defpara :: { (Doc,Doc) }
+ : '[' seq ']' seq { ($2, $4) }
+
para :: { Doc }
: seq { docParagraph $1 }
| codepara { DocCodeBlock $1 }