author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 08 Jan 2010 13:25:11 +0000 | |
changeset 14 | 1f730d82496e |
parent 5 | c110eef5b9ef |
child 19 | 1297bf936bfb |
permissions | -rw-r--r-- |
1 | 1 |
"{ Package: 'cvut:fel/cface' }" |
2 |
||
3 |
"{ NameSpace: Cface }" |
|
4 |
||
5 |
CNodeVisitor subclass:#TypeResolver |
|
6 |
instanceVariableNames:'typeMap' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
9 |
category:'Cface-Visitors' |
|
10 |
! |
|
11 |
||
12 |
||
13 |
!TypeResolver methodsFor:'accessing'! |
|
14 |
||
15 |
typeMap |
|
16 |
^ typeMap |
|
17 |
||
18 |
"Created: / 12-02-2008 / 23:44:35 / janfrog" |
|
19 |
! |
|
20 |
||
21 |
typeMap:something |
|
22 |
typeMap := something. |
|
23 |
||
24 |
"Created: / 12-02-2008 / 23:44:35 / janfrog" |
|
25 |
! ! |
|
26 |
||
27 |
!TypeResolver methodsFor:'processing'! |
|
28 |
||
29 |
process: aCNode |
|
30 |
||
31 |
typeMap := TypeCollector new |
|
32 |
process: aCNode; |
|
33 |
typeMap. |
|
34 |
^super process: aCNode |
|
35 |
||
36 |
"Created: / 12-02-2008 / 23:48:03 / janfrog" |
|
37 |
! ! |
|
38 |
||
39 |
!TypeResolver methodsFor:'visiting'! |
|
40 |
||
41 |
visit: aCNode |
|
42 |
||
43 |
super visit: aCNode. |
|
44 |
(aCNode respondsTo: #type) ifTrue: |
|
45 |
[aCNode type: aCNode type resolved] |
|
46 |
||
47 |
"Created: / 17-02-2008 / 17:56:42 / janfrog" |
|
48 |
! |
|
49 |
||
50 |
visitCUserDefinedTypeNode: anObject |
|
51 |
||
5
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
52 |
"/thisContext isRecursive ifTrue:[^self]. |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
53 |
|
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
54 |
|
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
55 |
anObject type |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
56 |
ifNil: |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
57 |
[|type| |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
58 |
type := (typeMap at: anObject cName ifAbsent:[CPointerNode new type: CVoidNode new]). |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
59 |
self visit: type. |
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
60 |
anObject type: type] |
1 | 61 |
|
62 |
"Created: / 12-02-2008 / 23:45:17 / janfrog" |
|
63 |
"Modified: / 17-02-2008 / 18:30:56 / janfrog" |
|
5
c110eef5b9ef
- externalization of libraryName (now supports unix & win32 simultaneously)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
64 |
"Modified: / 09-07-2008 / 20:53:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 65 |
! ! |
66 |
||
67 |
!TypeResolver class methodsFor:'documentation'! |
|
68 |
||
69 |
version |
|
70 |
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__TypeResolver.st,v 1.1 2008/02/26 16:00:57 vranyj1 Exp $' |
|
14 | 71 |
! |
72 |
||
73 |
version_SVN |
|
74 |
^ '$Id$' |
|
1 | 75 |
! ! |