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