Removed parameter from enable_packrat_parsing.

pull/3/head
yhirose 9 years ago
parent 5ed7c738a8
commit 0744fa75f6
  1. 4
      peglib.h
  2. 2
      test/test.cc

@ -2199,10 +2199,10 @@ public:
return (*grammar_)[s]; return (*grammar_)[s];
} }
void enable_packrat_parsing(bool sw) { void enable_packrat_parsing() {
if (grammar_ != nullptr) { if (grammar_ != nullptr) {
auto& rule = (*grammar_)[start_]; auto& rule = (*grammar_)[start_];
rule.enablePackratParsing = sw; rule.enablePackratParsing = true;
} }
} }

@ -244,7 +244,7 @@ TEST_CASE("Backtracking test", "[general]")
count++; count++;
}; };
parser.enable_packrat_parsing(true); parser.enable_packrat_parsing();
bool ret = parser.parse("Hello Two"); bool ret = parser.parse("Hello Two");
REQUIRE(ret == true); REQUIRE(ret == true);

Loading…
Cancel
Save