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 );
|
callback.declaratorEnd( declarator );
|
||||||
}
|
}
|
||||||
|
@ -511,26 +521,30 @@ c, quick);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (LT(1)) {
|
switch (LT(1)) {
|
||||||
case Token.tLPAREN:
|
case Token.tLPAREN:
|
||||||
// parameterDeclarationClause
|
// temporary fix for initializer/function declaration ambiguity
|
||||||
Object clause = callback.argumentsBegin(declarator);
|
if( LT(2) != Token.tINTEGER )
|
||||||
consume();
|
{
|
||||||
parameterDeclarationLoop:
|
// parameterDeclarationClause
|
||||||
for (;;) {
|
Object clause = callback.argumentsBegin(declarator);
|
||||||
switch (LT(1)) {
|
consume();
|
||||||
case Token.tRPAREN:
|
parameterDeclarationLoop:
|
||||||
consume();
|
for (;;) {
|
||||||
break parameterDeclarationLoop;
|
switch (LT(1)) {
|
||||||
case Token.tELIPSE:
|
case Token.tRPAREN:
|
||||||
consume();
|
consume();
|
||||||
break;
|
break parameterDeclarationLoop;
|
||||||
case Token.tCOMMA:
|
case Token.tELIPSE:
|
||||||
consume();
|
consume();
|
||||||
break;
|
break;
|
||||||
default:
|
case Token.tCOMMA:
|
||||||
parameterDeclaration( clause );
|
consume();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
parameterDeclaration( clause );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
callback.argumentsEnd(clause);
|
||||||
}
|
}
|
||||||
callback.argumentsEnd(clause);
|
|
||||||
break;
|
break;
|
||||||
case Token.tLBRACKET:
|
case Token.tLBRACKET:
|
||||||
consume();
|
consume();
|
||||||
|
|
Loading…
Add table
Reference in a new issue