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
Marco Bubke
flatpak-qt-creator
Commits
464f797f
Commit
464f797f
authored
Mar 23, 2010
by
Roberto Raggi
Browse files
Don't check the compound statement terminator when parsing.
The check should be done in the semantic phase.
parent
6f80219d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/cplusplus/Parser.cpp
View file @
464f797f
...
...
@@ -3576,14 +3576,6 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
ast
->
statement
=
statement
->
asCompoundStatement
();
match
(
T_RPAREN
,
&
ast
->
rparen_token
);
node
=
ast
;
if
(
ast
->
statement
&&
ast
->
statement
->
statement_list
)
{
// check that the last statement is an expression-statement
StatementAST
*
lastStmt
=
ast
->
statement
->
statement_list
->
lastValue
();
if
(
!
lastStmt
||
!
ast
->
asExpressionStatement
())
_translationUnit
->
error
(
cursor
(),
"expected an expression statement before token `%s'"
,
tok
().
spell
());
}
return
true
;
}
else
{
return
parseNestedExpression
(
node
);
...
...
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