forked from qt-creator/qt-creator
Improved ObjC parsing, and added semantic checks.
This commit is contained in:
@@ -463,6 +463,133 @@ private:
|
||||
Array<BaseClass *> _baseClasses;
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCForwardProtocolDeclaration: public Symbol, public Type
|
||||
{
|
||||
public:
|
||||
ObjCForwardProtocolDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name);
|
||||
virtual ~ObjCForwardProtocolDeclaration();
|
||||
|
||||
// Symbol's interface
|
||||
virtual FullySpecifiedType type() const;
|
||||
|
||||
// Type's interface
|
||||
virtual bool isEqualTo(const Type *other) const;
|
||||
|
||||
virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclaration()
|
||||
{ return this; }
|
||||
|
||||
virtual const ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCForwardProtocolDeclaration *asObjCForwardProtocolDeclarationType()
|
||||
{ return this; }
|
||||
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCProtocol: public ScopedSymbol, public Type
|
||||
{
|
||||
public:
|
||||
ObjCProtocol(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name);
|
||||
virtual ~ObjCProtocol();
|
||||
|
||||
// Symbol's interface
|
||||
virtual FullySpecifiedType type() const;
|
||||
|
||||
// Type's interface
|
||||
virtual bool isEqualTo(const Type *other) const;
|
||||
|
||||
virtual const ObjCProtocol *asObjCProtocol() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCProtocol *asObjCProtocol()
|
||||
{ return this; }
|
||||
|
||||
virtual const ObjCProtocol *asObjCProtocolType() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCProtocol *asObjCProtocolType()
|
||||
{ return this; }
|
||||
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
|
||||
private:
|
||||
Array<ObjCProtocol *> _protocols;
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCForwardClassDeclaration: public Symbol, public Type
|
||||
{
|
||||
public:
|
||||
ObjCForwardClassDeclaration(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name);
|
||||
virtual ~ObjCForwardClassDeclaration();
|
||||
|
||||
// Symbol's interface
|
||||
virtual FullySpecifiedType type() const;
|
||||
|
||||
// Type's interface
|
||||
virtual bool isEqualTo(const Type *other) const;
|
||||
|
||||
virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclaration() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclaration()
|
||||
{ return this; }
|
||||
|
||||
virtual const ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCForwardClassDeclaration *asObjCForwardClassDeclarationType()
|
||||
{ return this; }
|
||||
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
class CPLUSPLUS_EXPORT ObjCClass: public ScopedSymbol, public Type
|
||||
{
|
||||
public:
|
||||
ObjCClass(TranslationUnit *translationUnit, unsigned sourceLocation, Name *name);
|
||||
virtual ~ObjCClass();
|
||||
|
||||
// Symbol's interface
|
||||
virtual FullySpecifiedType type() const;
|
||||
|
||||
// Type's interface
|
||||
virtual bool isEqualTo(const Type *other) const;
|
||||
|
||||
virtual const ObjCClass *asObjCClass() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCClass *asObjCClass()
|
||||
{ return this; }
|
||||
|
||||
virtual const ObjCClass *asObjCClassType() const
|
||||
{ return this; }
|
||||
|
||||
virtual ObjCClass *asObjCClassType()
|
||||
{ return this; }
|
||||
|
||||
protected:
|
||||
virtual void visitSymbol0(SymbolVisitor *visitor);
|
||||
virtual void accept0(TypeVisitor *visitor);
|
||||
|
||||
private:
|
||||
Array<ObjCClass *> _baseClasses;
|
||||
Array<ObjCProtocol *> _protocols;
|
||||
};
|
||||
|
||||
CPLUSPLUS_END_NAMESPACE
|
||||
CPLUSPLUS_END_HEADER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user