Jan 22, 2010 at 3:55 AM
Edited Jan 22, 2010 at 4:04 AM
Hello. I'm back to my compiler.
If I'm compiling something like (C#-like notation)
where Alpha is a class defined in the assembly that I'm compiling, all I can have is a (possibly incomplete) NamespaceClassDeclaration of Alpha.
In order to create a CreateObjectInstance I need a TypeExpression and the only way to make a TypeExpression is MicrosoftCci.Ast.TypeExpression.For(ITypeReference).
How do I get a ITypeReference from a NamespaceClassDeclaration?
Is there another way to create a TypeExpression?
In my older compiler prototype, where I was only using CCI Metadata but not CCI Ast, I would create a Microsoft.Cci.MutableCodeModel.NamespaceTypeDefinition instead of NamespaceClassDeclaration. Obviously I was able to use the NamespaceTypeDefinition itself
as a ITypeReference.
I don't understand what's the CCI Ast way to do the same thing.