equal
deleted
inserted
replaced
|
1 "{ Package: 'jv:tea/compiler' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 RGMethodDefinition subclass:#TMethodDefinition |
|
6 instanceVariableNames:'node' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'Languages-Tea-Compiler-Model' |
|
10 ! |
|
11 |
|
12 !TMethodDefinition methodsFor:'accessing'! |
|
13 |
|
14 binding |
|
15 ^ self parseTree binding |
|
16 |
|
17 "Created: / 31-08-2015 / 10:53:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
18 ! |
|
19 |
|
20 parseTree |
|
21 node isNil ifTrue:[ |
|
22 node := TParser parseMethod: self source |
|
23 ]. |
|
24 ^ node |
|
25 |
|
26 "Created: / 25-08-2015 / 19:43:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
27 "Modified: / 29-08-2015 / 22:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
28 ! |
|
29 |
|
30 selector |
|
31 "Retrieves the name of the method" |
|
32 |
|
33 name isNil ifTrue:[ |
|
34 | src | |
|
35 |
|
36 src := self sourceCode. |
|
37 src notNil ifTrue:[ |
|
38 name := TParser parseMethodPattern: src. |
|
39 ]. |
|
40 ]. |
|
41 ^ name |
|
42 |
|
43 "Created: / 29-08-2015 / 11:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
44 ! ! |
|
45 |