From 218a333e8394aac053b7d7acce2a95deb56709a4 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 28 Oct 2009 23:07:03 -0400 Subject: Fixes to the new query expression parser --- src/predicate.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/predicate.h') 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 +args_to_predicate(value_t::sequence_t::const_iterator begin, + value_t::sequence_t::const_iterator end); } // namespace ledger -- cgit v1.2.3