clang 22.0.0git
|
Sema implementation that uses the matcher registry to process the tokens. More...
#include "clang/ASTMatchers/Dynamic/Parser.h"
Public Member Functions | |
~RegistrySema () override | |
std::optional< MatcherCtor > | lookupMatcherCtor (StringRef MatcherName) override |
Look up a matcher by name. | |
VariantMatcher | actOnMatcherExpression (MatcherCtor Ctor, SourceRange NameRange, StringRef BindID, ArrayRef< ParserValue > Args, Diagnostics *Error) override |
Process a matcher expression. | |
std::vector< ArgKind > | getAcceptedCompletionTypes (llvm::ArrayRef< std::pair< MatcherCtor, unsigned > > Context) override |
Compute the list of completion types for Context . | |
bool | isBuilderMatcher (MatcherCtor Ctor) const override |
ASTNodeKind | nodeMatcherType (MatcherCtor) const override |
internal::MatcherDescriptorPtr | buildMatcherCtor (MatcherCtor, SourceRange NameRange, ArrayRef< ParserValue > Args, Diagnostics *Error) const override |
std::vector< MatcherCompletion > | getMatcherCompletions (llvm::ArrayRef< ArgKind > AcceptedTypes) override |
Compute the list of completions that match any of AcceptedTypes . | |
Public Member Functions inherited from clang::ast_matchers::dynamic::Parser::Sema | |
virtual | ~Sema () |
Sema implementation that uses the matcher registry to process the tokens.
|
overridedefault |
|
overridevirtual |
Process a matcher expression.
All the arguments passed here have already been processed.
Ctor | A matcher constructor looked up by lookupMatcherCtor. |
NameRange | The location of the name in the matcher source. Useful for error reporting. |
BindID | The ID to use to bind the matcher, or a null StringRef if no ID is specified. |
Args | The argument list for the matcher. |
Error
will contain a description of the error. Implements clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 843 of file Parser.cpp.
References actOnMatcherExpression(), clang::ast_matchers::dynamic::Registry::constructBoundMatcher(), and clang::ast_matchers::dynamic::Registry::constructMatcher().
Referenced by actOnMatcherExpression().
|
overridevirtual |
Implements clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 873 of file Parser.cpp.
References buildMatcherCtor(), and clang::ast_matchers::dynamic::Registry::buildMatcherCtor().
Referenced by buildMatcherCtor().
|
overridevirtual |
Compute the list of completion types for Context
.
Each element of Context
represents a matcher invocation, going from outermost to innermost. Elements are pairs consisting of a reference to the matcher constructor and the index of the next element in the argument list of that matcher (or for the last element, the index of the completion point in the argument list). An empty list requests completion for the root matcher.
Reimplemented from clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 854 of file Parser.cpp.
References getAcceptedCompletionTypes(), and clang::ast_matchers::dynamic::Registry::getAcceptedCompletionTypes().
Referenced by getAcceptedCompletionTypes().
|
overridevirtual |
Compute the list of completions that match any of AcceptedTypes
.
AcceptedTypes | All types accepted for this completion. |
lookupMatcherCtor()
. The matcher constructed from the return of lookupMatcherCtor()
should be convertible to some type in AcceptedTypes
. Reimplemented from clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 859 of file Parser.cpp.
References getMatcherCompletions(), and clang::ast_matchers::dynamic::Registry::getMatcherCompletions().
Referenced by getMatcherCompletions().
|
overridevirtual |
Implements clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 864 of file Parser.cpp.
References isBuilderMatcher(), and clang::ast_matchers::dynamic::Registry::isBuilderMatcher().
Referenced by isBuilderMatcher().
|
overridevirtual |
Look up a matcher by name.
MatcherName | The matcher name found by the parser. |
Implements clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 839 of file Parser.cpp.
References lookupMatcherCtor(), and clang::ast_matchers::dynamic::Registry::lookupMatcherCtor().
Referenced by lookupMatcherCtor().
|
overridevirtual |
Implements clang::ast_matchers::dynamic::Parser::Sema.
Definition at line 868 of file Parser.cpp.
References nodeMatcherType(), and clang::ast_matchers::dynamic::Registry::nodeMatcherType().
Referenced by nodeMatcherType().