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
6f80219d
Commit
6f80219d
authored
Mar 23, 2010
by
Roberto Raggi
Browse files
Renamed the CompoundExpressionAST::compoundStatement.
parent
0d3dfdbc
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/ResolveExpression.cpp
View file @
6f80219d
...
...
@@ -295,7 +295,7 @@ bool ResolveExpression::visit(ThisExpressionAST *)
bool
ResolveExpression
::
visit
(
CompoundExpressionAST
*
ast
)
{
CompoundStatementAST
*
cStmt
=
ast
->
compoundS
tatement
;
CompoundStatementAST
*
cStmt
=
ast
->
s
tatement
;
if
(
cStmt
&&
cStmt
->
statement_list
)
{
accept
(
cStmt
->
statement_list
->
lastValue
());
}
...
...
src/shared/cplusplus/AST.cpp
View file @
6f80219d
...
...
@@ -436,8 +436,8 @@ unsigned CompoundExpressionAST::lastToken() const
{
if
(
rparen_token
)
return
rparen_token
+
1
;
else
if
(
compoundS
tatement
)
return
compoundS
tatement
->
lastToken
();
else
if
(
s
tatement
)
return
s
tatement
->
lastToken
();
else
return
lparen_token
+
1
;
}
...
...
src/shared/cplusplus/AST.h
View file @
6f80219d
...
...
@@ -963,13 +963,13 @@ class CPLUSPLUS_EXPORT CompoundExpressionAST: public ExpressionAST
{
public:
unsigned
lparen_token
;
CompoundStatementAST
*
compoundS
tatement
;
CompoundStatementAST
*
s
tatement
;
unsigned
rparen_token
;
public:
CompoundExpressionAST
()
:
lparen_token
(
0
)
,
compoundS
tatement
(
0
)
,
s
tatement
(
0
)
,
rparen_token
(
0
)
{}
...
...
src/shared/cplusplus/ASTClone.cpp
View file @
6f80219d
...
...
@@ -277,8 +277,8 @@ CompoundExpressionAST *CompoundExpressionAST::clone(MemoryPool *pool) const
{
CompoundExpressionAST
*
ast
=
new
(
pool
)
CompoundExpressionAST
;
ast
->
lparen_token
=
lparen_token
;
if
(
compoundS
tatement
)
ast
->
compoundS
tatement
=
compoundS
tatement
->
clone
(
pool
);
if
(
s
tatement
)
ast
->
s
tatement
=
s
tatement
->
clone
(
pool
);
ast
->
rparen_token
=
rparen_token
;
return
ast
;
}
...
...
src/shared/cplusplus/ASTMatcher.cpp
View file @
6f80219d
...
...
@@ -434,9 +434,9 @@ bool ASTMatcher::match(CompoundExpressionAST *node, CompoundExpressionAST *patte
pattern
->
lparen_token
=
node
->
lparen_token
;
if
(
!
pattern
->
compoundS
tatement
)
pattern
->
compoundS
tatement
=
node
->
compoundS
tatement
;
else
if
(
!
AST
::
match
(
node
->
compoundS
tatement
,
pattern
->
compoundS
tatement
,
this
))
if
(
!
pattern
->
s
tatement
)
pattern
->
s
tatement
=
node
->
s
tatement
;
else
if
(
!
AST
::
match
(
node
->
s
tatement
,
pattern
->
s
tatement
,
this
))
return
false
;
pattern
->
rparen_token
=
node
->
rparen_token
;
...
...
src/shared/cplusplus/ASTVisit.cpp
View file @
6f80219d
...
...
@@ -208,7 +208,7 @@ void BaseSpecifierAST::accept0(ASTVisitor *visitor)
void
CompoundExpressionAST
::
accept0
(
ASTVisitor
*
visitor
)
{
if
(
visitor
->
visit
(
this
))
{
accept
(
compoundS
tatement
,
visitor
);
accept
(
s
tatement
,
visitor
);
}
visitor
->
endVisit
(
this
);
}
...
...
src/shared/cplusplus/CheckExpression.cpp
View file @
6f80219d
...
...
@@ -289,7 +289,7 @@ bool CheckExpression::visit(ThisExpressionAST *)
bool
CheckExpression
::
visit
(
CompoundExpressionAST
*
ast
)
{
_fullySpecifiedType
=
semantic
()
->
check
(
ast
->
compoundS
tatement
,
_scope
);
_fullySpecifiedType
=
semantic
()
->
check
(
ast
->
s
tatement
,
_scope
);
return
false
;
}
...
...
src/shared/cplusplus/Parser.cpp
View file @
6f80219d
...
...
@@ -3573,12 +3573,12 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
ast
->
lparen_token
=
consumeToken
();
StatementAST
*
statement
=
0
;
parseCompoundStatement
(
statement
);
ast
->
compoundS
tatement
=
statement
->
asCompoundStatement
();
ast
->
s
tatement
=
statement
->
asCompoundStatement
();
match
(
T_RPAREN
,
&
ast
->
rparen_token
);
node
=
ast
;
if
(
ast
->
compoundS
tatement
&&
ast
->
compoundS
tatement
->
statement_list
)
{
if
(
ast
->
s
tatement
&&
ast
->
s
tatement
->
statement_list
)
{
// check that the last statement is an expression-statement
StatementAST
*
lastStmt
=
ast
->
compoundS
tatement
->
statement_list
->
lastValue
();
StatementAST
*
lastStmt
=
ast
->
s
tatement
->
statement_list
->
lastValue
();
if
(
!
lastStmt
||
!
ast
->
asExpressionStatement
())
_translationUnit
->
error
(
cursor
(),
"expected an expression statement before token `%s'"
,
...
...
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