mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2025-01-22 21:35:29 +00:00
Fixed incorrect semantic values with NotPredicate.
This commit is contained in:
parent
80d1488b42
commit
1ac16f3184
4
peglib.h
4
peglib.h
@ -747,7 +747,9 @@ public:
|
|||||||
size_t parse(const char* s, size_t n, SemanticValues& sv, Context& c, any& dt) const override {
|
size_t parse(const char* s, size_t n, SemanticValues& sv, Context& c, any& dt) const override {
|
||||||
auto save_error_pos = c.error_pos;
|
auto save_error_pos = c.error_pos;
|
||||||
const auto& rule = *ope_;
|
const auto& rule = *ope_;
|
||||||
auto len = rule.parse(s, n, sv, c, dt);
|
auto& chldsv = c.push();
|
||||||
|
auto len = rule.parse(s, n, chldsv, c, dt);
|
||||||
|
c.pop();
|
||||||
if (success(len)) {
|
if (success(len)) {
|
||||||
c.set_error_pos(s);
|
c.set_error_pos(s);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user