--- a/compiler/extensions.st Tue Sep 22 17:43:38 2015 +0100
+++ b/compiler/extensions.st Wed Sep 23 22:21:44 2015 +0100
@@ -1,5 +1,40 @@
"{ Package: 'jv:tea/compiler' }"!
+!RBAssignmentNode methodsFor:'accessing'!
+
+binding
+ ^ variable binding
+
+ "Created: / 23-09-2015 / 16:45:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBAssignmentNode methodsFor:'accessing'!
+
+binding: aTBinding
+ self shouldNotImplement
+
+ "Created: / 23-09-2015 / 16:45:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBBlockNode methodsFor:'accessing'!
+
+parameterTypes
+ ^arguments collect:[ :arg | arg type ]
+
+ "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBBlockNode methodsFor:'accessing'!
+
+returnType
+ | spec |
+
+ spec := self returnTypeSpec.
+ ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
+
+ "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!RBBlockNode methodsFor:'accessing'!
returnTypeSpec
@@ -39,6 +74,25 @@
!RBMethodNode methodsFor:'accessing'!
+parameterTypes
+ ^arguments collect:[ :arg | arg type ]
+
+ "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBMethodNode methodsFor:'accessing'!
+
+returnType
+ | spec |
+
+ spec := self returnTypeSpec.
+ ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
+
+ "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBMethodNode methodsFor:'accessing'!
+
returnTypeSpec
"Return the TTypeSpecNode describing the return type of the
method"
@@ -148,6 +202,17 @@
!RBVariableNode methodsFor:'accessing'!
+type
+ | spec |
+
+ spec := self typeSpec.
+ ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
+
+ "Created: / 23-09-2015 / 16:29:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!RBVariableNode methodsFor:'accessing'!
+
typeSpec
"Return the TTypeSpecNode associated with this variable node
(if this node is for variable declaration) or nil (otherwise)"