int end = this.scanner.eofPosition == Integer.MAX_VALUE ? this.scanner.eofPosition : this.scanner.eofPosition - 1;
if(isDietParse) {
TypeDeclaration[] types = this.compilationUnit.types;
int[][] intervalToSkip = org.aspectj.org.eclipse.jdt.internal.compiler.parser.diagnose.RangeUtil.computeDietRange(types);
DiagnoseParser diagnoseParser = new DiagnoseParser((Parser)this, oldFirstToken, start, end, intervalToSkip[0], intervalToSkip[1], intervalToSkip[2], this.options);
diagnoseParser.diagnoseParse(false);
reportSyntaxErrorsForSkippedMethod(types);
this.scanner.resetTo(start, end);
} else {
DiagnoseParser diagnoseParser = new DiagnoseParser((Parser)this, oldFirstToken, start, end, this.options);