mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2025-01-22 05:15:30 +00:00
Updated README
This commit is contained in:
parent
17e069fbc5
commit
ed84bb7219
@ -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;
|
||||
};
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user