PluggableParseNodeVisitor.st
author Claus Gittinger <cg@exept.de>
Fri, 06 Sep 2019 09:54:58 +0200
changeset 4543 b2f5c92b579b
parent 3794 ea706f2a101f
child 4723 524785227024
permissions -rw-r--r--
#REFACTORING by exept class: PluggableParseNodeVisitor removed: #actionForNodeClass:put: #visit: class: PluggableParseNodeVisitor class added: #isObsolete comment/format in: #documentation

"{ Encoding: utf8 }"

"{ Package: 'stx:libcomp' }"

"{ NameSpace: Smalltalk }"

ParseNodeVisitor subclass:#PluggableParseNodeVisitor
	instanceVariableNames:'actionsPerNodeType'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Compiler-Support'
!

!PluggableParseNodeVisitor class methodsFor:'documentation'!

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
        
    for example, if you are only interested in assignments,
    use the following code:
        |v|
        v := PluggableParseNodeVisitor new.
        v actionForNodeClass:AssignmentNode put:[:node | Transcript showCR:node. true].
        v visit:(Parser parse:code in:someClass.
"
! !

!PluggableParseNodeVisitor class methodsFor:'queries'!

isObsolete   
    ^ true
! !

!PluggableParseNodeVisitor class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
! !