Home | History | Annotate | Download | only in Dynamic

Lines Matching defs:Parser

1 //===--- Parser.cpp - Matcher expression parser -----*- C++ -*-===//
11 /// \brief Recursive parser implementation for the matcher expression grammar.
15 #include "clang/ASTMatchers/Dynamic/Parser.h"
27 /// \brief Simple structure to hold information for one token from the parser.
28 struct Parser::TokenInfo {
54 const char* const Parser::TokenInfo::ID_Bind = "bind";
56 /// \brief Simple tokenizer for the parser.
57 class Parser::CodeTokenizer {
259 Parser::Sema::~Sema() {}
261 VariantValue Parser::Sema::getNamedValue(StringRef Name) {
265 struct Parser::ScopedContextEntry {
266 Parser *P;
268 ScopedContextEntry(Parser *P, MatcherCtor C) : P(P) {
286 bool Parser::parseIdentifierPrefixImpl(VariantValue *Value) {
305 // Otherwise, fallback to the matcher parser.
316 bool Parser::parseMatcherExpressionImpl(const TokenInfo &NameToken,
430 void Parser::addCompletion(const TokenInfo &CompToken, StringRef TypedText,
439 void Parser::addExpressionCompletions() {
462 bool Parser::parseExpressionImpl(VariantValue *Value) {
497 Parser::Parser(CodeTokenizer *Tokenizer, Sema *S,
501 Parser::RegistrySema::~RegistrySema() {}
504 Parser::RegistrySema::lookupMatcherCtor(StringRef MatcherName) {
508 VariantMatcher Parser::RegistrySema::actOnMatcherExpression(
519 bool Parser::parseExpression(StringRef Code, VariantValue *Value,
525 bool Parser::parseExpression(StringRef Code, Sema *S,
528 if (!Parser(&Tokenizer, S, Error).parseExpressionImpl(Value)) return false;
538 Parser::completeExpression(StringRef Code, unsigned CompletionOffset) {
542 Parser P(&Tokenizer, &S, &Error);
550 Parser::parseMatcherExpression(StringRef Code, Diagnostics *Error) {
556 Parser::parseMatcherExpression(StringRef Code, Parser::Sema *S,