Skip to content
GitLab
Menu
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
debe2a0d
Commit
debe2a0d
authored
Feb 03, 2009
by
Roberto Raggi
Browse files
Fixes: Parsing of objc protocol expressions.
parent
26560ca9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
debe2a0d
...
...
@@ -2583,7 +2583,7 @@ bool Parser::parseObjCExpression(ExpressionAST *&node)
return
parseObjCEncodeExpression
(
node
);
case
T_AT_PROTOCOL
:
break
;
return
parseObjCProtocolExpression
(
node
)
;
case
T_AT_SELECTOR
:
break
;
...
...
@@ -2610,6 +2610,19 @@ bool Parser::parseObjCEncodeExpression(ExpressionAST *&)
return
true
;
}
bool
Parser
::
parseObjCProtocolExpression
(
ExpressionAST
*&
)
{
if
(
LA
()
!=
T_AT_PROTOCOL
)
return
false
;
/*unsigned protocol_token = */
consumeToken
();
unsigned
lparen_token
=
0
,
identifier_token
=
0
,
rparen_token
=
0
;
match
(
T_LPAREN
,
&
lparen_token
);
match
(
T_IDENTIFIER
,
&
identifier_token
);
match
(
T_RPAREN
,
&
rparen_token
);
return
true
;
}
bool
Parser
::
parseNameId
(
NameAST
*&
name
)
{
unsigned
start
=
cursor
();
...
...
src/shared/cplusplus/Parser.h
View file @
debe2a0d
...
...
@@ -219,6 +219,7 @@ public:
SpecifierAST
*
attributes
=
0
);
bool
parseObjCEncodeExpression
(
ExpressionAST
*&
node
);
bool
parseObjCProtocolExpression
(
ExpressionAST
*&
node
);
bool
parseObjCProtocolRefs
();
bool
parseObjClassInstanceVariables
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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