On Tue, Feb 10, 2009 at 08:32:50PM -0800, Chris Dolan wrote:
> The simple attached patch allows embedded code in PGE to call back  
> into Rakudo.  The double curlies are still necessary due to PGE  
> implementation details.  With this patch the following simple  
> examples work:
> 
> % perl6 -e '"" ~~ m/:lang(Perl6) {{ say "hi"; }}/'
> % perl6 -e '"" ~~ m/:lang(Perl6) {{ say 2+2; }}/'
> % perl6 -e '"" ~~ m/:lang(Perl6) {{ say 2**45; }}/'
> % perl6 -e '"" ~~ m/:lang(Perl6) {{ say exp(1); }}/'
> % perl6 -e '"" ~~ m/:lang(Perl6) {{ say pi; }}/'

Patch rejected, at least for the moment.  I'm not wanting to
turn compilers into invokable objects (that's an outdated
Parrot model that we're working to eliminate), and my experience
with grammar matching leads me to want to avoid creating
special syntax workarounds.

When PCT::HLLCompiler gets its refactor (soon) then PGE will
also be updated to correctly parse code blocks written
in other languages.

Thanks,

Pm

Reply via email to