compiler/TTypeseeder.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 02 Sep 2015 18:15:44 +0100
changeset 7 7556e3d41d80
permissions -rw-r--r--
Make 3 + 4 working, though the code is rather messy ...and needs a lot of cleanup. There are no checks for error cases, no debug info, etc...

"{ Package: 'jv:tea/compiler' }"

"{ NameSpace: Smalltalk }"

TCompilerPass subclass:#TTypeseeder
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler'
!

!TTypeseeder methodsFor:'visiting'!

visitArgument: anRBVariableNode
    super visitArgument: anRBVariableNode.
    anRBVariableNode binding type: anRBVariableNode typeSpec asType

    "Created: / 31-08-2015 / 11:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TTypeseeder methodsFor:'visitor-double dispatching'!

acceptMethodNode: aMethodNode 
    super acceptMethodNode: aMethodNode.
    aMethodNode binding 
            returnType: aMethodNode returnTypeSpec asType;
            parameterTypes: (aMethodNode arguments collect: [ :arg | arg binding type ])

    "Created: / 31-08-2015 / 12:13:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 02-09-2015 / 17:05:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !