Added parser support for Q_INTERFACES.

This commit is contained in:
Erik Verbruggen
2010-03-16 17:29:40 +01:00
parent 61132f260c
commit b4d72a78db
15 changed files with 289 additions and 3 deletions

View File

@@ -313,6 +313,43 @@ bool ASTMatcher::match(QtFlagsDeclarationAST *node, QtFlagsDeclarationAST *patte
return true;
}
bool ASTMatcher::match(QtInterfaceNameAST *node, QtInterfaceNameAST *pattern)
{
(void) node;
(void) pattern;
if (! pattern->interface_name)
pattern->interface_name = node->interface_name;
else if (! AST::match(node->interface_name, pattern->interface_name, this))
return false;
if (! pattern->constraint_list)
pattern->constraint_list = node->constraint_list;
else if (! AST::match(node->constraint_list, pattern->constraint_list, this))
return false;
return true;
}
bool ASTMatcher::match(QtInterfacesDeclarationAST *node, QtInterfacesDeclarationAST *pattern)
{
(void) node;
(void) pattern;
pattern->interfaces_token = node->interfaces_token;
pattern->lparen_token = node->lparen_token;
if (! pattern->interface_name_list)
pattern->interface_name_list = node->interface_name_list;
else if (! AST::match(node->interface_name_list, pattern->interface_name_list, this))
return false;
pattern->rparen_token = node->rparen_token;
return true;
}
bool ASTMatcher::match(AsmDefinitionAST *node, AsmDefinitionAST *pattern)
{
(void) node;