Skip to content

Commit 09d099b

Browse files
committed
Test to cover RT #131187.
1 parent a8f1b96 commit 09d099b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

S05-metasyntax/angle-brackets.t

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 94;
4+
plan 95;
55

66
=begin pod
77
@@ -315,4 +315,20 @@ character classes), and those are referenced at the correct spot.
315315
is('!abc!' ~~ /<<abc>>/, 'abc', 'both word boundaries (\W character)');
316316
}
317317
318+
# RT #131187
319+
{
320+
grammar Parser {
321+
token TOP { <matcher>+ }
322+
proto token matcher { * }
323+
token matcher:sym<[]> { '[' <( <-[\]]>+ )> ']' }
324+
token matcher:sym<lit> { <-[/*?[]>+ }
325+
}
326+
class RuleCompiler {
327+
# Empty action was needed to trigger the bug.
328+
method matcher:sym<[]>($/) { }
329+
}
330+
is Parser.parse('[AB].txt', :actions(RuleCompiler))<matcher>[1], '.txt',
331+
'Interaction of quantifier, <(, )>, and action method ok';
332+
}
333+
318334
# vim: ft=perl6

0 commit comments

Comments
 (0)