clang  14.0.0git
Parsing.h
Go to the documentation of this file.
1 //===--- Parsing.h - Parsing library for Transformer ------------*- 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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// Defines parsing functions for Transformer types.
11 /// FIXME: Currently, only supports `RangeSelectors` but parsers for other
12 /// Transformer types are under development.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_CLANG_TOOLING_REFACTOR_PARSING_H_
17 #define LLVM_CLANG_TOOLING_REFACTOR_PARSING_H_
18 
22 #include "llvm/Support/Error.h"
23 #include <functional>
24 
25 namespace clang {
26 namespace transformer {
27 
28 /// Parses a string representation of a \c RangeSelector. The grammar of these
29 /// strings is closely based on the (sub)grammar of \c RangeSelectors as they'd
30 /// appear in C++ code. However, this language constrains the set of permissible
31 /// strings (for node ids) -- it does not support escapes in the
32 /// string. Additionally, the \c charRange combinator is not supported, because
33 /// there is no representation of values of type \c CharSourceRange in this
34 /// (little) language.
36 
37 } // namespace transformer
38 } // namespace clang
39 
40 #endif // LLVM_CLANG_TOOLING_REFACTOR_PARSING_H_
RangeSelector.h
llvm::Expected
Definition: LLVM.h:41
ASTMatchFinder.h
clang::transformer::parseRangeSelector
llvm::Expected< RangeSelector > parseRangeSelector(llvm::StringRef Input)
Parses a string representation of a RangeSelector.
Definition: Parsing.cpp:268
SourceLocation.h
clang
Definition: CalledOnceCheck.h:17