author | Claus Gittinger <cg@exept.de> |
Sat, 11 Nov 1995 16:31:47 +0100 | |
changeset 135 | aa4f7b8f121e |
parent 103 | f4a69d7dd387 |
child 140 | 1ef1d1395146 |
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 |
|
14 |
instanceVariableNames:'value name used' |
|
15 |
classVariableNames: '' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Compiler-Support' |
|
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 |
version |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libcomp/Variable.st,v 1.9 1995-11-11 15:31:47 cg Exp $' |
20 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
node for parse-trees, representing variables |
|
43 |
" |
|
44 |
! ! |
|
0 | 45 |
|
46 |
!Variable class methodsFor:'instance creation'! |
|
47 |
||
48 |
name:name |
|
11 | 49 |
"return a new node for a variable named name" |
0 | 50 |
^ (self new) name:name |
51 |
! ! |
|
52 |
||
53 |
!Variable methodsFor:'accessing'! |
|
54 |
||
55 |
value:v |
|
11 | 56 |
"set the value of the (simulated) variable" |
57 |
||
0 | 58 |
value := v |
59 |
! |
|
60 |
||
61 |
name:aString |
|
11 | 62 |
"set the name of the variable" |
63 |
||
0 | 64 |
name := aString |
65 |
! |
|
66 |
||
67 |
name |
|
11 | 68 |
"return the name of the variable" |
69 |
||
0 | 70 |
^ name |
71 |
! |
|
72 |
||
73 |
value |
|
11 | 74 |
"return the value of the variable" |
75 |
||
0 | 76 |
^ value |
77 |
! |
|
78 |
||
31 | 79 |
variableValue |
80 |
"return the value of the variable" |
|
81 |
||
82 |
^ value |
|
83 |
! |
|
84 |
||
0 | 85 |
used:aBoolean |
11 | 86 |
"set/clear the flag marking that this variable has been used" |
87 |
||
0 | 88 |
used := aBoolean |
89 |
! |
|
90 |
||
91 |
used |
|
11 | 92 |
"return the flag marking that this variable has been used" |
93 |
||
0 | 94 |
^ used |
95 |
! ! |