diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-21 03:41:40 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-21 03:41:40 -0400 |
commit | 9f8a32ab48d38fe74da2042c0a438fc88543acef (patch) | |
tree | 5b344e35b8f3cb72c04c2e5d9716113e1c09f13e /textual.cc | |
parent | 565a128b1a2eac7d6603d972dd3e14ce80c53c61 (diff) | |
download | fork-ledger-9f8a32ab48d38fe74da2042c0a438fc88543acef.tar.gz fork-ledger-9f8a32ab48d38fe74da2042c0a438fc88543acef.tar.bz2 fork-ledger-9f8a32ab48d38fe74da2042c0a438fc88543acef.zip |
fixed several issues in value_t's core
Diffstat (limited to 'textual.cc')
-rw-r--r-- | textual.cc | 28 |
1 files changed, 12 insertions, 16 deletions
@@ -532,22 +532,6 @@ unsigned int textual_parser_t::parse(std::istream& in, parse_automated_transactions(in, account_stack.front(), auto_xacts); break; - case '@': { // account specific - in >> c; - if (in.peek() == '@') { - in.get(c); - account_stack.pop_front(); - break; - } - - in.getline(line, MAX_LINE); - linenum++; - - account_t * acct = account_stack.front()->find_account(skip_ws(line)); - account_stack.push_front(acct); - break; - } - case '!': { // directive std::string word; in.get(c); @@ -560,9 +544,21 @@ unsigned int textual_parser_t::parse(std::istream& in, push_var<std::string> save_path(path); push_var<automated_transactions_t *> save_current_auto_xacts(current_auto_xacts); + count += parse_journal_file(skip_ws(line), journal, account_stack.front()); } + else if (word == "account") { + in.getline(line, MAX_LINE); + linenum++; + + account_t * acct; + acct = account_stack.front()->find_account(skip_ws(line)); + account_stack.push_front(acct); + } + else if (word == "end") { + account_stack.pop_front(); + } #ifdef USE_BOOST_PYTHON else if (word == "python") { in.getline(line, MAX_LINE); |