class RuboCop::ProcessedSource

def tokenize(parser)

def tokenize(parser)
  begin
    ast, comments, tokens = parser.tokenize(@buffer)
    ast.complete! if ast
  rescue Parser::SyntaxError # rubocop:disable Lint/HandleExceptions
    # All errors are in diagnostics. No need to handle exception.
  end
  tokens = tokens.map { |t| Token.from_parser_token(t) } if tokens
  [ast, comments, tokens]
end