Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
98802456
Commit
98802456
authored
Nov 10, 2009
by
Roberto Raggi
Browse files
Removed ObjCPropertyAttributeListAST
Done with Erik Verbruggen
parent
e5c9aaab
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/AST.cpp
View file @
98802456
...
...
@@ -2114,27 +2114,6 @@ unsigned ObjCPropertyAttributeAST::lastToken() const
return
attribute_identifier_token
+
1
;
}
unsigned
ObjCPropertyAttributeListAST
::
firstToken
()
const
{
if
(
attr
)
return
attr
->
firstToken
();
else
if
(
next
)
return
next
->
lastToken
();
else
// ### Assert?
return
0
;
}
unsigned
ObjCPropertyAttributeListAST
::
lastToken
()
const
{
for
(
const
ObjCPropertyAttributeListAST
*
it
=
this
;
it
;
it
=
it
->
next
)
{
if
(
!
it
->
next
&&
it
->
attr
)
return
it
->
attr
->
lastToken
();
}
// ### assert?
return
0
;
}
unsigned
ObjCPropertyDeclarationAST
::
firstToken
()
const
{
if
(
attributes
)
...
...
@@ -2153,8 +2132,8 @@ unsigned ObjCPropertyDeclarationAST::lastToken() const
return
property_attributes
->
lastToken
();
else
if
(
lparen_token
)
return
lparen_token
+
1
;
else
return
property_token
+
1
;
return
property_token
+
1
;
}
unsigned
ObjCMessageArgumentDeclarationAST
::
firstToken
()
const
...
...
@@ -2213,8 +2192,7 @@ unsigned ObjCMethodPrototypeAST::lastToken() const
return
arguments
->
lastToken
();
else
if
(
type_name
)
return
type_name
->
lastToken
();
else
return
method_type_token
+
1
;
return
method_type_token
+
1
;
}
unsigned
ObjCMethodDeclarationAST
::
firstToken
()
const
...
...
src/shared/cplusplus/AST.h
View file @
98802456
...
...
@@ -2405,22 +2405,6 @@ protected:
virtual
void
accept0
(
ASTVisitor
*
visitor
);
};
class
CPLUSPLUS_EXPORT
ObjCPropertyAttributeListAST
:
public
AST
{
public:
ObjCPropertyAttributeAST
*
attr
;
ObjCPropertyAttributeListAST
*
next
;
public:
virtual
ObjCPropertyAttributeListAST
*
asObjCPropertyAttributeList
()
{
return
this
;
}
virtual
unsigned
firstToken
()
const
;
virtual
unsigned
lastToken
()
const
;
protected:
virtual
void
accept0
(
ASTVisitor
*
visitor
);
};
class
CPLUSPLUS_EXPORT
ObjCPropertyDeclarationAST
:
public
DeclarationAST
{
public:
...
...
src/shared/cplusplus/ASTVisit.cpp
View file @
98802456
...
...
@@ -1047,14 +1047,6 @@ void ObjCPropertyAttributeAST::accept0(ASTVisitor *visitor)
visitor
->
endVisit
(
this
);
}
void
ObjCPropertyAttributeListAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
accept
(
attr
,
visitor
);
}
visitor
->
endVisit
(
this
);
}
void
ObjCPropertyDeclarationAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
...
...
src/shared/cplusplus/ASTfwd.h
View file @
98802456
...
...
@@ -136,7 +136,6 @@ class ObjCMessageExpressionAST;
class
ObjCMethodDeclarationAST
;
class
ObjCMethodPrototypeAST
;
class
ObjCPropertyAttributeAST
;
class
ObjCPropertyAttributeListAST
;
class
ObjCPropertyDeclarationAST
;
class
ObjCProtocolDeclarationAST
;
class
ObjCProtocolExpressionAST
;
...
...
@@ -201,6 +200,7 @@ typedef List<DeclaratorAST *> DeclaratorListAST;
typedef
List
<
NameAST
*>
ObjCIdentifierListAST
;
typedef
List
<
ObjCMessageArgumentAST
*>
ObjCMessageArgumentListAST
;
typedef
List
<
ObjCSelectorArgumentAST
*>
ObjCSelectorArgumentListAST
;
typedef
List
<
ObjCPropertyAttributeAST
*>
ObjCPropertyAttributeListAST
;
typedef
ExpressionListAST
TemplateArgumentListAST
;
...
...
src/shared/cplusplus/CheckDeclaration.cpp
View file @
98802456
...
...
@@ -719,7 +719,7 @@ bool CheckDeclaration::visit(ObjCPropertyDeclarationAST *ast)
int
propAttrs
=
None
;
for
(
ObjCPropertyAttributeListAST
*
iter
=
ast
->
property_attributes
;
iter
;
iter
=
iter
->
next
)
{
ObjCPropertyAttributeAST
*
attrAst
=
iter
->
attr
;
ObjCPropertyAttributeAST
*
attrAst
=
iter
->
value
;
if
(
!
attrAst
)
continue
;
...
...
src/shared/cplusplus/Parser.cpp
View file @
98802456
...
...
@@ -4845,14 +4845,14 @@ bool Parser::parseObjCPropertyDeclaration(DeclarationAST *&node, SpecifierAST *a
ObjCPropertyAttributeAST
*
property_attribute
=
0
;
if
(
parseObjCPropertyAttribute
(
property_attribute
))
{
ast
->
property_attributes
=
new
(
_pool
)
ObjCPropertyAttributeListAST
;
ast
->
property_attributes
->
attr
=
property_attribute
;
ast
->
property_attributes
->
value
=
property_attribute
;
ObjCPropertyAttributeListAST
*
last
=
ast
->
property_attributes
;
while
(
LA
()
==
T_COMMA
)
{
consumeToken
();
// consume T_COMMA
last
->
next
=
new
(
_pool
)
ObjCPropertyAttributeListAST
;
last
=
last
->
next
;
if
(
!
parseObjCPropertyAttribute
(
last
->
attr
))
{
if
(
!
parseObjCPropertyAttribute
(
last
->
value
))
{
_translationUnit
->
error
(
_tokenIndex
,
"expected token `%s' got `%s'"
,
Token
::
name
(
T_IDENTIFIER
),
tok
().
spell
());
while
(
LA
()
!=
T_RPAREN
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment