From ff33d16935ca6eb27a7c6b3ce337e0be9369f2d7 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sun, 22 Jun 2014 20:36:16 +0100 Subject: [PATCH] Better language detection. --- liblll/Parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/liblll/Parser.cpp b/liblll/Parser.cpp index 13faf5839..0ae3c6fee 100644 --- a/liblll/Parser.cpp +++ b/liblll/Parser.cpp @@ -118,6 +118,9 @@ void eth::parseTreeLLL(string const& _s, sp::utree& o_out) if (!incomment) s.push_back(i); } - qi::phrase_parse(s.cbegin(), s.cend(), element, space, qi::skip_flag::dont_postskip, o_out); + auto ret = s.cbegin(); + qi::phrase_parse(ret, s.cend(), element, space, qi::skip_flag::dont_postskip, o_out); + if (ret != s.cend()) + throw std::exception(); }