getCurrentTokens method

List<LatexToken> getCurrentTokens()

Gets the current token list (including EOF), using cache to avoid repeated creation

Implementation

List<LatexToken> getCurrentTokens() {
  if (_cachedResult != null) return _cachedResult!;
  final result = _buildResult(_textBuffer.length);
  _cachedResult = result;
  return result;
}