Skip to content

Commit

Permalink
fix LTA panic
Browse files Browse the repository at this point in the history
Closes #48.
  • Loading branch information
Carl Masak committed Jun 14, 2016
1 parent 2231f59 commit c1d413d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_007/Parser/Syntax.pm
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ grammar _007::Parser::Syntax {
<.newpad>
'(' ~ ')' <parameterlist>
<traitlist>
<blockoid>:!s
[<blockoid>|| <.panic("block")>]:!s
<.finishpad>
}
token statement:return {
Expand Down
15 changes: 15 additions & 0 deletions t/features/subs.t
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,19 @@ use _007::Test;
outputs $program, "Mr Bond\n", "it's OK to call your sub 'subtract'";
}

{
my $program = q:to/./;
sub fn()
.

my subset missing-block of X::Syntax::Missing where {
is(.what, "block", "got the right missing thing");
.what eq "block";
};

parse-error $program,
missing-block,
"parse error 'missing block' on missing block";
}

done-testing;

0 comments on commit c1d413d

Please sign in to comment.