author | Claus Gittinger <cg@exept.de> |
Tue, 11 Nov 2008 15:20:28 +0100 | |
changeset 2135 | a9a5ad3716d1 |
parent 2030 | 6f213151b826 |
child 2317 | 76f93ff5ecfd |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
104 | 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 |
" |
|
1080 | 12 |
"{ Package: 'stx:libcomp' }" |
13 |
||
0 | 14 |
ParseNode subclass:#PrimaryNode |
261 | 15 |
instanceVariableNames:'value' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Compiler-Support' |
|
0 | 19 |
! |
20 |
||
20 | 21 |
!PrimaryNode class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
104 | 26 |
All Rights Reserved |
20 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
node for parse-trees, representing primaries (variables & literals) |
|
261 | 40 |
This is a helper class for the compiler. |
263 | 41 |
|
42 |
[author:] |
|
43 |
Claus Gittinger |
|
20 | 44 |
" |
45 |
! ! |
|
0 | 46 |
|
47 |
!PrimaryNode methodsFor:'accessing'! |
|
48 |
||
1786 | 49 |
type:t value:val |
50 |
type := t. |
|
51 |
value := val |
|
52 |
! |
|
53 |
||
0 | 54 |
value |
55 |
^ value |
|
1786 | 56 |
! |
57 |
||
58 |
value:val |
|
59 |
value := val |
|
0 | 60 |
! ! |
61 |
||
62 |
!PrimaryNode methodsFor:'code generation'! |
|
63 |
||
104 | 64 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler |
0 | 65 |
"no code at all" |
66 |
^ self |
|
67 |
! |
|
68 |
||
104 | 69 |
codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler |
19 | 70 |
^ self subclassResponsibility |
0 | 71 |
! ! |
72 |
||
1035 | 73 |
!PrimaryNode methodsFor:'evaluation'! |
140 | 74 |
|
75 |
store:aValue |
|
76 |
^ self subclassResponsibility |
|
77 |
! ! |
|
78 |
||
1080 | 79 |
!PrimaryNode methodsFor:'printing & storing'! |
0 | 80 |
|
81 |
printOn:aStream indent:i |
|
19 | 82 |
^ self subclassResponsibility |
0 | 83 |
! ! |
140 | 84 |
|
85 |
!PrimaryNode methodsFor:'queries'! |
|
86 |
||
1586 | 87 |
isArgument |
88 |
^ false |
|
89 |
! |
|
90 |
||
91 |
isClassVariable |
|
92 |
^ false |
|
93 |
! |
|
94 |
||
95 |
isInstanceVariable |
|
96 |
^ false |
|
97 |
! |
|
98 |
||
99 |
isLocal |
|
100 |
^ false |
|
101 |
! |
|
102 |
||
103 |
isMethodArg |
|
104 |
^ false |
|
105 |
! |
|
106 |
||
140 | 107 |
isPrimary |
108 |
"return true, if this is a node for a primary (i.e. non-send)" |
|
109 |
||
110 |
^ true |
|
1586 | 111 |
! |
112 |
||
113 |
isUndeclared |
|
114 |
^ false |
|
1590 | 115 |
! |
116 |
||
117 |
precedence |
|
118 |
^ 200 |
|
119 |
||
120 |
"Created: / 20-04-2005 / 14:12:04 / cg" |
|
140 | 121 |
! ! |
122 |
||
148 | 123 |
!PrimaryNode class methodsFor:'documentation'! |
124 |
||
125 |
version |
|
2135
a9a5ad3716d1
remove subclassResponsibility in #displayString
Claus Gittinger <cg@exept.de>
parents:
2030
diff
changeset
|
126 |
^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.28 2008-11-11 14:20:28 cg Exp $' |
148 | 127 |
! ! |