clang  6.0.0svn
SortJavaScriptImports.h
Go to the documentation of this file.
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 
23 namespace clang {
24 namespace format {
25 
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,
29  StringRef Code,
30  ArrayRef<tooling::Range> Ranges,
31  StringRef FileName);
32 
33 } // end namespace format
34 } // end namespace clang
35 
36 #endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Various functions to configurably format source code.
Dataflow Directional Tag Classes.
tooling::Replacements sortJavaScriptImports(const FormatStyle &Style, StringRef Code, ArrayRef< tooling::Range > Ranges, StringRef FileName)
const FormatStyle & Style