From fe4fc6d54028b88e8e98c8b0760ba287fd16a7d5 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <qtc-committer@nokia.com> Date: Thu, 8 Jan 2009 11:47:38 +0100 Subject: [PATCH] Handle toplevel objc++ declarations. --- shared/cplusplus/Parser.cpp | 57 +++++++++++++++++++++++++++++++++++++ shared/cplusplus/Parser.h | 9 ++++++ 2 files changed, 66 insertions(+) diff --git a/shared/cplusplus/Parser.cpp b/shared/cplusplus/Parser.cpp index 05836e9fca0..e863de5a941 100644 --- a/shared/cplusplus/Parser.cpp +++ b/shared/cplusplus/Parser.cpp @@ -395,6 +395,28 @@ bool Parser::parseDeclaration(DeclarationAST *&node) case T_EXPORT: return parseTemplateDeclaration(node); + // objc++ + case T_AT_CLASS: + return parseObjCClassDeclaration(node); + + case T_AT_INTERFACE: + return parseObjCInterfaceDeclaration(node); + + case T_AT_PROTOCOL: + return parseObjCProtocolDeclaration(node); + + case T_AT_END: + return parseObjCEndDeclaration(node); + + case T_AT_COMPATIBILITY_ALIAS: + return parseObjCAliasDeclaration(node); + + case T_AT_SYNTHESIZE: + return parseObjCPropertySynthesize(node); + + case T_AT_DYNAMIC: + return parseObjCPropertyDynamic(node); + default: if (LA() == T_EXTERN && LA(2) == T_TEMPLATE) return parseTemplateDeclaration(node); @@ -3261,4 +3283,39 @@ bool Parser::parseThrowExpression(ExpressionAST *&node) return false; } +bool Parser::parseObjCClassDeclaration(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCInterfaceDeclaration(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCProtocolDeclaration(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCEndDeclaration(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCAliasDeclaration(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCPropertySynthesize(DeclarationAST *&node) +{ + return false; +} + +bool Parser::parseObjCPropertyDynamic(DeclarationAST *&node) +{ + return false; +} + CPLUSPLUS_END_NAMESPACE diff --git a/shared/cplusplus/Parser.h b/shared/cplusplus/Parser.h index 6059aa68375..f0dc3c7a9de 100644 --- a/shared/cplusplus/Parser.h +++ b/shared/cplusplus/Parser.h @@ -203,6 +203,15 @@ public: bool parseUsingDirective(DeclarationAST *&node); bool parseWhileStatement(StatementAST *&node); + // ObjC++ + bool parseObjCClassDeclaration(DeclarationAST *&node); + bool parseObjCInterfaceDeclaration(DeclarationAST *&node); + bool parseObjCProtocolDeclaration(DeclarationAST *&node); + bool parseObjCEndDeclaration(DeclarationAST *&node); + bool parseObjCAliasDeclaration(DeclarationAST *&node); + bool parseObjCPropertySynthesize(DeclarationAST *&node); + bool parseObjCPropertyDynamic(DeclarationAST *&node); + // Qt MOC run bool parseQtMethod(ExpressionAST *&node); -- GitLab