1//===--- SortJavaScriptImports.h - Sort ES6 Imports -------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9/// 10/// \file 11/// \brief This file implements a sorter for JavaScript ES6 imports. 12/// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_CLANG_LIB_FORMAT_SORTJAVASCRIPTIMPORTS_H 16#define LLVM_CLANG_LIB_FORMAT_SORTJAVASCRIPTIMPORTS_H 17 18#include "clang/Basic/LLVM.h" 19#include "clang/Format/Format.h" 20#include "llvm/ADT/ArrayRef.h" 21#include "llvm/ADT/StringRef.h" 22 23namespace clang { 24namespace format { 25 26// Sort JavaScript ES6 imports/exports in ``Code``. The generated replacements 27// only monotonically increase the length of the given code. 28tooling::Replacements sortJavaScriptImports(const FormatStyle &Style, 29 StringRef Code, 30 ArrayRef<tooling::Range> Ranges, 31 StringRef FileName); 32 33} // end namespace format 34} // end namespace clang 35 36#endif 37