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

Fixed classOffsets for Hoda

This commit is contained in:
John Camelon 2003-07-23 19:51:30 +00:00
parent b97503af2c
commit f476d6f782

View file

@ -433,6 +433,8 @@ public class Parser implements IParser
IASTTemplateDeclaration templateDecl = astFactory.createTemplateDeclaration( scope, parms, exported, firstToken.getOffset() ); IASTTemplateDeclaration templateDecl = astFactory.createTemplateDeclaration( scope, parms, exported, firstToken.getOffset() );
templateDecl.enterScope( requestor ); templateDecl.enterScope( requestor );
declaration(scope, templateDecl ); declaration(scope, templateDecl );
templateDecl.setEndingOffset(
lastToken.getEndOffset() );
templateDecl.exitScope( requestor ); templateDecl.exitScope( requestor );
} }
@ -2248,7 +2250,7 @@ public class Parser implements IParser
nameType, nameType,
access, access,
classKey.getOffset(), classKey.getOffset(),
duple == null ? 0 : duple.getFirstToken().getOffset()); duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset());
} }
catch (ASTSemanticException e) catch (ASTSemanticException e)
{ {
@ -2304,8 +2306,8 @@ public class Parser implements IParser
errorHandling(); errorHandling();
} }
// consume the } // consume the }
IToken lastToken = consume(IToken.tRBRACE); IToken lt = consume(IToken.tRBRACE);
astClassSpecifier.setEndingOffset(lastToken.getEndOffset()); astClassSpecifier.setEndingOffset(lt.getEndOffset());
astClassSpecifier.exitScope( requestor ); astClassSpecifier.exitScope( requestor );
} }
} }