SuperNode.st
author Claus Gittinger <cg@exept.de>
Fri, 30 Apr 2010 12:01:39 +0200
changeset 2378 e41904c1091c
parent 2326 5622ba16c448
child 2605 e40af6e65d7c
permissions -rw-r--r--
automatically generated by browser

"
 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:'testing'!

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.14 2010-01-18 16:01:33 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.14 2010-01-18 16:01:33 cg Exp $'
! !