summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/AST.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-14 14:41:51 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-15 09:27:00 +0100
commit2a59d2ae0c889fe6e4ac50a3f110b0103f880c15 (patch)
treeff989d0d79fcee735d24bf88ef7552aa43aa1c7f /src/shared/cplusplus/AST.h
parentabdd404ff5ec8539f0d3fd38139eb08ad8a03d66 (diff)
downloadqt-creator-2a59d2ae0c889fe6e4ac50a3f110b0103f880c15.tar.gz
Split Objective-C keyword parsing to handle the '@' separately.
Because apparently, while designing the Objective-C language, somebody thought it was a world-class idea to allow any white-space between the '@' character and the subsequent keyword. With this fix, we now correctly parse: @ dynamic and: @ selector and: @"foo" "bar" @"mooze" (This last one is 1 single string split over multiple lines.) Wonderful, isn't it? What we (and Clang) do not support, but what GCC supports is something like: @"foo"@@ "bar" @"mooze" @@ which is equivalent to @"foobarmooze".
Diffstat (limited to 'src/shared/cplusplus/AST.h')
-rw-r--r--src/shared/cplusplus/AST.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h
index 4b0c149357..76ec773226 100644
--- a/src/shared/cplusplus/AST.h
+++ b/src/shared/cplusplus/AST.h
@@ -2275,6 +2275,7 @@ protected:
class CPLUSPLUS_EXPORT StringLiteralAST: public ExpressionAST
{
public:
+ unsigned at_token;
unsigned literal_token;
StringLiteralAST *next;
@@ -2588,6 +2589,7 @@ class CPLUSPLUS_EXPORT ObjCClassForwardDeclarationAST: public DeclarationAST
{
public:
SpecifierListAST *attribute_list;
+ unsigned at_token;
unsigned class_token;
NameListAST *identifier_list;
unsigned semicolon_token;
@@ -2612,6 +2614,7 @@ class CPLUSPLUS_EXPORT ObjCClassDeclarationAST: public DeclarationAST
{
public:
SpecifierListAST *attribute_list;
+ unsigned at_token;
unsigned interface_token;
unsigned implementation_token;
NameAST *class_name;
@@ -2623,6 +2626,7 @@ public:
ObjCProtocolRefsAST *protocol_refs;
ObjCInstanceVariablesDeclarationAST *inst_vars_decl;
DeclarationListAST *member_declaration_list;
+ unsigned ending_at_token;
unsigned end_token;
public: // annotations
@@ -2645,6 +2649,7 @@ class CPLUSPLUS_EXPORT ObjCProtocolForwardDeclarationAST: public DeclarationAST
{
public:
SpecifierListAST *attribute_list;
+ unsigned at_token;
unsigned protocol_token;
NameListAST *identifier_list;
unsigned semicolon_token;
@@ -2669,10 +2674,12 @@ class CPLUSPLUS_EXPORT ObjCProtocolDeclarationAST: public DeclarationAST
{
public:
SpecifierListAST *attribute_list;
+ unsigned at_token;
unsigned protocol_token;
NameAST *name;
ObjCProtocolRefsAST *protocol_refs;
DeclarationListAST *member_declaration_list;
+ unsigned ending_at_token;
unsigned end_token;
public: // annotations
@@ -2754,6 +2761,7 @@ protected:
class CPLUSPLUS_EXPORT ObjCProtocolExpressionAST: public ExpressionAST
{
public:
+ unsigned at_token;
unsigned protocol_token;
unsigned lparen_token;
unsigned identifier_token;
@@ -2796,6 +2804,7 @@ protected:
class CPLUSPLUS_EXPORT ObjCEncodeExpressionAST: public ExpressionAST
{
public:
+ unsigned at_token;
unsigned encode_token;
ObjCTypeNameAST *type_name;
@@ -2870,6 +2879,7 @@ protected:
class CPLUSPLUS_EXPORT ObjCSelectorExpressionAST: public ExpressionAST
{
public:
+ unsigned at_token;
unsigned selector_token;
unsigned lparen_token;
ObjCSelectorAST *selector;
@@ -2911,6 +2921,7 @@ protected:
class CPLUSPLUS_EXPORT ObjCVisibilityDeclarationAST: public DeclarationAST
{
public:
+ unsigned at_token;
unsigned visibility_token;
public:
@@ -2950,6 +2961,7 @@ class CPLUSPLUS_EXPORT ObjCPropertyDeclarationAST: public DeclarationAST
{
public:
SpecifierListAST *attribute_list;
+ unsigned at_token;
unsigned property_token;
unsigned lparen_token;
ObjCPropertyAttributeListAST *property_attribute_list;
@@ -3137,6 +3149,7 @@ protected:
class CPLUSPLUS_EXPORT ObjCSynchronizedStatementAST: public StatementAST
{
public:
+ unsigned at_token;
unsigned synchronized_token;
unsigned lparen_token;
ExpressionAST *synchronized_object;