Parse ASM specifiers after declarators.

Again, a gcc extension used in the OSX system headers.
This commit is contained in:
Roberto Raggi
2009-11-04 13:47:06 +01:00
parent 4a87d875f0
commit 64a08d15f3

View File

@@ -1200,6 +1200,14 @@ bool Parser::parseDeclarator(DeclaratorAST *&node, bool stopAtCppInitializer)
break;
}
if (LA() == T___ASM__ && LA(2) == T_LPAREN) { // ### store the asm specifier in the AST
consumeToken(); // skip __asm__
consumeToken(); // skip T_LPAREN
if (skipUntil(T_RPAREN))
consumeToken(); // skip T_RPAREN
}
SpecifierAST **spec_ptr = &node->post_attributes;
while (LA() == T___ATTRIBUTE__) {
parseAttributeSpecifier(*spec_ptr);