extractIndentationFromTokens
open fun extractIndentationFromTokens(precedingTokens: List<TextElement>): List<TextElement>(source)
Extracts the indentation portion from a list of elements. This method differs from computeFromPrecedingElements because it doesn't look for a newline first - it assumes the list represents tokens after a newline and simply extracts all leading whitespace. This is useful when we have already collected preceding tokens and want to extract just the indentation part.
Return
list of indentation elements (leading whitespace only)
Parameters
precedingTokens
tokens that precede the position