mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Patch for John Camelon:
- Fixing initDeclarators for outline view
This commit is contained in:
parent
cecdca34fd
commit
e97cc0fc46
1 changed files with 32 additions and 18 deletions
|
@ -466,6 +466,16 @@ c, quick);
|
|||
}
|
||||
}
|
||||
}
|
||||
else if( LT(1) == Token.tLPAREN )
|
||||
{
|
||||
consume(); // EAT IT!
|
||||
|
||||
constantExpression();
|
||||
|
||||
if( LT(1) == Token.tRPAREN )
|
||||
consume();
|
||||
|
||||
}
|
||||
|
||||
callback.declaratorEnd( declarator );
|
||||
}
|
||||
|
@ -511,26 +521,30 @@ c, quick);
|
|||
for (;;) {
|
||||
switch (LT(1)) {
|
||||
case Token.tLPAREN:
|
||||
// parameterDeclarationClause
|
||||
Object clause = callback.argumentsBegin(declarator);
|
||||
consume();
|
||||
parameterDeclarationLoop:
|
||||
for (;;) {
|
||||
switch (LT(1)) {
|
||||
case Token.tRPAREN:
|
||||
consume();
|
||||
break parameterDeclarationLoop;
|
||||
case Token.tELIPSE:
|
||||
consume();
|
||||
break;
|
||||
case Token.tCOMMA:
|
||||
consume();
|
||||
break;
|
||||
default:
|
||||
parameterDeclaration( clause );
|
||||
// temporary fix for initializer/function declaration ambiguity
|
||||
if( LT(2) != Token.tINTEGER )
|
||||
{
|
||||
// parameterDeclarationClause
|
||||
Object clause = callback.argumentsBegin(declarator);
|
||||
consume();
|
||||
parameterDeclarationLoop:
|
||||
for (;;) {
|
||||
switch (LT(1)) {
|
||||
case Token.tRPAREN:
|
||||
consume();
|
||||
break parameterDeclarationLoop;
|
||||
case Token.tELIPSE:
|
||||
consume();
|
||||
break;
|
||||
case Token.tCOMMA:
|
||||
consume();
|
||||
break;
|
||||
default:
|
||||
parameterDeclaration( clause );
|
||||
}
|
||||
}
|
||||
callback.argumentsEnd(clause);
|
||||
}
|
||||
callback.argumentsEnd(clause);
|
||||
break;
|
||||
case Token.tLBRACKET:
|
||||
consume();
|
||||
|
|
Loading…
Add table
Reference in a new issue