+TypeDeclaration *TypeResolver::resolve_type(const string &name)
+{
+ map<string, TypeDeclaration *>::iterator i = stage->types.find(name);
+ if(i!=stage->types.end())
+ {
+ map<TypeDeclaration *, TypeDeclaration *>::iterator j = alias_map.find(i->second);
+ return (j!=alias_map.end() ? j->second : i->second);
+ }
+ else
+ return 0;
+}
+