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
Marco Bubke
flatpak-qt-creator
Commits
4e788157
Commit
4e788157
authored
Aug 06, 2009
by
Erik Verbruggen
Browse files
Parser fix for ObjC methods.
parent
2e181127
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
4e788157
...
...
@@ -4347,14 +4347,16 @@ bool Parser::parseObjCMethodDefinition(DeclarationAST *&node)
ObjCMethodDeclarationAST
*
ast
=
new
(
_pool
)
ObjCMethodDeclarationAST
;
ast
->
method_prototype
=
method_prototype
;
// Objective-C allows you to write:
// - (void) foo; { body; }
// so a method is a forward declaration when it doesn't have a _body_.
// However, we still need to read the semicolon.
if
(
LA
()
==
T_SEMICOLON
)
{
// method declaration:
ast
->
semicolon_token
=
consumeToken
();
}
else
{
// method definition:
parseFunctionBody
(
ast
->
function_body
);
}
parseFunctionBody
(
ast
->
function_body
);
node
=
ast
;
return
true
;
}
...
...
Write
Preview
Markdown
is supported
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