Open timo opened 11 years ago
Some notes on this. Per @pmichaud at http://irclog.perlgeek.de/perl6/2013-10-08#i_7687034 NQP will need temp
, or at least :temp
since STD relies on it.
Given that we handle :my
in grammars by calling into the main LANG's statement rule, I think it'd make sense to implement temp in general code and do the same for :temp
. OTOH, Rakudo doesn't support :temp
in grammars, since it's not a declarator but a prefix operator.
Also implementation-wise, Rakudo's implementation of temp relies on the LEAVE phaser, which means that if we want to copy that implementation, we also have to implement phasers.
stumbled upon this while trying to make something like
work in order to get a proper reset for the variable in case of backtracking etc.
The current workaround seems to be to do
but it would be much nicer to be able to write