MLIR  20.0.0git
Classes | Public Types | Static Public Member Functions | List of all members
mlir::query::matcher::internal::Parser Class Reference

#include "Query/Matcher/Parser.h"

Classes

class  CodeTokenizer
 
class  RegistrySema
 
struct  ScopedContextEntry
 
class  Sema
 
struct  TokenInfo
 

Public Types

enum class  TokenKind {
  Eof , NewLine , OpenParen , CloseParen ,
  Comma , Period , Literal , Ident ,
  InvalidChar , CodeCompletion , Error
}
 
using NamedValueMap = llvm::StringMap< VariantValue >
 

Static Public Member Functions

static std::optional< DynMatcherparseMatcherExpression (llvm::StringRef &matcherCode, const Registry &matcherRegistry, const NamedValueMap *namedValues, Diagnostics *error)
 
static std::optional< DynMatcherparseMatcherExpression (llvm::StringRef &matcherCode, const Registry &matcherRegistry, Diagnostics *error)
 
static bool parseExpression (llvm::StringRef &code, const Registry &matcherRegistry, const NamedValueMap *namedValues, VariantValue *value, Diagnostics *error)
 
static bool parseExpression (llvm::StringRef &code, const Registry &matcherRegistry, VariantValue *value, Diagnostics *error)
 
static std::vector< MatcherCompletioncompleteExpression (llvm::StringRef &code, unsigned completionOffset, const Registry &matcherRegistry, const NamedValueMap *namedValues)
 
static std::vector< MatcherCompletioncompleteExpression (llvm::StringRef &code, unsigned completionOffset, const Registry &matcherRegistry)
 

Detailed Description

Definition at line 41 of file Parser.h.

Member Typedef Documentation

◆ NamedValueMap

Definition at line 111 of file Parser.h.

Member Enumeration Documentation

◆ TokenKind

Enumerator
Eof 
NewLine 
OpenParen 
CloseParen 
Comma 
Period 
Literal 
Ident 
InvalidChar 
CodeCompletion 
Error 

Definition at line 44 of file Parser.h.

Member Function Documentation

◆ completeExpression() [1/2]

static std::vector<MatcherCompletion> mlir::query::matcher::internal::Parser::completeExpression ( llvm::StringRef &  code,
unsigned  completionOffset,
const Registry matcherRegistry 
)
inlinestatic

Definition at line 143 of file Parser.h.

References completeExpression().

◆ completeExpression() [2/2]

std::vector< MatcherCompletion > mlir::query::matcher::internal::Parser::completeExpression ( llvm::StringRef &  code,
unsigned  completionOffset,
const Registry matcherRegistry,
const NamedValueMap namedValues 
)
static

Definition at line 564 of file Parser.cpp.

Referenced by completeExpression().

◆ parseExpression() [1/2]

bool mlir::query::matcher::internal::Parser::parseExpression ( llvm::StringRef &  code,
const Registry matcherRegistry,
const NamedValueMap namedValues,
VariantValue value,
Diagnostics error 
)
static

◆ parseExpression() [2/2]

static bool mlir::query::matcher::internal::Parser::parseExpression ( llvm::StringRef &  code,
const Registry matcherRegistry,
VariantValue value,
Diagnostics error 
)
inlinestatic

Definition at line 131 of file Parser.h.

References parseExpression().

◆ parseMatcherExpression() [1/2]

std::optional< DynMatcher > mlir::query::matcher::internal::Parser::parseMatcherExpression ( llvm::StringRef &  matcherCode,
const Registry matcherRegistry,
const NamedValueMap namedValues,
Diagnostics error 
)
static

◆ parseMatcherExpression() [2/2]

static std::optional<DynMatcher> mlir::query::matcher::internal::Parser::parseMatcherExpression ( llvm::StringRef &  matcherCode,
const Registry matcherRegistry,
Diagnostics error 
)
inlinestatic

Definition at line 120 of file Parser.h.

References parseMatcherExpression().


The documentation for this class was generated from the following files: