On 12/6/05, Luke Palmer <[EMAIL PROTECTED]> wrote:
> That still leaves the problem of what to do with fail() and is() in
> the compiler suite.
>
> Here's a handwavey crack at what I was talking about:

Ack.  Accidentally sent the half written message.  Let's try again:

    my $comparators = set < == eq === ~~ < lt ... >
    macro is($arg, ?$reason_tree) {
        if $arg ~~ :(App (func => my $f, args => my @args))
           && $f (in) $comparators {
             "internal_ok($arg, '@args[0] $f @args[1] failed: ' ~ $reason_tree)"
        }
        else {
             "internal_ok($arg, $reason_tree)"
        }
    }

Except hopefully with quasiquoting instead of simple interpolation.

Luke

Reply via email to