summaryrefslogtreecommitdiff
path: root/src/predicate.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-28 23:07:03 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-28 23:07:03 -0400
commit218a333e8394aac053b7d7acce2a95deb56709a4 (patch)
tree6dfb041f7b10868611b539b58eeef2b2565d9a08 /src/predicate.h
parent9a07652fd8edf0b15efb8a658798adb968567e16 (diff)
downloadfork-ledger-218a333e8394aac053b7d7acce2a95deb56709a4.tar.gz
fork-ledger-218a333e8394aac053b7d7acce2a95deb56709a4.tar.bz2
fork-ledger-218a333e8394aac053b7d7acce2a95deb56709a4.zip
Fixes to the new query expression parser
Diffstat (limited to 'src/predicate.h')
-rw-r--r--src/predicate.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/predicate.h b/src/predicate.h
index e1048f83..dc39f2f2 100644
--- a/src/predicate.h
+++ b/src/predicate.h
@@ -98,6 +98,8 @@ public:
class query_lexer_t
{
+ friend class query_parser_t;
+
value_t::sequence_t::const_iterator begin;
value_t::sequence_t::const_iterator end;
@@ -246,10 +248,18 @@ public:
: lexer(begin, end) {}
expr_t::ptr_op_t parse();
+
+ value_t::sequence_t::const_iterator begin() const {
+ return lexer.begin;
+ }
+ value_t::sequence_t::const_iterator end() const {
+ return lexer.end;
+ }
};
-expr_t args_to_predicate(value_t::sequence_t::const_iterator& begin,
- value_t::sequence_t::const_iterator end);
+std::pair<value_t::sequence_t::const_iterator, expr_t>
+args_to_predicate(value_t::sequence_t::const_iterator begin,
+ value_t::sequence_t::const_iterator end);
} // namespace ledger