From a56ad1cfc27124f9cb9e6b95ddc9d8c0dbebd52e Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 5 Sep 2018 23:15:35 -0400 Subject: [PATCH] Updated enter/leave examples --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c3b28b7..95342f1 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ assert(ret == false); *enter* and *leave* actions are also avalable. ```cpp -parser["RULE"].enter = [](any& dt) { +parser["RULE"].enter = [](const char* s, size_t n, any& dt) { std::cout << "enter" << std::endl; }; @@ -225,7 +225,7 @@ parser["RULE"] = [](const SemanticValues& sv, any& dt) { std::cout << "action!" << std::endl; }; -parser["RULE"].leave = [](any& dt) { +parser["RULE"].leave = [](const char* s, size_t n, size_t matchlen, any& value, any& dt) { std::cout << "leave" << std::endl; }; ```