compiler/TMethod.st
changeset 3 97ee341d3e9f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/TMethod.st	Wed Aug 26 07:51:18 2015 +0100
@@ -0,0 +1,49 @@
+"{ Package: 'jv:tea/compiler' }"
+
+"{ NameSpace: Smalltalk }"
+
+RBMethod subclass:#TMethod
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Tea-Compiler-Model'
+!
+
+!TMethod methodsFor:'accessing'!
+
+method
+    "Returns Method instance which is present or retrived from real class"
+
+    ^ nil "/ For Tea, there are no real methods (yet).
+          "/ Later it may return Tea host method."
+
+    "Created: / 25-08-2015 / 19:10:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+method: aCompiledMethod 
+    self shouldNeverBeSent
+
+    "Created: / 25-08-2015 / 19:09:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseTree
+    ^ TParser parseMethod: self source
+
+    "Created: / 25-08-2015 / 19:43:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+selector
+    selector isNil ifTrue:[ 
+        selector := self parseTree selector.
+    ].
+    ^ selector
+
+    "Created: / 25-08-2015 / 19:48:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+source
+    ^ source
+
+    "Created: / 25-08-2015 / 19:44:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+