From ddcc40d0fcec541e772e59eb78214fb58819c42a Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Thu, 25 Mar 2010 10:26:33 +0100 Subject: Accepts `...' when parsing declarator-ids in C++0x. --- src/shared/cplusplus/Parser.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/Parser.cpp') diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 3758c0d852..ec9280f434 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -1218,11 +1218,18 @@ bool Parser::parseCoreDeclarator(DeclaratorAST *&node) while (parsePtrOperator(*ptr_operators_tail)) ptr_operators_tail = &(*ptr_operators_tail)->next; - if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER || LA() == T_TILDE - || LA() == T_OPERATOR) { + if (LA() == T_COLON_COLON || LA() == T_IDENTIFIER || LA() == T_TILDE || LA() == T_OPERATOR + || (_cxx0xEnabled && LA() == T_DOT_DOT_DOT && (LA(2) == T_COLON_COLON || LA(2) == T_IDENTIFIER))) { + + unsigned dot_dot_dot_token = 0; + + if (LA() == T_DOT_DOT_DOT) + dot_dot_dot_token = consumeToken(); + NameAST *name = 0; if (parseName(name)) { DeclaratorIdAST *declarator_id = new (_pool) DeclaratorIdAST; + declarator_id->dot_dot_dot_token = dot_dot_dot_token; declarator_id->name = name; DeclaratorAST *ast = new (_pool) DeclaratorAST; ast->attribute_list = attributes; -- cgit v1.2.1