We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6996421 commit d928883Copy full SHA for d928883
doc/Language/grammars.pod6
@@ -340,9 +340,15 @@ grammar KeyValuePairs {
340
}
341
342
class KeyValuePairsActions {
343
- method identifier($/) { $/.make: ~$/ }
344
method pair ($/) { $/.make: $<key>.made => $<value>.made }
345
- method TOP ($/) { $/.make: $<pair>».made }
+ method identifier($/) {
+ # subroutine `make` is the same as calling .make on $/
346
+ make ~$/
347
+ }
348
+ method TOP ($match) {
349
+ # can use any variable name for parameter, not just $/
350
+ $match.make: $match<pair>».made
351
352
353
354
my $res = KeyValuePairs.parse(q:to/EOI/, :actions(KeyValuePairsActions)).made;
0 commit comments