Matcher expression parser.
More...
#include "clang/ASTMatchers/Dynamic/Parser.h"
|
static std::optional< DynTypedMatcher > | parseMatcherExpression (StringRef &MatcherCode, Sema *S, const NamedValueMap *NamedValues, Diagnostics *Error) |
| Parse a matcher expression. More...
|
|
static std::optional< DynTypedMatcher > | parseMatcherExpression (StringRef &MatcherCode, Sema *S, Diagnostics *Error) |
|
static std::optional< DynTypedMatcher > | parseMatcherExpression (StringRef &MatcherCode, Diagnostics *Error) |
|
static bool | parseExpression (StringRef &Code, Sema *S, const NamedValueMap *NamedValues, VariantValue *Value, Diagnostics *Error) |
| Parse an expression. More...
|
|
static bool | parseExpression (StringRef &Code, Sema *S, VariantValue *Value, Diagnostics *Error) |
|
static bool | parseExpression (StringRef &Code, VariantValue *Value, Diagnostics *Error) |
|
static std::vector< MatcherCompletion > | completeExpression (StringRef &Code, unsigned CompletionOffset, Sema *S, const NamedValueMap *NamedValues) |
| Complete an expression at the given offset. More...
|
|
static std::vector< MatcherCompletion > | completeExpression (StringRef &Code, unsigned CompletionOffset, Sema *S) |
|
static std::vector< MatcherCompletion > | completeExpression (StringRef &Code, unsigned CompletionOffset) |
|
Matcher expression parser.
Definition at line 55 of file Parser.h.
◆ NamedValueMap
◆ completeExpression() [1/3]
static std::vector<MatcherCompletion> clang::ast_matchers::dynamic::Parser::completeExpression |
( |
StringRef & |
Code, |
|
|
unsigned |
CompletionOffset |
|
) |
| |
|
inlinestatic |
◆ completeExpression() [2/3]
static std::vector<MatcherCompletion> clang::ast_matchers::dynamic::Parser::completeExpression |
( |
StringRef & |
Code, |
|
|
unsigned |
CompletionOffset, |
|
|
Sema * |
S |
|
) |
| |
|
inlinestatic |
◆ completeExpression() [3/3]
Complete an expression at the given offset.
- Parameters
-
S | The Sema instance that will help the parser construct the matchers. If null, it uses the default registry. |
NamedValues | A map of precomputed named values. This provides the dictionary for the <NamedValue> rule of the grammar. If null, it is ignored. |
- Returns
- The list of completions, which may be empty if there are no available completions or if an error occurred.
Definition at line 886 of file Parser.cpp.
Referenced by completeExpression().
◆ parseExpression() [1/3]
Parse an expression.
Parses any expression supported by this parser. In general, the parseMatcherExpression
function is a better approach to get a matcher object.
- Parameters
-
S | The Sema instance that will help the parser construct the matchers. If null, it uses the default registry. |
NamedValues | A map of precomputed named values. This provides the dictionary for the <NamedValue> rule of the grammar. If null, it is ignored. |
Definition at line 870 of file Parser.cpp.
Referenced by parseExpression().
◆ parseExpression() [2/3]
◆ parseExpression() [3/3]
◆ parseMatcherExpression() [1/3]
static std::optional<DynTypedMatcher> clang::ast_matchers::dynamic::Parser::parseMatcherExpression |
( |
StringRef & |
MatcherCode, |
|
|
Diagnostics * |
Error |
|
) |
| |
|
inlinestatic |
◆ parseMatcherExpression() [2/3]
std::optional< DynTypedMatcher > clang::ast_matchers::dynamic::Parser::parseMatcherExpression |
( |
StringRef & |
MatcherCode, |
|
|
Sema * |
S, |
|
|
const NamedValueMap * |
NamedValues, |
|
|
Diagnostics * |
Error |
|
) |
| |
|
static |
Parse a matcher expression.
- Parameters
-
MatcherCode | The matcher expression to parse. |
S | The Sema instance that will help the parser construct the matchers. If null, it uses the default registry. |
NamedValues | A map of precomputed named values. This provides the dictionary for the <NamedValue> rule of the grammar. If null, it is ignored. |
- Returns
- The matcher object constructed by the processor, or an empty Optional if an error occurred. In that case,
Error
will contain a description of the error. The caller takes ownership of the DynTypedMatcher object returned.
Definition at line 906 of file Parser.cpp.
Referenced by parseMatcherExpression().
◆ parseMatcherExpression() [3/3]
static std::optional<DynTypedMatcher> clang::ast_matchers::dynamic::Parser::parseMatcherExpression |
( |
StringRef & |
MatcherCode, |
|
|
Sema * |
S, |
|
|
Diagnostics * |
Error |
|
) |
| |
|
inlinestatic |
The documentation for this class was generated from the following files: