aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockParse.y
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-05-07 15:37:15 +0000
committersimonmar <unknown>2002-05-07 15:37:15 +0000
commitadc8107866e9371b7b20e4e3985f9eca2e8ba52c (patch)
treea52a083d12fd3065e6258a036446e6cbf41be462 /src/HaddockParse.y
parent65fc31db4405340f1ca1130ff37ef5147423c89a (diff)
[haddock @ 2002-05-07 15:37:15 by simonmar]
Allow code blocks to be denoted with bird-tracks in addition to [...].
Diffstat (limited to 'src/HaddockParse.y')
-rw-r--r--src/HaddockParse.y8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y
index a406f3e4..87fb1af6 100644
--- a/src/HaddockParse.y
+++ b/src/HaddockParse.y
@@ -15,6 +15,7 @@ import HaddockTypes
URL { TokURL $$ }
'*' { TokBullet }
'(n)' { TokNumber }
+ '>' { TokBirdTrack }
PARA { TokPara }
STRING { TokString $$ }
@@ -44,9 +45,14 @@ olpara :: { ParsedDoc }
para :: { ParsedDoc }
: seq { docParagraph $1 }
+ | codepara { DocCodeBlock $1 }
+
+codepara :: { ParsedDoc }
+ : '>' seq codepara { docAppend $2 $3 }
+ | '>' seq { $2 }
seq :: { ParsedDoc }
- : elem seq { DocAppend $1 $2 }
+ : elem seq { docAppend $1 $2 }
| elem { $1 }
elem :: { ParsedDoc }