From 72cdb9cd5afd6936a189b26a29eb8aa23d32a4fa Mon Sep 17 00:00:00 2001 From: Charley Wang Date: Tue, 23 Mar 2010 11:55:56 -0400 Subject: PR10913: Fix error messages when unable to close certain tokens --- parse.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'parse.cxx') diff --git a/parse.cxx b/parse.cxx index 06ba88e9..6cdf76d9 100644 --- a/parse.cxx +++ b/parse.cxx @@ -894,8 +894,7 @@ skip: if (c < 0 || c == '\n') { - n->type = tok_junk; - break; + throw parse_error("Could not find matching closing quote", n); } if (c == '\"') // closing double-quotes break; @@ -994,8 +993,8 @@ skip: c = c2; c2 = input_get (); } - n->type = tok_junk; - return n; + + throw parse_error ("Could not find matching '%}' to close embedded function block", n); } // We're committed to recognizing at least the first character -- cgit