clang 20.0.0git
|
#include "clang/Tooling/Transformer/Parsing.h"
#include "clang/AST/Expr.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Transformer/RangeSelector.h"
#include "clang/Tooling/Transformer/SourceCode.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include <optional>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
Functions | |
static const llvm::StringMap< RangeSelectorOp< std::string > > & | getUnaryStringSelectors () |
static const llvm::StringMap< RangeSelectorOp< RangeSelector > > & | getUnaryRangeSelectors () |
static const llvm::StringMap< RangeSelectorOp< std::string, std::string > > & | getBinaryStringSelectors () |
static const llvm::StringMap< RangeSelectorOp< RangeSelector, RangeSelector > > & | getBinaryRangeSelectors () |
template<typename Element > | |
std::optional< Element > | findOptional (const llvm::StringMap< Element > &Map, llvm::StringRef Key) |
template<typename ResultType > | |
ParseProgress< ResultType > | makeParseProgress (ParseState State, ResultType Result) |
static llvm::Error | makeParseError (const ParseState &S, std::string ErrorMsg) |
static ParseState | advance (ParseState S, size_t N) |
static StringRef | consumeWhitespace (StringRef S) |
static ExpectedProgress< std::nullopt_t > | parseChar (char c, ParseState State) |
static ExpectedProgress< std::string > | parseId (ParseState State) |
static ExpectedProgress< std::string > | parseStringId (ParseState State) |
template<typename T > | |
ExpectedProgress< RangeSelector > | parseSingle (ParseFunction< T > ParseElement, RangeSelectorOp< T > Op, ParseState State) |
template<typename T > | |
ExpectedProgress< RangeSelector > | parsePair (ParseFunction< T > ParseElement, RangeSelectorOp< T, T > Op, ParseState State) |
static ExpectedProgress< RangeSelector > | parseRangeSelectorImpl (ParseState State) |
|
static |
Definition at line 144 of file Parsing.cpp.
Referenced by TokenCollector::Builder::build(), parseChar(), parseId(), and parseStringId().
|
static |
Definition at line 149 of file Parsing.cpp.
References c, clang::isASCII(), and clang::isWhitespace().
Referenced by parseChar(), parseId(), clang::transformer::parseRangeSelector(), and parseStringId().
std::optional< Element > findOptional | ( | const llvm::StringMap< Element > & | Map, |
llvm::StringRef | Key | ||
) |
Definition at line 123 of file Parsing.cpp.
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 116 of file Parsing.cpp.
References clang::transformer::between(), and clang::transformer::enclose().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 109 of file Parsing.cpp.
References clang::transformer::encloseNodes().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 102 of file Parsing.cpp.
References clang::transformer::after(), clang::transformer::before(), and clang::transformer::expansion().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 88 of file Parsing.cpp.
References clang::transformer::callArgs(), clang::transformer::elseBranch(), clang::transformer::initListElements(), clang::transformer::member(), clang::transformer::name(), clang::transformer::node(), clang::transformer::statement(), and clang::transformer::statements().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 137 of file Parsing.cpp.
Referenced by parseChar(), parseId(), clang::transformer::parseRangeSelector(), parseRangeSelectorImpl(), and parseStringId().
ParseProgress< ResultType > makeParseProgress | ( | ParseState | State, |
ResultType | Result | ||
) |
Definition at line 132 of file Parsing.cpp.
Referenced by parseChar(), parseId(), parsePair(), parseSingle(), and parseStringId().
|
static |
Definition at line 155 of file Parsing.cpp.
References advance(), c, consumeWhitespace(), makeParseError(), and makeParseProgress().
Referenced by parsePair(), and parseSingle().
|
static |
Definition at line 164 of file Parsing.cpp.
References advance(), c, consumeWhitespace(), Id, clang::isASCII(), clang::isAsciiIdentifierContinue(), makeParseError(), and makeParseProgress().
Referenced by parseRangeSelectorImpl().
ExpectedProgress< RangeSelector > parsePair | ( | ParseFunction< T > | ParseElement, |
RangeSelectorOp< T, T > | Op, | ||
ParseState | State | ||
) |
Definition at line 215 of file Parsing.cpp.
References makeParseProgress(), P, and parseChar().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 246 of file Parsing.cpp.
References findOptional(), getBinaryRangeSelectors(), getBinaryStringSelectors(), getUnaryRangeSelectors(), getUnaryStringSelectors(), Id, makeParseError(), parseId(), parsePair(), parseRangeSelectorImpl(), parseSingle(), and parseStringId().
Referenced by clang::transformer::parseRangeSelector(), and parseRangeSelectorImpl().
ExpectedProgress< RangeSelector > parseSingle | ( | ParseFunction< T > | ParseElement, |
RangeSelectorOp< T > | Op, | ||
ParseState | State | ||
) |
Definition at line 194 of file Parsing.cpp.
References E, makeParseProgress(), P, and parseChar().
Referenced by parseRangeSelectorImpl().
|
static |
Definition at line 175 of file Parsing.cpp.
References advance(), c, consumeWhitespace(), Id, makeParseError(), and makeParseProgress().
Referenced by parseRangeSelectorImpl().