brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · b55b149 Raw
33 lines · c
1//===--- SortJavaScriptImports.h - Sort ES6 Imports -------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file implements a sorter for JavaScript ES6 imports.11///12//===----------------------------------------------------------------------===//13 14#ifndef LLVM_CLANG_LIB_FORMAT_SORTJAVASCRIPTIMPORTS_H15#define LLVM_CLANG_LIB_FORMAT_SORTJAVASCRIPTIMPORTS_H16 17#include "clang/Format/Format.h"18 19namespace clang {20namespace format {21 22// Sort JavaScript ES6 imports/exports in ``Code``. The generated replacements23// only monotonically increase the length of the given code.24tooling::Replacements sortJavaScriptImports(const FormatStyle &Style,25                                            StringRef Code,26                                            ArrayRef<tooling::Range> Ranges,27                                            StringRef FileName);28 29} // end namespace format30} // end namespace clang31 32#endif33