diff options
author | Olivier Thomann | 2003-10-28 21:05:15 +0000 |
---|---|---|
committer | Olivier Thomann | 2003-10-28 21:05:15 +0000 |
commit | a7dba38baa5ee0e3c442d88fef940af593bc7e17 (patch) | |
tree | fdf5f933d310639c549c51eaeb9ab0d9bdc60c6d /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | |
parent | 6b0a2105b67ca2854037c4af6eb71355d346a258 (diff) | |
download | eclipse.jdt.core-a7dba38baa5ee0e3c442d88fef940af593bc7e17.tar.gz eclipse.jdt.core-a7dba38baa5ee0e3c442d88fef940af593bc7e17.tar.xz eclipse.jdt.core-a7dba38baa5ee0e3c442d88fef940af593bc7e17.zip |
Fix semi-colon position at the end of a local variable declaration
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java index a2df9c3a25..a367980081 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java @@ -2442,6 +2442,15 @@ protected void consumeLocalVariableDeclarationStatement() { // see blockReal in case of change: duplicated code // increment the amount of declared variables for this block realBlockStack[realBlockPtr]++; + + // update source end to include the semi-colon + int variableDeclaratorsCounter = astLengthStack[astLengthPtr]; + for (int i = variableDeclaratorsCounter - 1; i >= 0; i--) { + LocalDeclaration localDeclaration = (LocalDeclaration) astStack[astPtr - i]; + localDeclaration.declarationSourceEnd = endStatementPosition; + localDeclaration.declarationEnd = endStatementPosition; // semi-colon included + } + } protected void consumeMethodBody() { // MethodBody ::= NestedMethod '{' BlockStatementsopt '}' |