SuperNode.st
author Claus Gittinger <cg@exept.de>
Mon, 16 Feb 2009 14:10:39 +0100
changeset 2165 4dde25bad190
parent 1080 bd3f19f6009a
child 2326 5622ba16c448
permissions -rw-r--r--
automatic checkIn

"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

"{ Package: 'stx:libcomp' }"

SelfNode subclass:#SuperNode
	instanceVariableNames:'class isHere'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Compiler-Support'
!

!SuperNode class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1994 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    node for parse-trees, representing super
    This is a helper class for the compiler.

    [author:]
        Claus Gittinger
"
! !

!SuperNode class methodsFor:'instance creation'!

value:val inClass:cls 
    ^ (self basicNew) value:val inClass:cls here:false
!

value:val inClass:cls here:isHere
    ^ (self basicNew) value:val inClass:cls here:isHere
! !

!SuperNode methodsFor:'accessing'!

definingClass
    ^ class
!

value:val inClass:cls here:h
    type := #Super.
    value := val.
    class := cls.
    isHere := h
! !

!SuperNode methodsFor:'printing & storing'!

displayString
    "return a string for display in inspectors etc."
    isHere ifTrue:[
        ^ 'InterpreterVariable(here)'
    ] ifFalse:[
        ^ 'InterpreterVariable(super)'
    ]

    "Created: / 16.7.1998 / 19:57:59 / cg"
    "Modified: / 16.7.1998 / 19:58:45 / cg"
!

printOn:aStream indent:i
    isHere ifTrue:[
	aStream nextPutAll:'here'
    ] ifFalse:[
	aStream nextPutAll:'super'
    ]
! !

!SuperNode methodsFor:'queries'!

isHere
    ^ isHere
!

isSuper
    "return true, if this is a super-node"

    ^ true
! !

!SuperNode class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.13 2000-08-31 10:03:41 cg Exp $'
! !