From ed84bb7219bf896bfaed0054165cb600199a54f2 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 30 Apr 2023 10:29:06 +0900 Subject: [PATCH] Updated README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c24156..0dba510 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ assert(ret == false); *enter* and *leave* actions are also available. ```cpp -parser["RULE"].enter = [](const char* s, size_t n, any& dt) { +parser["RULE"].enter = [](const Context &c, const char* s, size_t n, any& dt) { std::cout << "enter" << std::endl; }; @@ -255,7 +255,7 @@ parser["RULE"] = [](const SemanticValues& vs, any& dt) { std::cout << "action!" << std::endl; }; -parser["RULE"].leave = [](const char* s, size_t n, size_t matchlen, any& value, any& dt) { +parser["RULE"].leave = [](const Context &c, const char* s, size_t n, size_t matchlen, any& value, any& dt) { std::cout << "leave" << std::endl; }; ```