13 #ifndef MLIR_LIB_PARSER_LEXER_H 14 #define MLIR_LIB_PARSER_LEXER_H 45 return Token(kind, StringRef(tokStart, curPtr - tokStart));
48 Token emitError(
const char *loc,
const Twine &message);
51 Token lexAtIdentifier(
const char *tokStart);
52 Token lexBareIdentifierOrKeyword(
const char *tokStart);
53 Token lexEllipsis(
const char *tokStart);
54 Token lexNumber(
const char *tokStart);
55 Token lexPrefixedIdentifier(
const char *tokStart);
56 Token lexString(
const char *tokStart);
61 const llvm::SourceMgr &sourceMgr;
68 void operator=(
const Lexer &) =
delete;
73 #endif // MLIR_LIB_PARSER_LEXER_H Definition: InferTypeOpInterface.cpp:20
const char * getBufferBegin()
Returns the start of the buffer.
Definition: Lexer.h:40
Lexer(const llvm::SourceMgr &sourceMgr, MLIRContext *context)
Definition: Lexer.cpp:30
Definition: Location.h:52
Token lexToken()
Definition: Lexer.cpp:56
Kind
Definition: Token.h:21
void resetPointer(const char *newPointer)
Definition: Lexer.h:37
const llvm::SourceMgr & getSourceMgr()
Definition: Lexer.h:27
Location getEncodedSourceLocation(llvm::SMLoc loc)
Definition: Lexer.cpp:39
Definition: MLIRContext.h:34
This class breaks up the current file into a token stream.
Definition: Lexer.h:23
This represents a token in the MLIR syntax.
Definition: Token.h:19