Added AST nodes for compound expressions (a GNU extension).

This commit is contained in:
Erik Verbruggen
2010-02-04 14:55:18 +01:00
parent 7cdb15e7fc
commit fd90c3503d
14 changed files with 111 additions and 21 deletions

View File

@@ -326,6 +326,20 @@ unsigned BoolLiteralAST::lastToken() const
return literal_token + 1;
}
unsigned CompoundExpressionAST::firstToken() const
{
return lparen_token;
}
unsigned CompoundExpressionAST::lastToken() const
{
if (rparen_token)
return rparen_token + 1;
else if (compoundStatement)
return compoundStatement->lastToken();
else
return lparen_token + 1;
}
unsigned CompoundLiteralAST::firstToken() const
{
@@ -2300,5 +2314,3 @@ unsigned ObjCSynchronizedStatementAST::lastToken() const
if (lparen_token) return lparen_token + 1;
return synchronized_token + 1;
}