aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Parse.y
diff options
context:
space:
mode:
authorKazu Yamamoto <kazu@iij.ad.jp>2012-04-09 15:45:57 +0900
committerSimon Hengel <sol@typeful.net>2012-10-09 12:45:31 +0200
commit72675c1bf281b81041a19014b1b7df03a0de9488 (patch)
tree70b5fd4875eb604d1b092912d84a1fc696126b2a /src/Haddock/Parse.y
parentac8417bd0e947d81713a8ec31fe048aa43e34c03 (diff)
Add markup support for properties
Diffstat (limited to 'src/Haddock/Parse.y')
-rw-r--r--src/Haddock/Parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Haddock/Parse.y b/src/Haddock/Parse.y
index b34b14b9..c8a1a558 100644
--- a/src/Haddock/Parse.y
+++ b/src/Haddock/Parse.y
@@ -35,6 +35,8 @@ import Data.List (stripPrefix)
'-' { (TokBullet,_) }
'(n)' { (TokNumber,_) }
'>..' { (TokBirdTrack $$,_) }
+ PPROMPT { (TokPropertyPrompt $$,_) }
+ PEXP { (TokPropertyExpression $$,_) }
PROMPT { (TokExamplePrompt $$,_) }
RESULT { (TokExampleResult $$,_) }
EXP { (TokExampleExpression $$,_) }
@@ -73,12 +75,16 @@ defpara :: { (Doc RdrName, Doc RdrName) }
para :: { Doc RdrName }
: seq { docParagraph $1 }
| codepara { DocCodeBlock $1 }
+ | property { DocProperty $1 }
| examples { DocExamples $1 }
codepara :: { Doc RdrName }
: '>..' codepara { docAppend (DocString $1) $2 }
| '>..' { DocString $1 }
+property :: { String }
+ : PPROMPT PEXP { strip $2 }
+
examples :: { [Example] }
: example examples { $1 : $2 }
| example { [$1] }