Variable.st
author claus
Fri, 12 Aug 1994 01:28:35 +0200
changeset 31 6cd13c331fb0
parent 20 f8dd8ba75205
child 102 77e4d1119ff2
permissions -rw-r--r--
*** empty log message ***

"
 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 comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
              All Rights Reserved

$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.6 1994-08-11 23:28:35 claus Exp $
'!

!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.
"
!

version
"
$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.6 1994-08-11 23:28:35 claus Exp $
"
!

documentation
"
    node for parse-trees, representing variables
"
! !

!Variable class methodsFor:'instance creation'!

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

!Variable methodsFor:'accessing'!

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

    value := v
!

name:aString
    "set the name of the variable"

    name := aString
!

name
    "return the name of the variable"

    ^ name
!

value
    "return the value of the variable"

    ^ value
!

variableValue
    "return the value of the variable"

    ^ value
!

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

    used := aBoolean
!

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

    ^ used
! !