summaryrefslogtreecommitdiff
path: root/src/parser.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-05-22 18:45:42 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-05-22 21:35:03 -0400
commita3482606dc33b88d2ae661e49c6b15b902497421 (patch)
tree19d3946e11d0fd8fe0d72859d5bfb3f0e66e7c07 /src/parser.h
parent3e1ec40551184010d6ff3272d68b3ff17ff1ad26 (diff)
downloadfork-ledger-a3482606dc33b88d2ae661e49c6b15b902497421.tar.gz
fork-ledger-a3482606dc33b88d2ae661e49c6b15b902497421.tar.bz2
fork-ledger-a3482606dc33b88d2ae661e49c6b15b902497421.zip
Improved error reporting in the expression parser
Fixes 15A80F68-F233-49D9-AF0C-9908BB6903BA
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser.h b/src/parser.h
index 5eba4ffd..aab48830 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -52,11 +52,12 @@ class expr_t::parser_t : public noncopyable
mutable token_t lookahead;
mutable bool use_lookahead;
- token_t& next_token(std::istream& in, const parse_flags_t& tflags) const {
+ token_t& next_token(std::istream& in, const parse_flags_t& tflags,
+ const char expecting = '\0') const {
if (use_lookahead)
use_lookahead = false;
else
- lookahead.next(in, tflags);
+ lookahead.next(in, tflags, expecting);
return lookahead;
}