Author: jonathan
Date: Tue May 6 06:15:43 2008
New Revision: 27341
Modified:
trunk/languages/perl6/src/classes/Grammar.pir
Log:
[rakudo] Should be able to smartmatch against grammar protoobject as well as an
instantiation of it.
Modified: trunk/languages/perl6/src/classes/Grammar.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Grammar.pir (original)
+++ trunk/languages/perl6/src/classes/Grammar.pir Tue May 6 06:15:43 2008
@@ -40,7 +40,10 @@
$S0 = self.'WHAT'()
match = TOP(topic, 'grammar' => $S0)
$P0 = getinterp
+ $P1 = $P0['lexpad';1]
+ unless null $P1 goto found_pad
$P1 = $P0['lexpad';2]
+found_pad:
$P1['$/'] = match
.return(match)