Commit 8d8b05da authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Reworked parts of the QtPropertyDeclaration parsing and handling.

parent 6ca5f5f5
......@@ -498,7 +498,7 @@ bool CheckUndefinedSymbols::visit(ObjCClassDeclarationAST *ast)
bool CheckUndefinedSymbols::visit(ObjCProtocolRefsAST *ast)
{
for (ObjCIdentifierListAST *iter = ast->identifier_list; iter; iter = iter->next) {
for (NameListAST *iter = ast->identifier_list; iter; iter = iter->next) {
if (NameAST *nameAST = iter->value) {
bool resolvedProtocolName = false;
......
......@@ -766,10 +766,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
expandBuiltinMacro(identifierToken, spell);
else {
#ifdef ICHECK_BUILD
if(spell != "Q_PROPERTY" && spell != "Q_INVOKABLE" && spell != "Q_ENUMS"
&& spell != "Q_FLAGS" && spell != "Q_DECLARE_FLAGS"){
#endif
if (spell != "Q_PROPERTY" && spell != "Q_INVOKABLE" && spell != "Q_ENUMS"
&& spell != "Q_FLAGS" && spell != "Q_DECLARE_FLAGS") {
// ### FIXME: shouldn't this be T_Q_PROPERTY & friends?
if (Macro *m = env->resolve(spell)) {
if (! m->isFunctionLike()) {
if (0 == (m = processObjectLikeMacro(identifierToken, spell, m)))
......@@ -790,9 +791,7 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
}
}
}
#ifdef ICHECK_BUILD
}
#endif
// it's not a function or object-like macro.
out(spell);
}
......
......@@ -144,42 +144,42 @@ unsigned AccessDeclarationAST::lastToken() const
return access_specifier_token + 1;
}
unsigned QPropertyDeclarationAST::firstToken() const
unsigned QtPropertyDeclarationAST::firstToken() const
{
return property_specifier_token;
}
unsigned QPropertyDeclarationAST::lastToken() const
unsigned QtPropertyDeclarationAST::lastToken() const
{
return rparen_token;
}
unsigned QEnumDeclarationAST::firstToken() const
unsigned QtEnumDeclarationAST::firstToken() const
{
return enum_specifier_token;
}
unsigned QEnumDeclarationAST::lastToken() const
unsigned QtEnumDeclarationAST::lastToken() const
{
return rparen_token;
}
unsigned QFlagsDeclarationAST::firstToken() const
unsigned QtFlagsDeclarationAST::firstToken() const
{
return this->flags_specifier_token;
}
unsigned QFlagsDeclarationAST::lastToken() const
unsigned QtFlagsDeclarationAST::lastToken() const
{
return rparen_token;
}
unsigned QDeclareFlagsDeclarationAST::firstToken() const
unsigned QtDeclareFlagsDeclarationAST::firstToken() const
{
return declareflags_specifier_token;
}
unsigned QDeclareFlagsDeclarationAST::lastToken() const
unsigned QtDeclareFlagsDeclarationAST::lastToken() const
{
return rparen_token;
}
......
......@@ -256,12 +256,12 @@ public:
virtual PostfixDeclaratorAST *asPostfixDeclarator() { return 0; }
virtual PostfixExpressionAST *asPostfixExpression() { return 0; }
virtual PtrOperatorAST *asPtrOperator() { return 0; }
virtual QDeclareFlagsDeclarationAST *asQDeclareFlagsDeclaration() { return 0; }
virtual QEnumDeclarationAST *asQEnumDeclaration() { return 0; }
virtual QFlagsDeclarationAST *asQFlagsDeclaration() { return 0; }
virtual QPropertyDeclarationAST *asQPropertyDeclaration() { return 0; }
virtual QtDeclareFlagsDeclarationAST *asQtDeclareFlagsDeclaration() { return 0; }
virtual QtEnumDeclarationAST *asQtEnumDeclaration() { return 0; }
virtual QtFlagsDeclarationAST *asQtFlagsDeclaration() { return 0; }
virtual QtMemberDeclarationAST *asQtMemberDeclaration() { return 0; }
virtual QtMethodAST *asQtMethod() { return 0; }
virtual QtPropertyDeclarationAST *asQtPropertyDeclaration() { return 0; }
virtual QualifiedNameAST *asQualifiedName() { return 0; }
virtual ReferenceAST *asReference() { return 0; }
virtual ReturnStatementAST *asReturnStatement() { return 0; }
......@@ -552,7 +552,7 @@ protected:
virtual bool match0(AST *, ASTMatcher *);
};
class CPLUSPLUS_EXPORT QPropertyDeclarationAST: public DeclarationAST
class CPLUSPLUS_EXPORT QtPropertyDeclarationAST: public DeclarationAST
{
/*
Q_PROPERTY(type name
......@@ -569,54 +569,63 @@ class CPLUSPLUS_EXPORT QPropertyDeclarationAST: public DeclarationAST
public:
unsigned property_specifier_token;
unsigned lparen_token;
unsigned type_token;
unsigned type_name_token;
ExpressionAST *type_id;
SimpleNameAST *type_name;
unsigned read_token;
unsigned read_function_token;
SimpleNameAST *read_function;
unsigned write_token;
unsigned write_function_token;
SimpleNameAST *write_function;
unsigned reset_token;
unsigned reset_function_token;
SimpleNameAST *reset_function;
unsigned notify_token;
unsigned notify_function_token;
SimpleNameAST *notify_function;
unsigned designable_token;
BoolLiteralAST *designable_value;
unsigned scriptable_token;
BoolLiteralAST *scriptable_value;
unsigned stored_token;
BoolLiteralAST *stored_value;
unsigned user_token;
BoolLiteralAST *user_value;
unsigned constant_token;
unsigned final_token;
unsigned rparen_token;
public:
virtual QPropertyDeclarationAST *asQPropertyDeclaration() { return this; }
virtual QtPropertyDeclarationAST *asQtPropertyDeclaration() { return this; }
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
virtual QPropertyDeclarationAST *clone(MemoryPool *pool) const;
virtual QtPropertyDeclarationAST *clone(MemoryPool *pool) const;
protected:
virtual void accept0(ASTVisitor *visitor);
virtual bool match0(AST *, ASTMatcher *);
};
class CPLUSPLUS_EXPORT QEnumDeclarationAST: public DeclarationAST
class CPLUSPLUS_EXPORT QtEnumDeclarationAST: public DeclarationAST
{
/*Q_ENUMS(enum1, enum2)*/
public:
unsigned enum_specifier_token;
unsigned lparen_token;
NameListAST *enumerator_list;
unsigned rparen_token;
EnumeratorListAST *enumerator_list;
public:
virtual QEnumDeclarationAST *asQEnumDeclaration() { return this; }
virtual QtEnumDeclarationAST *asQtEnumDeclaration() { return this; }
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
virtual QEnumDeclarationAST *clone(MemoryPool *pool) const;
virtual QtEnumDeclarationAST *clone(MemoryPool *pool) const;
protected:
virtual void accept0(ASTVisitor *visitor);
virtual bool match0(AST *, ASTMatcher *);
};
class CPLUSPLUS_EXPORT QFlagsDeclarationAST: public DeclarationAST
class CPLUSPLUS_EXPORT QtFlagsDeclarationAST: public DeclarationAST
{
/*Q_FLAGS(enum1 enum2 flags1 ...)*/
public:
......@@ -626,19 +635,19 @@ public:
EnumeratorListAST *enumerator_list;
public:
virtual QFlagsDeclarationAST *asQFlagsDeclaration() { return this; }
virtual QtFlagsDeclarationAST *asQtFlagsDeclaration() { return this; }
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
virtual QFlagsDeclarationAST *clone(MemoryPool *pool) const;
virtual QtFlagsDeclarationAST *clone(MemoryPool *pool) const;
protected:
virtual void accept0(ASTVisitor *visitor);
virtual bool match0(AST *, ASTMatcher *);
};
class CPLUSPLUS_EXPORT QDeclareFlagsDeclarationAST: public DeclarationAST
class CPLUSPLUS_EXPORT QtDeclareFlagsDeclarationAST: public DeclarationAST
{
/*Q_DECLARE_FLAGS(flag enum)*/
public:
......@@ -649,12 +658,12 @@ public:
unsigned rparen_token;
public:
virtual QDeclareFlagsDeclarationAST *asQDeclareFlagsDeclaration() { return this; }
virtual QtDeclareFlagsDeclarationAST *asQtDeclareFlagsDeclaration() { return this; }
virtual unsigned firstToken() const;
virtual unsigned lastToken() const;
virtual QDeclareFlagsDeclarationAST *clone(MemoryPool *pool) const;
virtual QtDeclareFlagsDeclarationAST *clone(MemoryPool *pool) const;
protected:
virtual void accept0(ASTVisitor *visitor);
......@@ -2568,7 +2577,7 @@ class CPLUSPLUS_EXPORT ObjCClassForwardDeclarationAST: public DeclarationAST
public:
SpecifierListAST *attribute_list;
unsigned class_token;
ObjCIdentifierListAST *identifier_list;
NameListAST *identifier_list;
unsigned semicolon_token;
public: // annotations
......@@ -2625,7 +2634,7 @@ class CPLUSPLUS_EXPORT ObjCProtocolForwardDeclarationAST: public DeclarationAST
public:
SpecifierListAST *attribute_list;
unsigned protocol_token;
ObjCIdentifierListAST *identifier_list;
NameListAST *identifier_list;
unsigned semicolon_token;
public: // annotations
......@@ -2674,7 +2683,7 @@ class CPLUSPLUS_EXPORT ObjCProtocolRefsAST: public AST
{
public:
unsigned less_token;
ObjCIdentifierListAST *identifier_list;
NameListAST *identifier_list;
unsigned greater_token;
public:
......@@ -3064,7 +3073,7 @@ class CPLUSPLUS_EXPORT ObjCDynamicPropertiesDeclarationAST: public DeclarationAS
{
public:
unsigned dynamic_token;
ObjCIdentifierListAST *property_identifier_list;
NameListAST *property_identifier_list;
unsigned semicolon_token;
public:
......
......@@ -138,40 +138,60 @@ AccessDeclarationAST *AccessDeclarationAST::clone(MemoryPool *pool) const
return ast;
}
QPropertyDeclarationAST *QPropertyDeclarationAST::clone(MemoryPool *pool) const
QtPropertyDeclarationAST *QtPropertyDeclarationAST::clone(MemoryPool *pool) const
{
QPropertyDeclarationAST *ast = new (pool) QPropertyDeclarationAST;
QtPropertyDeclarationAST *ast = new (pool) QtPropertyDeclarationAST;
ast->property_specifier_token = property_specifier_token;
ast->lparen_token = lparen_token;
ast->type_token = type_token;
ast->type_name_token = type_name_token;
if (type_id)
ast->type_id = type_id->clone(pool);
if (type_name)
ast->type_name = type_name->clone(pool);
ast->read_token = read_token;
ast->read_function_token = read_function_token;
if (read_function)
ast->read_function = read_function->clone(pool);
ast->write_token = write_token;
ast->write_function_token = write_function_token;
if (write_function)
ast->write_function = write_function->clone(pool);
ast->reset_token = reset_token;
ast->reset_function_token = reset_function_token;
if (reset_function)
ast->reset_function = reset_function->clone(pool);
ast->notify_token = notify_token;
ast->notify_function_token = notify_function_token;
if (notify_function)
ast->notify_function = notify_function->clone(pool);
ast->designable_token = designable_token;
if (designable_value)
ast->designable_value = designable_value->clone(pool);
ast->scriptable_token = scriptable_token;
if (scriptable_value)
ast->scriptable_value = scriptable_value->clone(pool);
ast->stored_token = stored_token;
if (stored_value)
ast->stored_value = stored_value->clone(pool);
ast->user_token = user_token;
if (user_value)
ast->user_value = user_value->clone(pool);
ast->constant_token = constant_token;
ast->final_token = final_token;
ast->rparen_token = rparen_token;
return ast;
}
QEnumDeclarationAST *QEnumDeclarationAST::clone(MemoryPool *pool) const
QtEnumDeclarationAST *QtEnumDeclarationAST::clone(MemoryPool *pool) const
{
QEnumDeclarationAST *ast = new (pool) QEnumDeclarationAST;
QtEnumDeclarationAST *ast = new (pool) QtEnumDeclarationAST;
ast->enum_specifier_token = enum_specifier_token;
ast->lparen_token = lparen_token;
ast->rparen_token = rparen_token;
for (EnumeratorListAST *iter = enumerator_list, **ast_iter = &ast->enumerator_list;
for (NameListAST *iter = enumerator_list, **ast_iter = &ast->enumerator_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) EnumeratorListAST((iter->value) ? iter->value->clone(pool) : 0);
*ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->rparen_token = rparen_token;
return ast;
}
QFlagsDeclarationAST *QFlagsDeclarationAST::clone(MemoryPool *pool) const
QtFlagsDeclarationAST *QtFlagsDeclarationAST::clone(MemoryPool *pool) const
{
QFlagsDeclarationAST *ast = new (pool) QFlagsDeclarationAST;
QtFlagsDeclarationAST *ast = new (pool) QtFlagsDeclarationAST;
ast->flags_specifier_token = flags_specifier_token;
ast->lparen_token = lparen_token;
ast->rparen_token = rparen_token;
......@@ -181,9 +201,9 @@ QFlagsDeclarationAST *QFlagsDeclarationAST::clone(MemoryPool *pool) const
return ast;
}
QDeclareFlagsDeclarationAST *QDeclareFlagsDeclarationAST::clone(MemoryPool *pool) const
QtDeclareFlagsDeclarationAST *QtDeclareFlagsDeclarationAST::clone(MemoryPool *pool) const
{
QDeclareFlagsDeclarationAST *ast = new (pool) QDeclareFlagsDeclarationAST;
QtDeclareFlagsDeclarationAST *ast = new (pool) QtDeclareFlagsDeclarationAST;
ast->declareflags_specifier_token = declareflags_specifier_token;
ast->lparen_token = lparen_token;
ast->flag_token = flag_token;
......@@ -1225,9 +1245,9 @@ ObjCClassForwardDeclarationAST *ObjCClassForwardDeclarationAST::clone(MemoryPool
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->class_token = class_token;
for (ObjCIdentifierListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) ObjCIdentifierListAST((iter->value) ? iter->value->clone(pool) : 0);
*ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->semicolon_token = semicolon_token;
return ast;
}
......@@ -1267,9 +1287,9 @@ ObjCProtocolForwardDeclarationAST *ObjCProtocolForwardDeclarationAST::clone(Memo
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) SpecifierListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->protocol_token = protocol_token;
for (ObjCIdentifierListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) ObjCIdentifierListAST((iter->value) ? iter->value->clone(pool) : 0);
*ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->semicolon_token = semicolon_token;
return ast;
}
......@@ -1296,9 +1316,9 @@ ObjCProtocolRefsAST *ObjCProtocolRefsAST::clone(MemoryPool *pool) const
{
ObjCProtocolRefsAST *ast = new (pool) ObjCProtocolRefsAST;
ast->less_token = less_token;
for (ObjCIdentifierListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
for (NameListAST *iter = identifier_list, **ast_iter = &ast->identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) ObjCIdentifierListAST((iter->value) ? iter->value->clone(pool) : 0);
*ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->greater_token = greater_token;
return ast;
}
......@@ -1501,9 +1521,9 @@ ObjCDynamicPropertiesDeclarationAST *ObjCDynamicPropertiesDeclarationAST::clone(
{
ObjCDynamicPropertiesDeclarationAST *ast = new (pool) ObjCDynamicPropertiesDeclarationAST;
ast->dynamic_token = dynamic_token;
for (ObjCIdentifierListAST *iter = property_identifier_list, **ast_iter = &ast->property_identifier_list;
for (NameListAST *iter = property_identifier_list, **ast_iter = &ast->property_identifier_list;
iter; iter = iter->next, ast_iter = &(*ast_iter)->next)
*ast_iter = new (pool) ObjCIdentifierListAST((iter->value) ? iter->value->clone(pool) : 0);
*ast_iter = new (pool) NameListAST((iter->value) ? iter->value->clone(pool) : 0);
ast->semicolon_token = semicolon_token;
return ast;
}
......
......@@ -105,33 +105,33 @@ bool AccessDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
return false;
}
bool QPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
bool QtPropertyDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QPropertyDeclarationAST *_other = pattern->asQPropertyDeclaration())
if (QtPropertyDeclarationAST *_other = pattern->asQtPropertyDeclaration())
return matcher->match(this, _other);
return false;
}
bool QEnumDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
bool QtEnumDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QEnumDeclarationAST *_other = pattern->asQEnumDeclaration())
if (QtEnumDeclarationAST *_other = pattern->asQtEnumDeclaration())
return matcher->match(this, _other);
return false;
}
bool QFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
bool QtFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QFlagsDeclarationAST *_other = pattern->asQFlagsDeclaration())
if (QtFlagsDeclarationAST *_other = pattern->asQtFlagsDeclaration())
return matcher->match(this, _other);
return false;
}
bool QDeclareFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
bool QtDeclareFlagsDeclarationAST::match0(AST *pattern, ASTMatcher *matcher)
{
if (QDeclareFlagsDeclarationAST *_other = pattern->asQDeclareFlagsDeclaration())
if (QtDeclareFlagsDeclarationAST *_other = pattern->asQtDeclareFlagsDeclaration())
return matcher->match(this, _other);
return false;
......
......@@ -206,7 +206,7 @@ bool ASTMatcher::match(AccessDeclarationAST *node, AccessDeclarationAST *pattern
return true;
}
bool ASTMatcher::match(QPropertyDeclarationAST *node, QPropertyDeclarationAST *pattern)
bool ASTMatcher::match(QtPropertyDeclarationAST *node, QtPropertyDeclarationAST *pattern)
{
(void) node;
(void) pattern;
......@@ -215,32 +215,82 @@ bool ASTMatcher::match(QPropertyDeclarationAST *node, QPropertyDeclarationAST *p
pattern->lparen_token = node->lparen_token;
pattern->type_token = node->type_token;
if (! pattern->type_id)
pattern->type_id = node->type_id;
else if (! AST::match(node->type_id, pattern->type_id, this))
return false;
pattern->type_name_token = node->type_name_token;
if (! pattern->type_name)
pattern->type_name = node->type_name;
else if (! AST::match(node->type_name, pattern->type_name, this))
return false;
pattern->read_token = node->read_token;
pattern->read_function_token = node->read_function_token;
if (! pattern->read_function)
pattern->read_function = node->read_function;
else if (! AST::match(node->read_function, pattern->read_function, this))
return false;
pattern->write_token = node->write_token;
pattern->write_function_token = node->write_function_token;
if (! pattern->write_function)
pattern->write_function = node->write_function;
else if (! AST::match(node->write_function, pattern->write_function, this))
return false;
pattern->reset_token = node->reset_token;
pattern->reset_function_token = node->reset_function_token;
if (! pattern->reset_function)
pattern->reset_function = node->reset_function;
else if (! AST::match(node->reset_function, pattern->reset_function, this))
return false;
pattern->notify_token = node->notify_token;
pattern->notify_function_token = node->notify_function_token;
if (! pattern->notify_function)
pattern->notify_function = node->notify_function;
else if (! AST::match(node->notify_function, pattern->notify_function, this))
return false;
pattern->designable_token = node->designable_token;
if (! pattern->designable_value)
pattern->designable_value = node->designable_value;
else if (! AST::match(node->designable_value, pattern->designable_value, this))
return false;
pattern->scriptable_token = node->scriptable_token;
if (! pattern->scriptable_value)
pattern->scriptable_value = node->scriptable_value;
else if (! AST::match(node->scriptable_value, pattern->scriptable_value, this))
return false;
pattern->stored_token = node->stored_token;
if (! pattern->stored_value)
pattern->stored_value = node->stored_value;
else if (! AST::match(node->stored_value, pattern->stored_value, this))
return false;
pattern->user_token = node->user_token;
if (! pattern->user_value)
pattern->user_value = node->user_value;
else if (! AST::match(node->user_value, pattern->user_value, this))
return false;
pattern->constant_token = node->constant_token;
pattern->final_token = node->final_token;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(QEnumDeclarationAST *node, QEnumDeclarationAST *pattern)
bool ASTMatcher::match(QtEnumDeclarationAST *node, QtEnumDeclarationAST *pattern)
{
(void) node;
(void) pattern;
......@@ -249,17 +299,17 @@ bool ASTMatcher::match(QEnumDeclarationAST *node, QEnumDeclarationAST *pattern)
pattern->lparen_token = node->lparen_token;
pattern->rparen_token = node->rparen_token;
if (! pattern->enumerator_list)
pattern->enumerator_list = node->enumerator_list;
else if (! AST::match(node->enumerator_list, pattern->enumerator_list, this))
return false;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(QFlagsDeclarationAST *node, QFlagsDeclarationAST *pattern)
bool ASTMatcher::match(QtFlagsDeclarationAST *node, QtFlagsDeclarationAST *pattern)
{
(void) node;
(void) pattern;
......@@ -278,7 +328,7 @@ bool ASTMatcher::match(QFlagsDeclarationAST *node, QFlagsDeclarationAST *pattern
return true;
}
bool ASTMatcher::match(QDeclareFlagsDeclarationAST *node, QDeclareFlagsDeclarationAST *pattern)
bool ASTMatcher::match(QtDeclareFlagsDeclarationAST *node, QtDeclareFlagsDeclarationAST *pattern)
{
(void) node;
(void) pattern;
......
......@@ -40,10 +40,10 @@ public:
virtual ~ASTMatcher();
virtual bool match(AccessDeclarationAST *node, AccessDeclarationAST *pattern);
virtual bool match(QPropertyDeclarationAST *node, QPropertyDeclarationAST *pattern);
virtual bool match(QEnumDeclarationAST *node, QEnumDeclarationAST *pattern);
virtual bool match(QFlagsDeclarationAST *node, QFlagsDeclarationAST *pattern);
virtual bool match(QDeclareFlagsDeclarationAST *node, QDeclareFlagsDeclarationAST *pattern);
virtual bool match(QtPropertyDeclarationAST *node, QtPropertyDeclarationAST *pattern);
virtual bool match(QtEnumDeclarationAST *node, QtEnumDeclarationAST *pattern);
virtual bool match(QtFlagsDeclarationAST *node, QtFlagsDeclarationAST *pattern);
virtual bool match(QtDeclareFlagsDeclarationAST *node, QtDeclareFlagsDeclarationAST *pattern);
virtual bool match(ArrayAccessAST *node, ArrayAccessAST *pattern);
virtual bool match(ArrayDeclaratorAST *node, ArrayDeclaratorAST *pattern);
virtual bool match(ArrayInitializerAST *node, ArrayInitializerAST *pattern);
......
......@@ -108,14 +108,24 @@ void AccessDeclarationAST::accept0(ASTVisitor *visitor)
visitor->endVisit(this);
}
void QPropertyDeclarationAST::accept0(ASTVisitor *visitor)
void QtPropertyDeclarationAST::accept0(ASTVisitor *visitor)
{
if (visitor->visit(this)) {
accept(type_id, visitor);
accept(type_name, visitor);
accept(read_function, visitor);