mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 21:02:04 +03:00
lib: pushAccount -> pushDeclaredAccount
This commit is contained in:
parent
8c18bada0c
commit
598129ad6a
@ -39,7 +39,7 @@ module Hledger.Read.Common (
|
||||
getDefaultCommodityAndStyle,
|
||||
getDefaultAmountStyle,
|
||||
getAmountStyle,
|
||||
pushAccount,
|
||||
pushDeclaredAccount,
|
||||
pushParentAccount,
|
||||
popParentAccount,
|
||||
getParentAccount,
|
||||
@ -265,8 +265,8 @@ getAmountStyle commodity = do
|
||||
let effectiveStyle = listToMaybe $ catMaybes [specificStyle, defaultStyle]
|
||||
return effectiveStyle
|
||||
|
||||
pushAccount :: AccountName -> JournalParser m ()
|
||||
pushAccount acct = modify' (\j -> j{jdeclaredaccounts = (acct, Nothing) : jdeclaredaccounts j})
|
||||
pushDeclaredAccount :: AccountName -> JournalParser m ()
|
||||
pushDeclaredAccount acct = modify' (\j -> j{jdeclaredaccounts = acct : jdeclaredaccounts j})
|
||||
|
||||
pushParentAccount :: AccountName -> JournalParser m ()
|
||||
pushParentAccount acct = modify' (\j -> j{jparseparentaccounts = acct : jparseparentaccounts j})
|
||||
|
@ -265,8 +265,7 @@ accountdirectivep = do
|
||||
let macode :: Maybe AccountCode = read <$> macode'
|
||||
newline
|
||||
skipMany indentedlinep
|
||||
|
||||
modify' (\j -> j{jdeclaredaccounts = (acct, macode) : jdeclaredaccounts j})
|
||||
pushDeclaredAccount acct
|
||||
|
||||
indentedlinep :: JournalParser m String
|
||||
indentedlinep = lift (skipSome spacenonewline) >> (rstrip <$> lift restofline)
|
||||
|
Loading…
Reference in New Issue
Block a user