Camille/o were trying to fix a bug in the CriticsRules and found a strange
limitation of the ParseTreeRewriter

Given:           Result:
------           -------
| a b |          | a b |
self halt.        
self bar.        self bar.

However this is not possible to specify directly:

RBParseTreeRewriter new
        replace: '`@object halt' with: ''.

As the parsed ' ' string will result in a SequenceNode, thus forcing
the original message node ('self halt') to be a sequence node.

So instead of looking for 'self halt' it will look for 
        ||
        self halt.
and thus it tries to explicitly match the temporary.

The result is, that we cannot remove 'self halt' with a rewrite rule
if the method/block contains temporaries :/.


Has anybody encountered this, or knows how to directly replace a message
node with an "empty node"?

best c&c

Reply via email to