1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[100398] Added handling of content assist inside of namespace declarations.

This commit is contained in:
Doug Schaefer 2005-06-20 20:50:57 +00:00
parent 77121513be
commit dfc14ef0f3

View file

@ -2583,12 +2583,13 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
name.setParent(namespaceDefinition);
name.setPropertyInParent(ICPPASTNamespaceDefinition.NAMESPACE_NAME);
namespaceDeclarationLoop: while (LT(1) != IToken.tRBRACE) {
int checkToken = LA(1).hashCode();
namespaceDeclarationLoop: while (true) {
switch (LT(1)) {
case IToken.tRBRACE:
case IToken.tEOC:
break namespaceDeclarationLoop;
default:
int checkToken = LA(1).hashCode();
try {
IASTDeclaration d = declaration();
d.setParent(namespaceDefinition);
@ -2610,13 +2611,13 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
if (checkToken == LA(1).hashCode())
errorHandling();
}
if (checkToken == LA(1).hashCode())
failParseWithErrorHandling();
}
if (checkToken == LA(1).hashCode())
failParseWithErrorHandling();
}
// consume the }
int end = consume(IToken.tRBRACE).getEndOffset();
int end = consume().getEndOffset();
((CPPASTNode) namespaceDefinition).setLength(end
- first.getOffset());
return namespaceDefinition;