Lines 3310-3315
Link Here
|
3310 |
} |
3310 |
} |
3311 |
enumConstant.initialization = allocationExpression; |
3311 |
enumConstant.initialization = allocationExpression; |
3312 |
} |
3312 |
} |
|
|
3313 |
// initialize the starting position of the allocation expression |
3314 |
enumConstant.initialization.sourceStart = enumConstant.declarationSourceStart; |
3313 |
|
3315 |
|
3314 |
// recovery |
3316 |
// recovery |
3315 |
if (this.currentElement != null) { |
3317 |
if (this.currentElement != null) { |
Lines 3377-3398
Link Here
|
3377 |
final FieldDeclaration fieldDeclaration = (FieldDeclaration) this.astStack[this.astPtr]; |
3379 |
final FieldDeclaration fieldDeclaration = (FieldDeclaration) this.astStack[this.astPtr]; |
3378 |
fieldDeclaration.declarationEnd = endOfEnumConstant; |
3380 |
fieldDeclaration.declarationEnd = endOfEnumConstant; |
3379 |
fieldDeclaration.declarationSourceEnd = endOfEnumConstant; |
3381 |
fieldDeclaration.declarationSourceEnd = endOfEnumConstant; |
|
|
3382 |
// initialize the starting position of the allocation expression |
3383 |
ASTNode initialization = fieldDeclaration.initialization; |
3384 |
if (initialization != null) { |
3385 |
initialization.sourceEnd = endOfEnumConstant; |
3386 |
} |
3380 |
} |
3387 |
} |
3381 |
protected void consumeEnumConstants() { |
3388 |
protected void consumeEnumConstants() { |
3382 |
concatNodeLists(); |
3389 |
concatNodeLists(); |
3383 |
} |
3390 |
} |
3384 |
protected void consumeEnumConstantWithClassBody() { |
3391 |
protected void consumeEnumConstantWithClassBody() { |
3385 |
dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]); |
3392 |
dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]); |
3386 |
TypeDeclaration anonymousType = (TypeDeclaration) this.astStack[this.astPtr--]; // pop type |
3393 |
TypeDeclaration anonymousType = (TypeDeclaration) this.astStack[this.astPtr--]; // pop type |
3387 |
this.astLengthPtr--; |
3394 |
this.astLengthPtr--; |
3388 |
anonymousType.bodyEnd = this.endPosition; |
3395 |
anonymousType.bodyEnd = this.endPosition; |
3389 |
anonymousType.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition); |
3396 |
anonymousType.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition); |
3390 |
final FieldDeclaration fieldDeclaration = ((FieldDeclaration) this.astStack[this.astPtr]); |
3397 |
final FieldDeclaration fieldDeclaration = ((FieldDeclaration) this.astStack[this.astPtr]); |
3391 |
fieldDeclaration.declarationEnd = this.endStatementPosition; |
3398 |
fieldDeclaration.declarationEnd = this.endStatementPosition; |
3392 |
fieldDeclaration.declarationSourceEnd = anonymousType.declarationSourceEnd; |
3399 |
int declarationSourceEnd = anonymousType.declarationSourceEnd; |
3393 |
this.intPtr --; // remove end position of the arguments |
3400 |
fieldDeclaration.declarationSourceEnd = declarationSourceEnd; |
3394 |
this.variablesCounter[this.nestedType] = 0; |
3401 |
this.intPtr --; // remove end position of the arguments |
3395 |
this.nestedType--; |
3402 |
this.variablesCounter[this.nestedType] = 0; |
|
|
3403 |
this.nestedType--; |
3404 |
ASTNode initialization = fieldDeclaration.initialization; |
3405 |
if (initialization != null) { |
3406 |
initialization.sourceEnd = declarationSourceEnd; |
3407 |
} |
3396 |
} |
3408 |
} |
3397 |
protected void consumeEnumDeclaration() { |
3409 |
protected void consumeEnumDeclaration() { |
3398 |
// EnumDeclaration ::= EnumHeader ClassHeaderImplementsopt EnumBody |
3410 |
// EnumDeclaration ::= EnumHeader ClassHeaderImplementsopt EnumBody |