author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 04 Jul 2008 12:05:15 +0000 | |
changeset 4 | fc74bd43a3eb |
parent 1 | b6c0180314d1 |
child 5 | c110eef5b9ef |
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 |
||
52 |
anObject type ifNil: |
|
53 |
[|type| |
|
4
fc74bd43a3eb
Minor parser fixes to parse Cairo Xlib stuff
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
54 |
type := (typeMap at: anObject cName ifAbsent:[CPointerNode new type: CVoidNode new]). |
1 | 55 |
self visit: type. |
56 |
anObject type: type] |
|
57 |
||
58 |
"Created: / 12-02-2008 / 23:45:17 / janfrog" |
|
59 |
"Modified: / 17-02-2008 / 18:30:56 / janfrog" |
|
4
fc74bd43a3eb
Minor parser fixes to parse Cairo Xlib stuff
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1
diff
changeset
|
60 |
"Modified: / 04-07-2008 / 12:45:42 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 61 |
! ! |
62 |
||
63 |
!TypeResolver class methodsFor:'documentation'! |
|
64 |
||
65 |
version |
|
66 |
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__TypeResolver.st,v 1.1 2008/02/26 16:00:57 vranyj1 Exp $' |
|
67 |
! ! |