mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
;lib: comments
[ci skip]
This commit is contained in:
parent
9c4ef58154
commit
50f8539911
@ -1003,13 +1003,14 @@ multilinecommentp = startComment *> anyLine `skipManyTill` endComment
|
|||||||
|
|
||||||
{-# INLINABLE multilinecommentp #-}
|
{-# INLINABLE multilinecommentp #-}
|
||||||
|
|
||||||
|
-- | A blank or comment line in journal format: a line that's empty or
|
||||||
|
-- containing only whitespace or whose first non-whitespace character
|
||||||
|
-- is semicolon, hash, or star.
|
||||||
emptyorcommentlinep :: TextParser m ()
|
emptyorcommentlinep :: TextParser m ()
|
||||||
emptyorcommentlinep = do
|
emptyorcommentlinep = do
|
||||||
skipMany spacenonewline
|
skipMany spacenonewline
|
||||||
skiplinecommentp <|> void newline
|
skiplinecommentp <|> void newline
|
||||||
where
|
where
|
||||||
-- A line (file-level) comment can start with a semicolon, hash, or star
|
|
||||||
-- (allowing org nodes).
|
|
||||||
skiplinecommentp :: TextParser m ()
|
skiplinecommentp :: TextParser m ()
|
||||||
skiplinecommentp = do
|
skiplinecommentp = do
|
||||||
satisfy $ \c -> c == ';' || c == '#' || c == '*'
|
satisfy $ \c -> c == ';' || c == '#' || c == '*'
|
||||||
|
@ -204,8 +204,8 @@ dbg9With = ptraceAtWith 9
|
|||||||
dbgExit :: Show a => String -> a -> a
|
dbgExit :: Show a => String -> a -> a
|
||||||
dbgExit msg = const (unsafePerformIO exitFailure) . dbg0 msg
|
dbgExit msg = const (unsafePerformIO exitFailure) . dbg0 msg
|
||||||
|
|
||||||
-- | Like ptraceAt, but convenient to insert in an IO monad (plus
|
-- | Like ptraceAt, but convenient to insert in an IO monad and
|
||||||
-- convenience aliases).
|
-- enforces monadic sequencing (plus convenience aliases).
|
||||||
-- XXX These have a bug; they should use
|
-- XXX These have a bug; they should use
|
||||||
-- traceIO, not trace, otherwise GHC can occasionally over-optimise
|
-- traceIO, not trace, otherwise GHC can occasionally over-optimise
|
||||||
-- (cf lpaste a few days ago where it killed/blocked a child thread).
|
-- (cf lpaste a few days ago where it killed/blocked a child thread).
|
||||||
|
Loading…
Reference in New Issue
Block a user