14
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
49
|
3 |
All Rights Reserved
|
14
|
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 |
|
1080
|
13 |
"{ Package: 'stx:libcomp' }"
|
|
14 |
|
14
|
15 |
SelfNode subclass:#SuperNode
|
261
|
16 |
instanceVariableNames:'class isHere'
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'System-Compiler-Support'
|
14
|
20 |
!
|
|
21 |
|
20
|
22 |
!SuperNode class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1994 by Claus Gittinger
|
49
|
27 |
All Rights Reserved
|
20
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
|
40 |
node for parse-trees, representing super
|
261
|
41 |
This is a helper class for the compiler.
|
263
|
42 |
|
|
43 |
[author:]
|
|
44 |
Claus Gittinger
|
20
|
45 |
"
|
|
46 |
! !
|
14
|
47 |
|
|
48 |
!SuperNode class methodsFor:'instance creation'!
|
|
49 |
|
|
50 |
value:val inClass:cls
|
49
|
51 |
^ (self basicNew) value:val inClass:cls here:false
|
|
52 |
!
|
|
53 |
|
|
54 |
value:val inClass:cls here:isHere
|
|
55 |
^ (self basicNew) value:val inClass:cls here:isHere
|
14
|
56 |
! !
|
|
57 |
|
|
58 |
!SuperNode methodsFor:'accessing'!
|
|
59 |
|
140
|
60 |
definingClass
|
|
61 |
^ class
|
|
62 |
!
|
|
63 |
|
49
|
64 |
value:val inClass:cls here:h
|
14
|
65 |
type := #Super.
|
|
66 |
value := val.
|
49
|
67 |
class := cls.
|
|
68 |
isHere := h
|
14
|
69 |
! !
|
|
70 |
|
1080
|
71 |
!SuperNode methodsFor:'printing & storing'!
|
14
|
72 |
|
745
|
73 |
displayString
|
|
74 |
"return a string for display in inspectors etc."
|
|
75 |
isHere ifTrue:[
|
|
76 |
^ 'InterpreterVariable(here)'
|
|
77 |
] ifFalse:[
|
|
78 |
^ 'InterpreterVariable(super)'
|
|
79 |
]
|
|
80 |
|
|
81 |
"Created: / 16.7.1998 / 19:57:59 / cg"
|
|
82 |
"Modified: / 16.7.1998 / 19:58:45 / cg"
|
|
83 |
!
|
|
84 |
|
14
|
85 |
printOn:aStream indent:i
|
49
|
86 |
isHere ifTrue:[
|
|
87 |
aStream nextPutAll:'here'
|
|
88 |
] ifFalse:[
|
|
89 |
aStream nextPutAll:'super'
|
|
90 |
]
|
14
|
91 |
! !
|
140
|
92 |
|
|
93 |
!SuperNode methodsFor:'queries'!
|
|
94 |
|
|
95 |
isHere
|
|
96 |
^ isHere
|
|
97 |
!
|
|
98 |
|
|
99 |
isSuper
|
|
100 |
"return true, if this is a super-node"
|
|
101 |
|
|
102 |
^ true
|
|
103 |
! !
|
|
104 |
|
148
|
105 |
!SuperNode class methodsFor:'documentation'!
|
|
106 |
|
|
107 |
version
|
1080
|
108 |
^ '$Header: /cvs/stx/stx/libcomp/SuperNode.st,v 1.13 2000-08-31 10:03:41 cg Exp $'
|
148
|
109 |
! !
|