lineToChunkList(textArea.lineSegment, buffer.markTokens(physicalLine).getFirstToken(), painter.getStyles(),painter.getFontRenderContext(), painter,textArea.softWrap ? textArea.wrapMargin : 0.0f,out);
Chunk first = null; Chunk current = null; Chunk end = null;  int tokenListOffset = 0;  while(tokens.id != Token.END) { int flushIndex = tokenListOffset;  for(int i = tokenListOffset; i < tokenListOffset + tokens.length; i++) { char ch = seg.array[seg.offset + i];  if(ch == '\t' || (ch == ' ' && wrapMargin != 0.0f)) {   if(i != flushIndex) { Chunk newChunk = new Chunk( tokens.id,seg,flushIndex, i,styles,fontRenderContext); if(current != null) current.next = newChunk; current = newChunk;  x += newChunk.width; }  if(end != null && addedNonWhiteSpace && wrapMargin != 0 && x > wrapMargin) { if(first != null) out.add(first); first = new Chunk(firstNonWhiteSpace,flushIndex); first.next = end.next; end.next = null;  x = x + firstNonWhiteSpace - endX; }  if(first == null) first = current;  if(i != flushIndex) seenNonWhiteSpace = true;    if(ch == ' ') { Chunk newChunk = new Chunk( tokens.id,seg,i,i + 1, styles,fontRenderContext); if(first == null) first = current = newChunk; else { current.next = newChunk; current = newChunk; }  x += current.width; }  else if(ch == '\t') { Chunk newChunk = new Chunk( tokens.id,seg,i,i, styles,fontRenderContext); if(first == null) first = current = newChunk; else { current.next = newChunk; current = newChunk; }  float newX = e.nextTabStop(x,i + tokenListOffset); current.width = newX - x; x = newX; current.length = 1; }  if(!seenNonWhiteSpace) firstNonWhiteSpace = x;  if(first == null) first = current;  end = current; endX = x;  flushIndex = i + 1;  addedNonWhiteSpace = seenNonWhiteSpace; } else if(i == tokenListOffset + tokens.length - 1) { Chunk newChunk = new Chunk( tokens.id,seg,flushIndex, i + 1,styles,fontRenderContext); if(current != null) current.next = newChunk; current = newChunk;  x += newChunk.width;  if(i == seg.count - 1 && wrapMargin != 0 && x > wrapMargin && addedNonWhiteSpace && end != null) { if(first != null) out.add(first); first = new Chunk(firstNonWhiteSpace,flushIndex); first.next = end.next; end.next = null;  x = x + firstNonWhiteSpace - endX; }  if(first == null) first = newChunk;  seenNonWhiteSpace = true; } }  tokenListOffset += tokens.length; tokens = tokens.next; }  if(first != null) out.add(first);
	void lineToChunkList(Buffer buffer, int physicalLine, ArrayList out)	{		TextAreaPainter painter = textArea.getPainter();		buffer.getLineText(physicalLine,textArea.lineSegment);		lineToChunkList(textArea.lineSegment,			buffer.markTokens(physicalLine).getFirstToken(),			painter.getStyles(),painter.getFontRenderContext(),			painter,textArea.softWrap			? textArea.wrapMargin			: 0.0f,out);	} //}}}