Hywan / atoum-instrumentation

The atoum\instrumentation library. Instrumentation for PHP (moles, code coverage…)
7 stars 2 forks source link

Use token string value or ID in rules #5

Open jubianchi opened 10 years ago

jubianchi commented 10 years ago

It would be handy to be able to write rules using tokens' string value and/or ID:

$rules[] = array(
    array(T_RETURN, $…, ';'),
    array('mark_line(__LINE__)', ';', 'return ', '\2', ';'),
    $matching::SHIFT_REPLACEMENT_END
);

This could be used to fix the behavior described in #4

Hywan commented 10 years ago

Hello,

Yup, I think we should do that.