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 |
"
|
|
12 |
|
|
13 |
ParseNode subclass:#PrimaryNode
|
261
|
14 |
instanceVariableNames:'value'
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'System-Compiler-Support'
|
0
|
18 |
!
|
|
19 |
|
20
|
20 |
!PrimaryNode class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1989 by Claus Gittinger
|
104
|
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 primaries (variables & literals)
|
261
|
39 |
This is a helper class for the compiler.
|
263
|
40 |
|
|
41 |
[author:]
|
|
42 |
Claus Gittinger
|
20
|
43 |
"
|
|
44 |
! !
|
0
|
45 |
|
|
46 |
!PrimaryNode methodsFor:'accessing'!
|
|
47 |
|
|
48 |
value
|
|
49 |
^ value
|
|
50 |
! !
|
|
51 |
|
|
52 |
!PrimaryNode methodsFor:'code generation'!
|
|
53 |
|
104
|
54 |
codeForSideEffectOn:aStream inBlock:b for:aCompiler
|
0
|
55 |
"no code at all"
|
|
56 |
^ self
|
|
57 |
!
|
|
58 |
|
104
|
59 |
codeOn:aStream inBlock:codeBlock for:aCompiler
|
19
|
60 |
^ self subclassResponsibility
|
0
|
61 |
!
|
|
62 |
|
104
|
63 |
codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
|
19
|
64 |
^ self subclassResponsibility
|
0
|
65 |
! !
|
|
66 |
|
1035
|
67 |
!PrimaryNode methodsFor:'evaluation'!
|
140
|
68 |
|
|
69 |
evaluate
|
|
70 |
^ self subclassResponsibility
|
|
71 |
!
|
|
72 |
|
|
73 |
store:aValue
|
|
74 |
^ self subclassResponsibility
|
|
75 |
! !
|
|
76 |
|
0
|
77 |
!PrimaryNode methodsFor:'printing'!
|
|
78 |
|
7
|
79 |
displayString
|
612
|
80 |
"return a string for display in inspectors etc."
|
|
81 |
|
19
|
82 |
^ self subclassResponsibility
|
612
|
83 |
|
|
84 |
"Modified: 20.9.1997 / 11:41:19 / cg"
|
7
|
85 |
!
|
|
86 |
|
0
|
87 |
printOn:aStream indent:i
|
19
|
88 |
^ self subclassResponsibility
|
0
|
89 |
! !
|
140
|
90 |
|
|
91 |
!PrimaryNode methodsFor:'queries'!
|
|
92 |
|
|
93 |
isPrimary
|
|
94 |
"return true, if this is a node for a primary (i.e. non-send)"
|
|
95 |
|
|
96 |
^ true
|
|
97 |
! !
|
|
98 |
|
148
|
99 |
!PrimaryNode class methodsFor:'documentation'!
|
|
100 |
|
|
101 |
version
|
1035
|
102 |
^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.19 2000-02-12 15:32:47 cg Exp $'
|
148
|
103 |
! !
|