Permalink
Browse files

correctly print $stop in s///-panic

This is a workaround for nqp issue #105.
  • Loading branch information...
1 parent 3e58687 commit d7a961c9b093d36d01e4158b76db4d1bccef05ef @FROGGS FROGGS committed Jun 28, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Perl6/Grammar.nqp
View
@@ -2834,7 +2834,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
<babble($l)>
{ my $B := $<babble><B>.ast; $lang := $B[0]; $start := $B[1]; $stop := $B[2]; }
- $start <left=.nibble($lang)> [ $stop || <.panic: "Couldn't find terminator $stop"> ]
+ $start <left=.nibble($lang)> [ $stop || <.panic("Couldn't find terminator $stop")> ]
[ <?{ $start ne $stop }>
<.ws>
[ <?[ \[ \{ \( \< ]> <.obs('brackets around replacement', 'assignment syntax')> ]?
@@ -2845,7 +2845,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
[ <right=.EXPR('i')> || <.panic: "Assignment operator missing its expression"> ]
||
{ $lang := self.quote_lang($lang2, $stop, $stop, @lang2tweaks); }
- <right=.nibble($lang)> $stop || <.panic: "Malformed replacement part; couldn't find final $stop">
+ <right=.nibble($lang)> $stop || <.panic("Malformed replacement part; couldn't find final $stop")>
]
}

0 comments on commit d7a961c

Please sign in to comment.