diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-19 03:11:00 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:39:05 -0400 |
commit | 5a72d17d026aa6a1bb0cd32f413963ef9f24ab64 (patch) | |
tree | 5aec31b69f0dcba9ff07f8a8d4abad60a00c0655 /src/compile.cc | |
parent | cdea8aa18c8bbd018849fb890dba87f7ef1a1140 (diff) | |
download | ledger-5a72d17d026aa6a1bb0cd32f413963ef9f24ab64.tar.gz ledger-5a72d17d026aa6a1bb0cd32f413963ef9f24ab64.tar.bz2 ledger-5a72d17d026aa6a1bb0cd32f413963ef9f24ab64.zip |
Node compilation is beginning to work.
Diffstat (limited to 'src/compile.cc')
-rw-r--r-- | src/compile.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/compile.cc b/src/compile.cc index fa17cf2a..b5d575a0 100644 --- a/src/compile.cc +++ b/src/compile.cc @@ -34,5 +34,29 @@ namespace ledger { namespace xml { +void entry_node_t::compile() +{ + typedef std::list<attributes_t::iterator> iterator_list; + + iterator_list to_update; + + for (attributes_t::iterator i = attributes->begin(); + i != attributes->end(); + i++) + if (i->first == DATE_ATTR && i->second.is_string()) + //i->second = parse_datetime(i->second.as_string().c_str()); + to_update.push_back(i); + + for (iterator_list::iterator i = to_update.begin(); + i != to_update.end(); + i++) { + attr_pair attr_def = **i; + attributes->erase(*i); + + attr_def.second = parse_datetime(attr_def.second.as_string().c_str()); + attributes->push_back(attr_def); + } +} + } // namespace xml } // namespace ledger |