diff options
author | John Wiegley <johnw@newartisans.com> | 2008-09-14 19:42:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-09-14 19:44:35 -0400 |
commit | db9f89100382b019892de66b0353c7f6fbef6f9d (patch) | |
tree | 52acc959ca3b1874ee780b939ae9ef9afe582ad6 /src/format.cc | |
parent | 53c6e826f1e41f29c86f1c86f179f38838123d1d (diff) | |
download | fork-ledger-db9f89100382b019892de66b0353c7f6fbef6f9d.tar.gz fork-ledger-db9f89100382b019892de66b0353c7f6fbef6f9d.tar.bz2 fork-ledger-db9f89100382b019892de66b0353c7f6fbef6f9d.zip |
Added value expression parsing flag EXPR_PARSE_SINGLE, which means to read
only a single expression and then quit immediately. Useful for parsing
expressions that begin with a left parenthesis and are known to end at the
right parenthesis.
Diffstat (limited to 'src/format.cc')
-rw-r--r-- | src/format.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/format.cc b/src/format.cc index 3b3c562a..121cdf63 100644 --- a/src/format.cc +++ b/src/format.cc @@ -212,7 +212,7 @@ format_t::element_t * format_t::parse_elements(const string& fmt) case '[': { std::istringstream str(p); current->type = element_t::EXPR; - current->expr.parse(str, EXPR_PARSE_PARTIAL); + current->expr.parse(str, EXPR_PARSE_SINGLE); istream_pos_type pos = str.tellg(); current->expr.set_text(string(p, p + long(pos))); p += long(pos) - 1; |