diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-03 20:52:51 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-03 20:52:51 -0800 |
commit | 7ef07ea3fc89a33210cbf92c6bb3a3f553a3f174 (patch) | |
tree | 7f8499a31d05e4656bd56c8a9afe949a0fe6c175 /src | |
parent | 5a4f7ec595cb3c141d372c967a75c956a9173dc1 (diff) |
Added stateWarnings.
It is not connected to anything yet.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 9a6ac1671..3aa013fdc 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -726,7 +726,8 @@ data ParserState = ParserState stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered stateMacros :: [Macro], -- ^ List of macros defined so far - stateRstDefaultRole :: String -- ^ Current rST default interpreted text role + stateRstDefaultRole :: String, -- ^ Current rST default interpreted text role + stateWarnings :: [String] -- ^ Warnings generated by the parser } instance Default ParserState where @@ -753,7 +754,8 @@ defaultParserState = stateExamples = M.empty, stateHasChapters = False, stateMacros = [], - stateRstDefaultRole = "title-reference"} + stateRstDefaultRole = "title-reference", + stateWarnings = []} getOption :: (ReaderOptions -> a) -> Parser s ParserState a getOption f = (f . stateOptions) `fmap` getState |