Commit 989681a0 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Added attribute parsing for elaborate-type-specifiers.

parent 7a3fbf12
...@@ -2125,10 +2125,18 @@ bool Parser::parseElaboratedTypeSpecifier(SpecifierListAST *&node) ...@@ -2125,10 +2125,18 @@ bool Parser::parseElaboratedTypeSpecifier(SpecifierListAST *&node)
DEBUG_THIS_RULE(); DEBUG_THIS_RULE();
if (lookAtClassKey() || LA() == T_ENUM || LA() == T_TYPENAME) { if (lookAtClassKey() || LA() == T_ENUM || LA() == T_TYPENAME) {
unsigned classkey_token = consumeToken(); unsigned classkey_token = consumeToken();
SpecifierListAST *attributes = 0, **attr_ptr = &attributes;
while (LA() == T___ATTRIBUTE__) {
parseAttributeSpecifier(*attr_ptr);
attr_ptr = &(*attr_ptr)->next;
}
NameAST *name = 0; NameAST *name = 0;
if (parseName(name)) { if (parseName(name)) {
ElaboratedTypeSpecifierAST *ast = new (_pool) ElaboratedTypeSpecifierAST; ElaboratedTypeSpecifierAST *ast = new (_pool) ElaboratedTypeSpecifierAST;
ast->classkey_token = classkey_token; ast->classkey_token = classkey_token;
ast->attribute_list = attributes;
ast->name = name; ast->name = name;
node = new (_pool) SpecifierListAST(ast); node = new (_pool) SpecifierListAST(ast);
return true; return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment