Improved ObjC parsing, and added semantic checks.

This commit is contained in:
Erik Verbruggen
2009-07-28 16:34:15 +02:00
parent a9b521f80a
commit 26267c0344
29 changed files with 1191 additions and 155 deletions

View File

@@ -154,6 +154,14 @@ void CheckUndefinedSymbols::buildTypeMap(NamespaceBinding *binding, QSet<Namespa
} else if (Declaration *decl = member->asDeclaration()) {
if (decl->isTypedef())
addType(decl->name());
} else if (ObjCForwardClassDeclaration *fKlass = member->asObjCForwardClassDeclaration()) {
addType(fKlass->name());
} else if (ObjCClass *klass = member->asObjCClass()) {
addType(klass->name());
} else if (ObjCForwardProtocolDeclaration *fProto = member->asObjCForwardProtocolDeclaration()) {
addType(fProto->name());
} else if (ObjCProtocol *proto = member->asObjCProtocol()) {
addType(proto->name());
}
}
}

View File

@@ -98,6 +98,10 @@ QIcon Icons::iconForSymbol(const Symbol *symbol) const
return _enumIcon;
} else if (symbol->isClass() || symbol->isForwardClassDeclaration()) {
return _classIcon;
} else if (symbol->isObjCClass() || symbol->isObjCForwardClassDeclaration()) {
return _classIcon;
} else if (symbol->isObjCProtocol() || symbol->isObjCForwardProtocolDeclaration()) {
return _classIcon;
} else if (symbol->isNamespace()) {
return _namespaceIcon;
} else if (symbol->isUsingNamespaceDirective() ||