mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Removed parameter from enable_packrat_parsing.
This commit is contained in:
parent
5ed7c738a8
commit
0744fa75f6
4
peglib.h
4
peglib.h
@ -2199,10 +2199,10 @@ public:
|
||||
return (*grammar_)[s];
|
||||
}
|
||||
|
||||
void enable_packrat_parsing(bool sw) {
|
||||
void enable_packrat_parsing() {
|
||||
if (grammar_ != nullptr) {
|
||||
auto& rule = (*grammar_)[start_];
|
||||
rule.enablePackratParsing = sw;
|
||||
rule.enablePackratParsing = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ TEST_CASE("Backtracking test", "[general]")
|
||||
count++;
|
||||
};
|
||||
|
||||
parser.enable_packrat_parsing(true);
|
||||
parser.enable_packrat_parsing();
|
||||
|
||||
bool ret = parser.parse("Hello Two");
|
||||
REQUIRE(ret == true);
|
||||
|
Loading…
Reference in New Issue
Block a user