[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] ParseTreeRewriter refactoring

From: Stephen Compall
Subject: Re: [Help-smalltalk] ParseTreeRewriter refactoring
Date: Thu, 11 Jan 2007 04:27:18 -0600

I'm a Lisper at heart, and it shows.  List list list list list!

On Thu, 2007-01-11 at 10:58 +0100, Paolo Bonzini wrote:
> Oh, yes, of course.  Just no selector names, everything else is ok.  Do 
> you need "visitor: #foo" or can it be hardcoded too #visitNode:onMatch:?

I added it so that "node list" node fields would have the same semantic
possibilities as direct node fields, for both node lists (like
sequence's #statements) and argument lists (like sequence's #arguments).
I originally had #visitNodeList:onMatch: and
#visitArgumentList:onMatch:, but because I only used them once each in
#visitListField:onMatch: and #visitArgumentsField:onMatch: respectively,
I merged them.

Since the field visitors are gone, reintroducing #visitNodeList:onMatch:
and #visitArgumentList:onMatch: would be worthwhile again, but they need
to either call visitNodeList:visitor:onMatch: or be mostly copies of one
another, but for one selector.

If it influences you at all, I need to specialize
#visitNodeList:visitor:onMatch: or its equivalent, and I'll probably
remerge them in my subclass if you split them completely, just to reduce
duplication in my own code.  I'm no duplicatoclast in PTR, though, as
you can see by the definitions of #visit{Node,Argument}:onMatch:.  :)

I wish these sorts of things would be done by arguments, rather than
selectors :/

Stephen Compall

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]