Skip to content

Commit

Permalink
quantifier with % error includes the token it appears in
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 10, 2016
1 parent d3d36db commit d633c04
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S05-grammar/example.t
@@ -1,7 +1,9 @@
use v6;
use lib 't/spec/packages';
use Test;
use Test::Util;

plan 9;
plan 10;

=pod calling a rule a grammar with arguments
Expand Down Expand Up @@ -70,4 +72,13 @@ is($content ~~ m/<schedule>/, $content, 'match rule');
is ~$result, 'all-good', 'token `return` parses things correctly';
}

# RT #124219
{
my $code = grammar Bug { token term { a }; token TOP { <term> % \n } }
~ Bug.parse( 'a' );;

is_run $code, { :out(''), :err(/'token TOP { <term>'/), :status },
'`quantifier with %` error includes the token it appears in';
}

# vim: ft=perl6

0 comments on commit d633c04

Please sign in to comment.