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/AST.h | |
parent | 61132f260c029c868e1971771424c62f36cef638 (diff) | |
download | qt-creator-b4d72a78dbe365a0b5578e453bb9daaeb0260996.tar.gz |
Added parser support for Q_INTERFACES.
Diffstat (limited to 'src/shared/cplusplus/AST.h')
-rw-r--r-- | src/shared/cplusplus/AST.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h index 40147912be..f9f13a0b7a 100644 --- a/src/shared/cplusplus/AST.h +++ b/src/shared/cplusplus/AST.h @@ -256,6 +256,8 @@ public: virtual PtrOperatorAST *asPtrOperator() { return 0; } virtual QtEnumDeclarationAST *asQtEnumDeclaration() { return 0; } virtual QtFlagsDeclarationAST *asQtFlagsDeclaration() { return 0; } + virtual QtInterfaceNameAST *asQtInterfaceName() { return 0; } + virtual QtInterfacesDeclarationAST *asQtInterfacesDeclaration() { return 0; } virtual QtMemberDeclarationAST *asQtMemberDeclaration() { return 0; } virtual QtMethodAST *asQtMethod() { return 0; } virtual QtPropertyDeclarationAST *asQtPropertyDeclaration() { return 0; } @@ -660,6 +662,46 @@ protected: virtual bool match0(AST *, ASTMatcher *); }; +class CPLUSPLUS_EXPORT QtInterfaceNameAST: public AST +{ +public: + NameAST *interface_name; + NameListAST *constraint_list; + +public: + virtual QtInterfaceNameAST *asQtInterfaceName() { return this; } + + virtual unsigned firstToken() const; + virtual unsigned lastToken() const; + + virtual QtInterfaceNameAST *clone(MemoryPool *pool) const; + +protected: + virtual void accept0(ASTVisitor *visitor); + virtual bool match0(AST *, ASTMatcher *); +}; + +class CPLUSPLUS_EXPORT QtInterfacesDeclarationAST: public DeclarationAST +{ +public: + unsigned interfaces_token; + unsigned lparen_token; + QtInterfaceNameListAST *interface_name_list; + unsigned rparen_token; + +public: + virtual QtInterfacesDeclarationAST *asQtInterfacesDeclaration() { return this; } + + virtual unsigned firstToken() const; + virtual unsigned lastToken() const; + + virtual QtInterfacesDeclarationAST *clone(MemoryPool *pool) const; + +protected: + virtual void accept0(ASTVisitor *visitor); + virtual bool match0(AST *, ASTMatcher *); +}; + class CPLUSPLUS_EXPORT AsmDefinitionAST: public DeclarationAST { public: |