Fix in class generator (MethofDefinitionChange>>classVariableNames: now takes collection, not string)
"{ Package: 'jv:cface' }"
"{ NameSpace: Cface }"
CNodeVisitor subclass:#TypeResolver
instanceVariableNames:'typeMap'
classVariableNames:''
poolDictionaries:''
category:'Cface-Visitors'
!
!TypeResolver methodsFor:'accessing'!
typeMap
^ typeMap
"Created: / 12-02-2008 / 23:44:35 / janfrog"
!
typeMap:something
typeMap := something.
"Created: / 12-02-2008 / 23:44:35 / janfrog"
! !
!TypeResolver methodsFor:'processing'!
process: aCNode
typeMap := TypeCollector new
process: aCNode;
typeMap.
^super process: aCNode
"Created: / 12-02-2008 / 23:48:03 / janfrog"
! !
!TypeResolver methodsFor:'visiting'!
visit: aCNode
super visit: aCNode.
(aCNode respondsTo: #type) ifTrue:
[aCNode type: aCNode type resolved]
"Created: / 17-02-2008 / 17:56:42 / janfrog"
!
visitCTypedefNode: anObject
anObject type isCUserDefinedTypeNode ifTrue:[
| realType |
realType := typeMap at: anObject type cName ifAbsent:[nil].
realType notNil ifTrue:[
self visit: realType.
anObject type: realType.
].
]
"Created: / 05-09-2012 / 11:37:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
visitCUserDefinedTypeNode: anObject
"/thisContext isRecursive ifTrue:[^self].
anObject type
ifNil:
[|type|
type := (typeMap at: anObject cName ifAbsent:[CPointerNode new type: CVoidNode new]).
self visit: type.
anObject type: type]
"Created: / 12-02-2008 / 23:45:17 / janfrog"
"Modified: / 17-02-2008 / 18:30:56 / janfrog"
"Modified: / 09-07-2008 / 20:53:13 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!TypeResolver class methodsFor:'documentation'!
version
^ '$Id$'
!
version_HG
^ '$Changeset: <not expanded> $'
!
version_SVN
^ '$Id$'
! !