|
clang
5.0.0
|
Matcher expression parser. More...
#include "clang/ASTMatchers/Dynamic/Parser.h"
Classes | |
| class | CodeTokenizer |
| Simple tokenizer for the parser. More... | |
| class | RegistrySema |
| Sema implementation that uses the matcher registry to process the tokens. More... | |
| struct | ScopedContextEntry |
| class | Sema |
| Interface to connect the parser with the registry and more. More... | |
| struct | TokenInfo |
| Simple structure to hold information for one token from the parser. More... | |
Public Types | |
| typedef llvm::StringMap < VariantValue > | NamedValueMap |
Static Public Member Functions | |
| static llvm::Optional < DynTypedMatcher > | parseMatcherExpression (StringRef MatcherCode, Sema *S, const NamedValueMap *NamedValues, Diagnostics *Error) |
| Parse a matcher expression. More... | |
| static llvm::Optional < DynTypedMatcher > | parseMatcherExpression (StringRef MatcherCode, Sema *S, Diagnostics *Error) |
| static llvm::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) |
| typedef llvm::StringMap<VariantValue> clang::ast_matchers::dynamic::Parser::NamedValueMap |
|
static |
Complete an expression at the given offset.
| 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 604 of file Parser.cpp.
References P, clang::ast_matchers::dynamic::MatcherCompletion::Specificity, and clang::ast_matchers::dynamic::MatcherCompletion::TypedText.
Referenced by completeExpression().
|
inlinestatic |
Definition at line 216 of file Parser.h.
References completeExpression().
|
inlinestatic |
Definition at line 220 of file Parser.h.
References completeExpression().
|
static |
Parse an expression.
Parses any expression supported by this parser. In general, the parseMatcherExpression function is a better approach to get a matcher object.
| 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 589 of file Parser.cpp.
References clang::ast_matchers::dynamic::Diagnostics::addError(), clang::ast_matchers::dynamic::Diagnostics::ET_ParserTrailingCode, clang::ast_matchers::dynamic::Parser::TokenInfo::Kind, clang::ast_matchers::dynamic::Parser::CodeTokenizer::peekNextToken(), and clang::ast_matchers::dynamic::Parser::TokenInfo::Range.
Referenced by parseExpression().
|
inlinestatic |
Definition at line 192 of file Parser.h.
References parseExpression().
|
inlinestatic |
Definition at line 196 of file Parser.h.
References parseExpression().
|
static |
Parse a matcher expression.
| 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. |
Error will contain a description of the error. The caller takes ownership of the DynTypedMatcher object returned. Definition at line 624 of file Parser.cpp.
References clang::ast_matchers::dynamic::Diagnostics::addError(), clang::ast_matchers::dynamic::Diagnostics::ET_ParserNotAMatcher, clang::ast_matchers::dynamic::Diagnostics::ET_ParserOverloadedType, clang::ast_matchers::dynamic::VariantValue::getMatcher(), clang::ast_matchers::dynamic::VariantMatcher::getSingleMatcher(), clang::ast_matchers::dynamic::VariantValue::getTypeAsString(), and clang::ast_matchers::dynamic::VariantValue::isMatcher().
Referenced by parseMatcherExpression().
|
inlinestatic |
Definition at line 168 of file Parser.h.
References parseMatcherExpression().
|
inlinestatic |
Definition at line 173 of file Parser.h.
References parseMatcherExpression().
1.8.6