About RBProgramNodeVisitor >> visitMethodNode: aMethodNode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

About RBProgramNodeVisitor >> visitMethodNode: aMethodNode

Stéphane Ducasse
While I can understand that RBProgramNodeVisitor >> visitMethodNode: aMethodNode does not return a value. 
- because visiting a program does not mean automatically to interpret it. 

RBProgramNodeVisitor >> visitMethodNode: aMethodNode
self visitArgumentNodes: aMethodNode arguments.
aMethodNode pragmas do: [ :each | self visitNode: each ].
self visitNode: aMethodNode body

I was wondering if we could have visitBody

RBProgramNodeVisitor >> visitMethodNode: aMethodNode
self visitArgumentNodes: aMethodNode arguments.
aMethodNode pragmas do: [ :each | self visitNode: each ].
self visitBody: aMethodNode


RBProgramNodeVisitor >> visitBody: aMethodNode
self visitNode: aMethodNode body

So that subclasses can simply override it instead of being forced to override visitMethodNode: ?


S


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France