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

@@ -331,6 +331,23 @@ bool ASTMatcher::match(BaseSpecifierAST *node, BaseSpecifierAST *pattern)
return true;
}
bool ASTMatcher::match(CompoundExpressionAST *node, CompoundExpressionAST *pattern)
{
(void) node;
(void) pattern;
pattern->lparen_token = node->lparen_token;
if (! pattern->compoundStatement)
pattern->compoundStatement = node->compoundStatement;
else if (! AST::match(node->compoundStatement, pattern->compoundStatement, this))
return false;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(CompoundLiteralAST *node, CompoundLiteralAST *pattern)
{
(void) node;