#REFACTORING by exept
class: PluggableParseNodeVisitor
removed:
#actionForNodeClass:put:
#visit:
class: PluggableParseNodeVisitor class
added: #isObsolete
comment/format in: #documentation
--- 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'!