mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Added enable_packrat_parsing to precedence expression parsing tests
This commit is contained in:
parent
ffc61e8a68
commit
c1f087a91e
@ -133,6 +133,8 @@ TEST_CASE("Precedence climbing", "[precedence]")
|
||||
T(S) <- < S > _
|
||||
)");
|
||||
|
||||
parser.enable_packrat_parsing();
|
||||
|
||||
// Setup actions
|
||||
parser["EXPRESSION"] = [](const SemanticValues& sv) -> long {
|
||||
auto result = any_cast<long>(sv[0]);
|
||||
@ -189,6 +191,8 @@ TEST_CASE("Precedence climbing with macro", "[precedence]")
|
||||
%whitespace <- [ \t]*
|
||||
)");
|
||||
|
||||
parser.enable_packrat_parsing();
|
||||
|
||||
bool ret = parser;
|
||||
REQUIRE(ret == true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user