#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Fri, 06 Sep 2019 09:54:58 +0200
changeset 4543 b2f5c92b579b
parent 4542 6ebb1ee3f2e6
child 4544 1922441d96ff
#REFACTORING by exept class: PluggableParseNodeVisitor removed: #actionForNodeClass:put: #visit: class: PluggableParseNodeVisitor class added: #isObsolete comment/format in: #documentation
PluggableParseNodeVisitor.st
--- a/PluggableParseNodeVisitor.st	Fri Sep 06 09:54:50 2019 +0200
+++ b/PluggableParseNodeVisitor.st	Fri Sep 06 09:54:58 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "{ Package: 'stx:libcomp' }"
 
 "{ NameSpace: Smalltalk }"
@@ -13,6 +15,9 @@
 
 documentation
 "
+    obsolete not, because the superclass is now pluggable.
+    left in the system for a while for backward compatibility.
+
     a pluggable node visitor.
     setup with:
         actionForNodeClass:aClass put:aBlock
@@ -26,33 +31,10 @@
 "
 ! !
 
-!PluggableParseNodeVisitor methodsFor:'setup'!
-
-actionForNodeClass:aNodeClass put:aBlock
-    "setup so that for nodes of type aNodeClass, aBlock is invoked.
-     If the block returns true, subnodes (eg. right side of assignments, etc.)
-     will be enumerated as well.
-     Otherwise, no subnodes are visited."
-
-    actionsPerNodeType isNil ifTrue:[
-         actionsPerNodeType := Dictionary new.
-    ].
-    actionsPerNodeType at:aNodeClass put:aBlock
-! !
+!PluggableParseNodeVisitor class methodsFor:'queries'!
 
-!PluggableParseNodeVisitor methodsFor:'visiting'!
-
-visit:aNodeObject
-    "redefined to look for an action for this node's class.
-     If there is one, it can specify if subnodes are to be visited too"
-     
-    |action|
-
-    action := actionsPerNodeType at:aNodeObject class ifAbsent:[nil].
-    action notNil ifTrue:[ 
-        (action value:aNodeObject) ifFalse:[^ self].
-    ].
-    super visit:aNodeObject
+isObsolete   
+    ^ true
 ! !
 
 !PluggableParseNodeVisitor class methodsFor:'documentation'!