imp: journal: ignore value directives (ledger compat)
This commit is contained in:
parent
fb7134c9a0
commit
2e77586d1b
@ -256,6 +256,7 @@ directivep = (do
|
|||||||
,ignoredpricecommoditydirectivep
|
,ignoredpricecommoditydirectivep
|
||||||
,tagdirectivep
|
,tagdirectivep
|
||||||
,endtagdirectivep
|
,endtagdirectivep
|
||||||
|
,valuedirectivep
|
||||||
]
|
]
|
||||||
) <?> "directive"
|
) <?> "directive"
|
||||||
|
|
||||||
@ -525,8 +526,9 @@ formatdirectivep expectedsym = do
|
|||||||
|
|
||||||
-- More Ledger directives, ignore for now:
|
-- More Ledger directives, ignore for now:
|
||||||
-- apply fixed, apply tag, assert, bucket, A, capture, check, define, expr
|
-- apply fixed, apply tag, assert, bucket, A, capture, check, define, expr
|
||||||
applyfixeddirectivep, applytagdirectivep, assertdirectivep, bucketdirectivep, capturedirectivep,
|
applyfixeddirectivep, applytagdirectivep, assertdirectivep, bucketdirectivep,
|
||||||
checkdirectivep, definedirectivep, exprdirectivep, commandlineflagdirectivep :: JournalParser m ()
|
capturedirectivep, checkdirectivep, definedirectivep, exprdirectivep,
|
||||||
|
valuedirectivep, commandlineflagdirectivep :: JournalParser m ()
|
||||||
applyfixeddirectivep = do string "apply fixed" >> lift restofline >> return ()
|
applyfixeddirectivep = do string "apply fixed" >> lift restofline >> return ()
|
||||||
applytagdirectivep = do string "apply tag" >> lift restofline >> return ()
|
applytagdirectivep = do string "apply tag" >> lift restofline >> return ()
|
||||||
assertdirectivep = do string "assert" >> lift restofline >> return ()
|
assertdirectivep = do string "assert" >> lift restofline >> return ()
|
||||||
@ -535,6 +537,7 @@ capturedirectivep = do string "capture" >> lift restofline >> return ()
|
|||||||
checkdirectivep = do string "check" >> lift restofline >> return ()
|
checkdirectivep = do string "check" >> lift restofline >> return ()
|
||||||
definedirectivep = do string "define" >> lift restofline >> return ()
|
definedirectivep = do string "define" >> lift restofline >> return ()
|
||||||
exprdirectivep = do string "expr" >> lift restofline >> return ()
|
exprdirectivep = do string "expr" >> lift restofline >> return ()
|
||||||
|
valuedirectivep = do string "value" >> lift restofline >> return ()
|
||||||
commandlineflagdirectivep = do string "--" >> lift restofline >> return ()
|
commandlineflagdirectivep = do string "--" >> lift restofline >> return ()
|
||||||
|
|
||||||
keywordp :: String -> JournalParser m ()
|
keywordp :: String -> JournalParser m ()
|
||||||
|
|||||||
@ -2750,6 +2750,7 @@ check EXPR
|
|||||||
define VAR=EXPR
|
define VAR=EXPR
|
||||||
expr EXPR
|
expr EXPR
|
||||||
tag NAME
|
tag NAME
|
||||||
|
value EXPR
|
||||||
--command-line-flag
|
--command-line-flag
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,7 @@ N USD
|
|||||||
tag Receipt
|
tag Receipt
|
||||||
check value =~ /pattern/
|
check value =~ /pattern/
|
||||||
assert value != "foobar"
|
assert value != "foobar"
|
||||||
|
value some_func
|
||||||
--command-line-flag
|
--command-line-flag
|
||||||
|
|
||||||
$ hledger -f- check
|
$ hledger -f- check
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user