On 8/3/06, Allison Randal <[EMAIL PROTECTED]> wrote:
Kevin Tew wrote:
> Patrick R. Michaud via RT wrote:
>> So, if we're going to allow other languages in the transform
>> bodies, we may want a "hereis" or podly {{...}}, {{{...}}} syntax to
>> delimit the transform bodies.  At the moment I'm leaning towards the
>> {{...}} form, if only because PGE is already using it.

I'm comfortable with multiplying curly brackets. We may also ultimately
offer a "shorthand" form something like:

  t/<tree pattern to match>/<code to transform tree>/

And allow all the perlish alternate delimiters.

> How about here doc style?
> This was mentioned on IRC by either Coke or Particle, I had the the same
> idea.

We talked about that at OSCON. The problem is that it encourages people
to think of the body of transform rules as strings. They aren't strings,
they're code blocks.

that may be a perl5 way of looking at it, but having written countless
pir tests with heredoc syntax, i for one am used to thinking of them
as more than just strings. but as long as there's a syntax that works,
i don't really care what it looks like

 pir_output_is( <<'CODE', <<'OUTPUT', 'description' );
 .sub 'main' :main
   say 'ok 1'
 .end
 CODE
 ok 1
 OUTPUT

~jerry

Reply via email to