File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ L<action object|/language/grammars#Action_Objects> is recommended to be used in
93
93
conjunction with the grammar.
94
94
95
95
96
- = head2 X < Proto regexes| sym; :sym<>; proto regex >
96
+ = head2 X « Proto regexes| sym; :sym<>; proto regex »
97
97
98
98
If you have a lot of alternations, it may become difficult to produce
99
99
readable code or subclass your grammar. In the Actions class below, the
@@ -363,7 +363,8 @@ A slightly more involved example follows:
363
363
}
364
364
}
365
365
366
- my $res = KeyValuePairs.parse(q:to/EOI/, :actions(KeyValuePairsActions)).made;
366
+ my $actions = KeyValuePairsActions.new;
367
+ my $res = KeyValuePairs.parse(q:to/EOI/, :$actions).made;
367
368
second=b
368
369
hits=42
369
370
perl=6
@@ -376,11 +377,11 @@ A slightly more involved example follows:
376
377
377
378
This produces the following output:
378
379
379
- = begin code :lang<text>
380
- Key: second Value: b
381
- Key: hits Value: 42
382
- Key: perl Value: 6
383
- = end code
380
+ = begin code :lang<text>
381
+ Key: second Value: b
382
+ Key: hits Value: 42
383
+ Key: perl Value: 6
384
+ = end code
384
385
385
386
Rule C < pair > , which parsed a pair separated by an equals sign, aliases the two
386
387
calls to token C < identifier > to separate capture names to make them available
You can’t perform that action at this time.
0 commit comments