equal
deleted
inserted
replaced
|
1 "{ Package: 'jv:tea/compiler' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 TValueBinding subclass:#TVariableBinding |
|
6 instanceVariableNames:'name' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'Languages-Tea-Compiler-Bindings' |
|
10 ! |
|
11 |
|
12 !TVariableBinding class methodsFor:'instance creation'! |
|
13 |
|
14 type:aTType name:aString |
|
15 ^ self new initializeWithType:aTType name:aString |
|
16 |
|
17 "Created: / 25-08-2015 / 22:46:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
18 ! ! |
|
19 |
|
20 !TVariableBinding class methodsFor:'queries'! |
|
21 |
|
22 isAbstract |
|
23 "Return if this class is an abstract class. |
|
24 True is returned here for myself only; false for subclasses. |
|
25 Abstract subclasses must redefine again." |
|
26 |
|
27 ^ self == TVariableBinding. |
|
28 ! ! |
|
29 |
|
30 !TVariableBinding methodsFor:'accessing'! |
|
31 |
|
32 name |
|
33 ^ name |
|
34 ! ! |
|
35 |
|
36 !TVariableBinding methodsFor:'initialization'! |
|
37 |
|
38 initializeWithType:aTType name:aString |
|
39 name := aString. |
|
40 type := aTType. |
|
41 |
|
42 "Created: / 25-08-2015 / 22:45:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
43 ! ! |
|
44 |
|
45 !TVariableBinding methodsFor:'printing & storing'! |
|
46 |
|
47 printOn:aStream |
|
48 aStream nextPutAll: name. |
|
49 aStream space. |
|
50 type notNil ifTrue:[ |
|
51 type printOn: aStream |
|
52 ] ifFalse:[ |
|
53 aStream nextPutAll: '< ??? >' |
|
54 ]. |
|
55 |
|
56 "Modified: / 25-08-2015 / 22:54:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
57 ! ! |
|
58 |