diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-03-16 17:29:40 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-03-17 10:30:17 +0100 |
commit | b4d72a78dbe365a0b5578e453bb9daaeb0260996 (patch) | |
tree | 5e4de55006cc0276cce7942a9aa33d2f78ea92b4 /src/shared/cplusplus/ASTClone.cpp | |
parent | 61132f260c029c868e1971771424c62f36cef638 (diff) | |
download | qt-creator-b4d72a78dbe365a0b5578e453bb9daaeb0260996.tar.gz |
Added parser support for Q_INTERFACES.
Diffstat (limited to 'src/shared/cplusplus/ASTClone.cpp')
-rw-r--r-- | src/shared/cplusplus/ASTClone.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/shared/cplusplus/ASTClone.cpp b/src/shared/cplusplus/ASTClone.cpp index f9d45b6fed..1e58c3f692 100644 --- a/src/shared/cplusplus/ASTClone.cpp +++ b/src/shared/cplusplus/ASTClone.cpp @@ -204,6 +204,29 @@ QtFlagsDeclarationAST *QtFlagsDeclarationAST::clone(MemoryPool *pool) const return ast; } +QtInterfaceNameAST *QtInterfaceNameAST::clone(MemoryPool *pool) const +{ + QtInterfaceNameAST *ast = new (pool) QtInterfaceNameAST; + if (interface_name) + ast->interface_name = interface_name->clone(pool); + for (NameListAST *iter = constraint_list, **ast_iter = &ast->constraint_list; + iter; iter = iter->next, ast_iter = &(*ast_iter)->next) + *ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0); + return ast; +} + +QtInterfacesDeclarationAST *QtInterfacesDeclarationAST::clone(MemoryPool *pool) const +{ + QtInterfacesDeclarationAST *ast = new (pool) QtInterfacesDeclarationAST; + ast->interfaces_token = interfaces_token; + ast->lparen_token = lparen_token; + for (QtInterfaceNameListAST *iter = interface_name_list, **ast_iter = &ast->interface_name_list; + iter; iter = iter->next, ast_iter = &(*ast_iter)->next) + *ast_iter = new (pool) QtInterfaceNameListAST((iter->value) ? iter->value->clone(pool) : 0); + ast->rparen_token = rparen_token; + return ast; +} + AsmDefinitionAST *AsmDefinitionAST::clone(MemoryPool *pool) const { AsmDefinitionAST *ast = new (pool) AsmDefinitionAST; |