16#ifndef LLVM_CLANG_ASTMATCHERS_DYNAMIC_REGISTRY_H
17#define LLVM_CLANG_ASTMATCHERS_DYNAMIC_REGISTRY_H
21#include "llvm/ADT/ArrayRef.h"
22#include "llvm/ADT/StringRef.h"
29namespace ast_matchers {
120 static std::vector<MatcherCompletion>
Diagnostics class to manage error messages.
Helper class to manage error messages.
static std::vector< ArgKind > getAcceptedCompletionTypes(llvm::ArrayRef< std::pair< MatcherCtor, unsigned > > Context)
Compute the list of completion types for Context.
static bool isBuilderMatcher(MatcherCtor Ctor)
static ASTNodeKind nodeMatcherType(MatcherCtor)
static std::optional< MatcherCtor > lookupMatcherCtor(StringRef MatcherName)
Look up a matcher in the registry by name,.
static internal::MatcherDescriptorPtr buildMatcherCtor(MatcherCtor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error)
static std::vector< MatcherCompletion > getMatcherCompletions(ArrayRef< ArgKind > AcceptedTypes)
Compute the list of completions that match any of AcceptedTypes.
static VariantMatcher constructBoundMatcher(MatcherCtor Ctor, SourceRange NameRange, StringRef BindID, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry and bind it.
static VariantMatcher constructMatcher(MatcherCtor Ctor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error)
Construct a matcher from the registry.
A variant matcher object.
A smart (owning) pointer for MatcherDescriptor.
MatcherDescriptorPtr(const MatcherDescriptorPtr &)=delete
MatcherDescriptorPtr(MatcherDescriptorPtr &&)=default
MatcherDescriptor * get()
MatcherDescriptorPtr & operator=(MatcherDescriptorPtr &&)=default
MatcherDescriptorPtr & operator=(const MatcherDescriptorPtr &)=delete
Matcher descriptor interface.
The JSON file list parser is used to communicate input to InstallAPI.
@ Other
Other implicit parameter.
MatcherCompletion()=default
unsigned Specificity
Value corresponding to the "specificity" of the converted matcher.
bool operator==(const MatcherCompletion &Other) const
std::string TypedText
The text to type to select this matcher.
MatcherCompletion(StringRef TypedText, StringRef MatcherDecl, unsigned Specificity)
std::string MatcherDecl
The "declaration" of the matcher, with type information.