From 35c3a24c8cbcccff1108079360e2063fc354b4bd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 4 Jan 2021 12:11:37 +0900 Subject: Fixed error message when % at EOF --- parse.y | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index bd1717d724..ff00fa8e35 100644 --- a/parse.y +++ b/parse.y @@ -8659,7 +8659,8 @@ parse_percent(struct parser_params *p, const int space_seen, const enum lex_stat c = nextc(p); quotation: - if (c == -1 || !ISALNUM(c)) { + if (c == -1) goto unterminated; + if (!ISALNUM(c)) { term = c; if (!ISASCII(c)) goto unknown; c = 'Q'; @@ -8677,6 +8678,7 @@ parse_percent(struct parser_params *p, const int space_seen, const enum lex_stat } } if (term == -1) { + unterminated: compile_error(p, "unterminated quoted string meets end of file"); return 0; } -- cgit v1.2.3