diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-07-27 21:04:38 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-07-27 21:04:38 -0700 |
commit | 973c7ecacf68e39ca51bb8633a032ff2fd9eda07 (patch) | |
tree | f975fb7d4cf9cc033f1cc955f3e177a6f68b22c0 | |
parent | c76ef95308632e97f6bddbed79ac82b2d23ebae0 (diff) | |
download | pandoc-973c7ecacf68e39ca51bb8633a032ff2fd9eda07.tar.gz |
Removed commented-out pandoc2 code.
This will be developed in a branch, noreparsing.
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 3dd129529..5ad6af891 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -939,44 +939,3 @@ applyMacros' target = do return $ applyMacros macros target else return target ----- pandoc2 block sep/line end parsers -{- - --- | Push parser onto stack of endline parsers. --- These are applied after a newline within a block. -pushEndline :: PMonad m => P t m () -> P t m () -pushEndline p = modifyState $ \st -> st{ sEndline = sEndline st |> p } - --- | Pop parser off stack of endline parsers. -popEndline :: PMonad m => P t m () -popEndline = do - st <- getState - case viewr (sEndline st) of - EmptyR -> logM ERROR "Tried to pop empty pEndline stack" - ps :> _ -> setState st{ sEndline = ps } - --- | Apply a parser in a context with a specified endline parser. -withEndline :: PMonad m => P t m a -> P t m b -> P t m b -withEndline sep p = pushEndline (() <$ sep) *> p <* popEndline - --- | Push parser onto stack of block separator parsers. --- These are applied after a newline following a block. -pushBlockSep :: PMonad m => P t m () -> P t m () -pushBlockSep p = modifyState $ \st -> st{ sBlockSep = sBlockSep st |> p } - --- | Pop parser off of stack of block separator parsers. -popBlockSep :: PMonad m => P t m () -popBlockSep = do - st <- getState - case viewr (sBlockSep st) of - EmptyR -> logM ERROR "Tried to pop empty pBlockSep stack" - ps :> _ -> setState st{ sBlockSep = ps } - --- | Apply a parser in a context with specified block separator parser. -withBlockSep :: PMonad m => P t m a -> P t m b -> P t m b -withBlockSep sep p = pushBlockSep (() <$ sep) *> p <* popBlockSep - --- | Parse a block separator. -pBlockSep :: PMonad m => P t m () -pBlockSep = try (getState >>= sequenceA . sBlockSep) >> return () --} |