mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[98377] Added handling of assist in struct members for C.
This commit is contained in:
parent
892cf79f6e
commit
561a996910
1 changed files with 7 additions and 7 deletions
|
@ -1727,13 +1727,15 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
||||||
name.setPropertyInParent(IASTCompositeTypeSpecifier.TYPE_NAME);
|
name.setPropertyInParent(IASTCompositeTypeSpecifier.TYPE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
memberDeclarationLoop: while (LT(1) != IToken.tRBRACE) {
|
int endOffset;
|
||||||
int checkToken = LA(1).hashCode();
|
memberDeclarationLoop: while (true) {
|
||||||
switch (LT(1)) {
|
switch (LT(1)) {
|
||||||
case IToken.tRBRACE:
|
case IToken.tRBRACE:
|
||||||
consume(IToken.tRBRACE);
|
case IToken.tEOC:
|
||||||
|
endOffset = consume().getEndOffset();
|
||||||
break memberDeclarationLoop;
|
break memberDeclarationLoop;
|
||||||
default:
|
default:
|
||||||
|
int checkToken = LA(1).hashCode();
|
||||||
try {
|
try {
|
||||||
IASTDeclaration d = declaration();
|
IASTDeclaration d = declaration();
|
||||||
d.setParent(result);
|
d.setParent(result);
|
||||||
|
@ -1744,12 +1746,10 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
|
||||||
if (checkToken == LA(1).hashCode())
|
if (checkToken == LA(1).hashCode())
|
||||||
failParseWithErrorHandling();
|
failParseWithErrorHandling();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (checkToken == LA(1).hashCode())
|
if (checkToken == LA(1).hashCode())
|
||||||
failParseWithErrorHandling();
|
failParseWithErrorHandling();
|
||||||
}
|
}
|
||||||
// consume the }
|
}
|
||||||
int endOffset = consume(IToken.tRBRACE).getEndOffset();
|
|
||||||
((CASTNode) result).setLength(endOffset - classKey.getOffset());
|
((CASTNode) result).setLength(endOffset - classKey.getOffset());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue