From a3482606dc33b88d2ae661e49c6b15b902497421 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 22 May 2010 18:45:42 -0400 Subject: Improved error reporting in the expression parser Fixes 15A80F68-F233-49D9-AF0C-9908BB6903BA --- src/parser.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/parser.h') 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; } -- cgit v1.2.3