curr= readNext(false);
curr= readNextWithEOF(false); } if (curr == ITerminalSymbols.TokenNameEOF) { return prevEndPos;
	public int getTokenCommentEnd(int nodeEnd, int nextTokenStart) throws CoreException {		// assign comments to the previous comments as long they are all on the same line as the		// node end position or if they are on the next line but there is a separation from the next		// node		// } //aa		// // aa		//		// // bb		// public void b...		//		// } /* cc */ /*		// cc/*		// /*dd*/		// public void d...				int prevEndLine= getLineOfOffset(nodeEnd - 1);		int prevEndPos= nodeEnd;		int res= nodeEnd;		boolean sameLineComment= true;				setOffset(nodeEnd);				int curr= readNext(false);		while (curr == ITerminalSymbols.TokenNameCOMMENT_LINE || curr == ITerminalSymbols.TokenNameCOMMENT_BLOCK) {			int currStartLine= getLineOfOffset(getCurrentStartOffset());			int linesDifference= currStartLine - prevEndLine;						if (linesDifference > 1) {				return prevEndPos; // separated comments			}						if (curr == ITerminalSymbols.TokenNameCOMMENT_LINE) {				prevEndPos= getLineEnd(currStartLine);				prevEndLine= currStartLine;			} else {				prevEndPos= getCurrentEndOffset();				prevEndLine= getLineOfOffset(prevEndPos - 1);			}			if (sameLineComment) {				if (linesDifference == 0) {					res= prevEndPos;				} else {					sameLineComment= false;				}				}			curr= readNext(false);		}		int currStartLine= getLineOfOffset(getCurrentStartOffset());		int linesDifference= currStartLine - prevEndLine;		if (linesDifference > 1) {			return prevEndPos; // separated comments		}		if (currStartLine == 0 && nextTokenStart == getCurrentStartOffset()) {			return nodeEnd;		}		return res;	}