Variable.st
author Stefan Vogel <sv@exept.de>
Fri, 06 Mar 1998 16:38:37 +0100
changeset 657 0ecf1ff6f6bf
parent 542 728300bd8861
child 1035 8848672cb893
permissions -rw-r--r--
Fix #makeMethod:

"
 COPYRIGHT (c) 1989 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.
"

Object subclass:#Variable
	instanceVariableNames:'value name used'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Compiler-Support'
!

!Variable class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1989 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 variables
    This is a helper class for the compiler.

    [author:]
        Claus Gittinger
"
! !

!Variable class methodsFor:'instance creation'!

name:name
    "return a new node for a variable named name"
    ^ (self new) name:name
! !

!Variable methodsFor:'accessing'!

name
    "return the name of the variable"

    ^ name
!

name:aString
    "set the name of the variable"

    name := aString
!

used
    "return the flag marking that this variable has been used"

    ^ used
!

used:aBoolean
    "set/clear the flag marking that this variable has been used"

    used := aBoolean
!

value
    "return the value of the variable"

    ^ value
!

value:v
    "set the value of the (simulated) variable"

    value := v
!

variableValue
    "return the value of the variable"

    ^ value
! !

!Variable methodsFor:'enumeration'!

nodeDo:anEnumerator
    "helper for parse tree walking"

    ^ anEnumerator doVariable:self name:name

    "Created: 19.6.1997 / 17:11:48 / cg"
! !

!Variable class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.14 1997-06-19 16:38:52 cg Exp $'
! !