mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed error posision problem in Repetition operator
This commit is contained in:
parent
847b7e9fe3
commit
6ed41b0571
BIN
docs/native.wasm
BIN
docs/native.wasm
Binary file not shown.
2
peglib.h
2
peglib.h
@ -901,7 +901,6 @@ public:
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto save_error_pos = c.error_pos;
|
|
||||||
while (n - i > 0 && count < max_) {
|
while (n - i > 0 && count < max_) {
|
||||||
c.push_capture_scope();
|
c.push_capture_scope();
|
||||||
auto se = scope_exit([&]() { c.pop_capture_scope(); });
|
auto se = scope_exit([&]() { c.pop_capture_scope(); });
|
||||||
@ -921,7 +920,6 @@ public:
|
|||||||
vs.tokens.erase(vs.tokens.begin() +
|
vs.tokens.erase(vs.tokens.begin() +
|
||||||
static_cast<std::ptrdiff_t>(save_tok_size));
|
static_cast<std::ptrdiff_t>(save_tok_size));
|
||||||
}
|
}
|
||||||
c.error_pos = save_error_pos;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i += len;
|
i += len;
|
||||||
|
Loading…
Reference in New Issue
Block a user