mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed problem with Result::le
This commit is contained in:
parent
ee2dad387d
commit
1594ee5613
8
peglib.h
8
peglib.h
@ -2401,14 +2401,18 @@ private:
|
|||||||
|
|
||||||
auto len = whitespaceOpe->parse(s, n, vs, c, dt);
|
auto len = whitespaceOpe->parse(s, n, vs, c, dt);
|
||||||
if (fail(len)) {
|
if (fail(len)) {
|
||||||
return Result{success(len), c.recovered, len, c.error_info};
|
return Result{false, c.recovered, i, c.error_info};
|
||||||
}
|
}
|
||||||
|
|
||||||
i = len;
|
i = len;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto len = ope->parse(s + i, n - i, vs, c, dt);
|
auto len = ope->parse(s + i, n - i, vs, c, dt);
|
||||||
return Result{success(i + len), c.recovered, i + len, c.error_info};
|
if (success(len)) {
|
||||||
|
return Result{true, c.recovered, i + len, c.error_info};
|
||||||
|
} else {
|
||||||
|
return Result{false, c.recovered, i, c.error_info};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Holder> holder_;
|
std::shared_ptr<Holder> holder_;
|
||||||
|
Loading…
Reference in New Issue
Block a user