diff --git a/docs/native.wasm b/docs/native.wasm index 6f42a98..a53b8d7 100755 Binary files a/docs/native.wasm and b/docs/native.wasm differ diff --git a/peglib.h b/peglib.h index d225804..82a719f 100644 --- a/peglib.h +++ b/peglib.h @@ -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; } }