diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-01-04 12:11:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-01-04 12:11:37 +0900 |
commit | 35c3a24c8cbcccff1108079360e2063fc354b4bd (patch) | |
tree | b274f69203f0575cff52483e04ff43e81477b902 /parse.y | |
parent | 68c2fc4cc0b3bbf865c381d1ff1281a3ac520cd6 (diff) |
Fixed error message when % at EOF
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |