Added stateWarnings.
It is not connected to anything yet.
This commit is contained in:
parent
5a4f7ec595
commit
7ef07ea3fc
1 changed files with 4 additions and 2 deletions
|
@ -726,7 +726,8 @@ data ParserState = ParserState
|
||||||
stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers
|
stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers
|
||||||
stateHasChapters :: Bool, -- ^ True if \chapter encountered
|
stateHasChapters :: Bool, -- ^ True if \chapter encountered
|
||||||
stateMacros :: [Macro], -- ^ List of macros defined so far
|
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
|
instance Default ParserState where
|
||||||
|
@ -753,7 +754,8 @@ defaultParserState =
|
||||||
stateExamples = M.empty,
|
stateExamples = M.empty,
|
||||||
stateHasChapters = False,
|
stateHasChapters = False,
|
||||||
stateMacros = [],
|
stateMacros = [],
|
||||||
stateRstDefaultRole = "title-reference"}
|
stateRstDefaultRole = "title-reference",
|
||||||
|
stateWarnings = []}
|
||||||
|
|
||||||
getOption :: (ReaderOptions -> a) -> Parser s ParserState a
|
getOption :: (ReaderOptions -> a) -> Parser s ParserState a
|
||||||
getOption f = (f . stateOptions) `fmap` getState
|
getOption f = (f . stateOptions) `fmap` getState
|
||||||
|
|
Loading…
Add table
Reference in a new issue