C++11: Parse alias declarations.

The parser no longer fails declarations like:
using Foo = std::vector<int>::iterator;

Change-Id: Ib3a552ebbe0147fa138db6448a52cdba8f9b9207
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Christian Kamm
2012-09-18 10:45:10 +02:00
committed by hjk
parent 9bd86e7d68
commit 8711121197
15 changed files with 192 additions and 0 deletions

View File

@@ -1485,6 +1485,27 @@ bool ASTMatcher::match(NamespaceAliasDefinitionAST *node, NamespaceAliasDefiniti
return true;
}
bool ASTMatcher::match(AliasDeclarationAST *node, AliasDeclarationAST *pattern)
{
(void) node;
(void) pattern;
pattern->using_token = node->using_token;
pattern->identifier_token = node->identifier_token;
pattern->equal_token = node->equal_token;
if (! pattern->typeId)
pattern->typeId = node->typeId;
else if (! AST::match(node->typeId, pattern->typeId, this))
return false;
pattern->semicolon_token = node->semicolon_token;
return true;
}
bool ASTMatcher::match(ExpressionListParenAST *node, ExpressionListParenAST *pattern)
{
(void) node;