summaryrefslogtreecommitdiff
path: root/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-21 03:41:40 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-21 03:41:40 -0400
commit9f8a32ab48d38fe74da2042c0a438fc88543acef (patch)
tree5b344e35b8f3cb72c04c2e5d9716113e1c09f13e /textual.cc
parent565a128b1a2eac7d6603d972dd3e14ce80c53c61 (diff)
downloadfork-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.cc28
1 files changed, 12 insertions, 16 deletions
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<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);