author | Claus Gittinger <cg@exept.de> |
Thu, 25 Apr 1996 13:15:21 +0200 | |
changeset 261 | 0372e948ca2d |
parent 148 | ef0e604209ec |
child 263 | 3b21d0991eff |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#Variable |
|
261 | 14 |
instanceVariableNames:'value name used' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Compiler-Support' |
|
0 | 18 |
! |
19 |
||
20 | 20 |
!Variable class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
25 |
All Rights Reserved |
20 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
node for parse-trees, representing variables |
|
261 | 39 |
This is a helper class for the compiler. |
20 | 40 |
" |
41 |
! ! |
|
0 | 42 |
|
43 |
!Variable class methodsFor:'instance creation'! |
|
44 |
||
45 |
name:name |
|
11 | 46 |
"return a new node for a variable named name" |
0 | 47 |
^ (self new) name:name |
48 |
! ! |
|
49 |
||
50 |
!Variable methodsFor:'accessing'! |
|
51 |
||
140 | 52 |
name |
53 |
"return the name of the variable" |
|
11 | 54 |
|
140 | 55 |
^ name |
0 | 56 |
! |
57 |
||
58 |
name:aString |
|
11 | 59 |
"set the name of the variable" |
60 |
||
0 | 61 |
name := aString |
62 |
! |
|
63 |
||
140 | 64 |
used |
65 |
"return the flag marking that this variable has been used" |
|
11 | 66 |
|
140 | 67 |
^ used |
68 |
! |
|
69 |
||
70 |
used:aBoolean |
|
71 |
"set/clear the flag marking that this variable has been used" |
|
72 |
||
73 |
used := aBoolean |
|
0 | 74 |
! |
75 |
||
76 |
value |
|
11 | 77 |
"return the value of the variable" |
78 |
||
0 | 79 |
^ value |
80 |
! |
|
81 |
||
140 | 82 |
value:v |
83 |
"set the value of the (simulated) variable" |
|
84 |
||
85 |
value := v |
|
86 |
! |
|
87 |
||
31 | 88 |
variableValue |
89 |
"return the value of the variable" |
|
90 |
||
91 |
^ value |
|
140 | 92 |
! ! |
11 | 93 |
|
148 | 94 |
!Variable class methodsFor:'documentation'! |
95 |
||
96 |
version |
|
261 | 97 |
^ '$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.12 1996-04-25 11:14:57 cg Exp $' |
148 | 98 |
! ! |