mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-23 04:15:31 +00:00
Fix a small type in a calc example in Readme.md
This commit is contained in:
parent
be470f9332
commit
3f57797cbf
@ -72,7 +72,7 @@ int main(void) {
|
|||||||
parser["Multitive"] = [](const SemanticValues& sv) {
|
parser["Multitive"] = [](const SemanticValues& sv) {
|
||||||
switch (sv.choice()) {
|
switch (sv.choice()) {
|
||||||
case 0: // "Primary '*' Multitive"
|
case 0: // "Primary '*' Multitive"
|
||||||
return any_cast<int>(sv[0]) + any_cast<int>(sv[1]);
|
return any_cast<int>(sv[0]) * any_cast<int>(sv[1]);
|
||||||
default: // "Primary"
|
default: // "Primary"
|
||||||
return any_cast<int>(sv[0]);
|
return any_cast<int>(sv[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user