Removed parameter from enable_packrat_parsing.

This commit is contained in:
yhirose 2015-06-15 21:29:33 -04:00
parent 5ed7c738a8
commit 0744fa75f6
2 changed files with 3 additions and 3 deletions

View File

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

View File

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