More work on basic infrastructure - types, bindings & compilation.
At this point it actually can compile a simple method returning an integer value.
However, full of hacks here and there and full of #notYetImplemented.
"{ Package: 'jv:tea/compiler' }"
"{ NameSpace: Smalltalk }"
RGMethodDefinition subclass:#TMethodDefinition
instanceVariableNames:'node'
classVariableNames:''
poolDictionaries:''
category:'Languages-Tea-Compiler-Model'
!
!TMethodDefinition methodsFor:'accessing'!
binding
^ self parseTree binding
"Created: / 31-08-2015 / 10:53:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
parseTree
node isNil ifTrue:[
node := TParser parseMethod: self source
].
^ node
"Created: / 25-08-2015 / 19:43:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 29-08-2015 / 22:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
selector
"Retrieves the name of the method"
name isNil ifTrue:[
| src |
src := self sourceCode.
src notNil ifTrue:[
name := TParser parseMethodPattern: src.
].
].
^ name
"Created: / 29-08-2015 / 11:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !