From 9f8a32ab48d38fe74da2042c0a438fc88543acef Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 21 Sep 2004 03:41:40 -0400 Subject: fixed several issues in value_t's core --- textual.cc | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'textual.cc') diff --git a/textual.cc b/textual.cc index 4f60d898..ef646661 100644 --- a/textual.cc +++ b/textual.cc @@ -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 save_path(path); push_var 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); -- cgit v1.2.3