Introduced ForeachStatementAST and the bits to parse foreach statements when qtMocRun is enabled.

This commit is contained in:
Roberto Raggi
2009-07-03 09:11:52 +02:00
parent 16286b763d
commit 3cdd48067c
16 changed files with 185 additions and 14 deletions

View File

@@ -874,6 +874,24 @@ unsigned ExpressionStatementAST::lastToken() const
return 0;
}
unsigned ForeachStatementAST::firstToken() const
{
return foreach_token;
}
unsigned ForeachStatementAST::lastToken() const
{
if (statement)
return statement->lastToken();
else if (rparen_token)
return rparen_token + 1;
else if (expression)
return expression->lastToken();
else if (comma_token)
return comma_token + 1;
return foreach_token + 1;
}
unsigned ForStatementAST::firstToken() const
{