diff options
author | John Wiegley <johnw@newartisans.com> | 2008-08-01 02:20:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-08-01 02:20:29 -0400 |
commit | d213b32ffc6adaffa8e9ea4081b47c7b9403112c (patch) | |
tree | e91932047c126b41f72ec17f6e44f3c25eb85b33 /expr.h | |
parent | c98be731733176c9e9afb690619d806630ec9090 (diff) | |
download | ledger-d213b32ffc6adaffa8e9ea4081b47c7b9403112c.tar.gz ledger-d213b32ffc6adaffa8e9ea4081b47c7b9403112c.tar.bz2 ledger-d213b32ffc6adaffa8e9ea4081b47c7b9403112c.zip |
Value expressions now auto-compile themselves on first use if the expr_t
object is not constant. This saves classes that use expr_t from having to
track such a detail themselves.
Diffstat (limited to 'expr.h')
-rw-r--r-- | expr.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -59,6 +59,7 @@ public: private: ptr_op_t ptr; string str; + bool compiled; static void initialize(); static void shutdown(); @@ -97,6 +98,7 @@ public: void parse(std::istream& in, const unsigned int flags = 0); void compile(scope_t& scope); + value_t calc(scope_t& scope); value_t calc(scope_t& scope) const; bool is_constant() const; |