Improved error report for literal string with %word

This commit is contained in:
yhirose 2022-05-29 00:52:39 -04:00
parent 9768721b2b
commit 89f40ce7a6
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View File

@ -2535,7 +2535,10 @@ inline size_t parse_literal(const char *s, size_t n, SemanticValues &vs,
NotPredicate ope(c.wordOpe);
auto len = ope.parse(s + i, n - i, dummy_vs, dummy_c, dummy_dt);
if (fail(len)) { return len; }
if (fail(len)) {
c.set_error_pos(s, lit.data());
return len;
}
i += len;
}
}