On Sat, Sep 13, 2008 at 02:38:23PM +0200, Jonathan Worthington wrote:
> Patrick R. Michaud wrote:
>> I'd be happy to get PGE to attach whatever attributes or re-bless
>> the subs it generates to be Regex subs if we can come up with
>> a reasonably clean way to do that.
>>   
> I've pretty much decided I don't like the "attach the proto as a  
> property so we know what type it is" approach, since we then have to lie  
> about types in various places. So I think it's going to be a re-blessing  
> of some sort. 

Yay, I agree.  

> We just need to work out exactly what, and where. I guess  
> it's possible in loadinit...but we maybe wouldn't need PGE's help on  
> that, since it's a property of a PAST::Block. OTOH, PGE's output  
> survives as PIR until POST, so there may not be a lexid to attach the  
> loadinit to? I don't know how it looks down at that level without  
> checking. :-)

It's no problem -- PGE's output should stay as an AST until it gets
processed by the POST::Compiler, at which point it gets converted to
PIR (and POST::Compiler can pass along any needed :outer options,
as it does already).  So, we just get PGE to generate loadinits as well.

(There's also the slim chance that as part of upcoming refactorings
PGE will switch to generating POST instead of PIR directly, which
would also resolve the problem.)

Pm

Reply via email to