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

@@ -213,6 +213,16 @@ BaseSpecifierAST *BaseSpecifierAST::clone(MemoryPool *pool) const
return ast;
}
CompoundExpressionAST *CompoundExpressionAST::clone(MemoryPool *pool) const
{
CompoundExpressionAST *ast = new (pool) CompoundExpressionAST;
ast->lparen_token = lparen_token;
if (compoundStatement)
ast->compoundStatement = compoundStatement->clone(pool);
ast->rparen_token = rparen_token;
return ast;
}
CompoundLiteralAST *CompoundLiteralAST::clone(MemoryPool *pool) const
{
CompoundLiteralAST *ast = new (pool) CompoundLiteralAST;