equal
deleted
inserted
replaced
1 "{ Package: 'jv:tea/compiler' }"! |
1 "{ Package: 'jv:tea/compiler' }"! |
|
2 |
|
3 !RBAssignmentNode methodsFor:'accessing'! |
|
4 |
|
5 binding |
|
6 ^ variable binding |
|
7 |
|
8 "Created: / 23-09-2015 / 16:45:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
9 ! ! |
|
10 |
|
11 !RBAssignmentNode methodsFor:'accessing'! |
|
12 |
|
13 binding: aTBinding |
|
14 self shouldNotImplement |
|
15 |
|
16 "Created: / 23-09-2015 / 16:45:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
17 ! ! |
|
18 |
|
19 !RBBlockNode methodsFor:'accessing'! |
|
20 |
|
21 parameterTypes |
|
22 ^arguments collect:[ :arg | arg type ] |
|
23 |
|
24 "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
25 ! ! |
|
26 |
|
27 !RBBlockNode methodsFor:'accessing'! |
|
28 |
|
29 returnType |
|
30 | spec | |
|
31 |
|
32 spec := self returnTypeSpec. |
|
33 ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ] |
|
34 |
|
35 "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
36 ! ! |
2 |
37 |
3 !RBBlockNode methodsFor:'accessing'! |
38 !RBBlockNode methodsFor:'accessing'! |
4 |
39 |
5 returnTypeSpec |
40 returnTypeSpec |
6 "Return the TTypeSpecNode describing the return type of the |
41 "Return the TTypeSpecNode describing the return type of the |
37 "Created: / 25-08-2015 / 22:14:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
72 "Created: / 25-08-2015 / 22:14:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
38 ! ! |
73 ! ! |
39 |
74 |
40 !RBMethodNode methodsFor:'accessing'! |
75 !RBMethodNode methodsFor:'accessing'! |
41 |
76 |
|
77 parameterTypes |
|
78 ^arguments collect:[ :arg | arg type ] |
|
79 |
|
80 "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
81 ! ! |
|
82 |
|
83 !RBMethodNode methodsFor:'accessing'! |
|
84 |
|
85 returnType |
|
86 | spec | |
|
87 |
|
88 spec := self returnTypeSpec. |
|
89 ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ] |
|
90 |
|
91 "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
92 ! ! |
|
93 |
|
94 !RBMethodNode methodsFor:'accessing'! |
|
95 |
42 returnTypeSpec |
96 returnTypeSpec |
43 "Return the TTypeSpecNode describing the return type of the |
97 "Return the TTypeSpecNode describing the return type of the |
44 method" |
98 method" |
45 |
99 |
46 ^ self propertyAt: #returnTypeSpec ifAbsent: nil |
100 ^ self propertyAt: #returnTypeSpec ifAbsent: nil |
146 "Created: / 02-09-2015 / 06:19:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
200 "Created: / 02-09-2015 / 06:19:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
147 ! ! |
201 ! ! |
148 |
202 |
149 !RBVariableNode methodsFor:'accessing'! |
203 !RBVariableNode methodsFor:'accessing'! |
150 |
204 |
|
205 type |
|
206 | spec | |
|
207 |
|
208 spec := self typeSpec. |
|
209 ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ] |
|
210 |
|
211 "Created: / 23-09-2015 / 16:29:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
212 ! ! |
|
213 |
|
214 !RBVariableNode methodsFor:'accessing'! |
|
215 |
151 typeSpec |
216 typeSpec |
152 "Return the TTypeSpecNode associated with this variable node |
217 "Return the TTypeSpecNode associated with this variable node |
153 (if this node is for variable declaration) or nil (otherwise)" |
218 (if this node is for variable declaration) or nil (otherwise)" |
154 |
219 |
155 ^ self propertyAt: #typeSpec ifAbsent: nil |
220 ^ self propertyAt: #typeSpec ifAbsent: nil |