Improved error report for literal string with %word

pull/207/head
yhirose 2 years ago
parent 9768721b2b
commit 89f40ce7a6
  1. BIN
      docs/native.wasm
  2. 5
      peglib.h

Binary file not shown.

@ -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;
}
}

Loading…
Cancel
Save