My Project
Public Member Functions | List of all members
mlir::Lexer Class Reference

This class breaks up the current file into a token stream. More...

#include <Lexer.h>

Public Member Functions

 Lexer (const llvm::SourceMgr &sourceMgr, MLIRContext *context)
 
const llvm::SourceMgr & getSourceMgr ()
 
Token lexToken ()
 
Location getEncodedSourceLocation (llvm::SMLoc loc)
 
void resetPointer (const char *newPointer)
 
const char * getBufferBegin ()
 Returns the start of the buffer. More...
 

Detailed Description

This class breaks up the current file into a token stream.

Constructor & Destructor Documentation

◆ Lexer()

Lexer::Lexer ( const llvm::SourceMgr &  sourceMgr,
MLIRContext context 
)
explicit

Member Function Documentation

◆ getBufferBegin()

const char* mlir::Lexer::getBufferBegin ( )
inline

Returns the start of the buffer.

◆ getEncodedSourceLocation()

Location Lexer::getEncodedSourceLocation ( llvm::SMLoc  loc)

Encode the specified source location information into a Location object for attachment to the IR or error reporting.

Encode the specified source location information into an attribute for attachment to the IR.

◆ getSourceMgr()

const llvm::SourceMgr& mlir::Lexer::getSourceMgr ( )
inline

◆ lexToken()

Token Lexer::lexToken ( )

◆ resetPointer()

void mlir::Lexer::resetPointer ( const char *  newPointer)
inline

Change the position of the lexer cursor. The next token we lex will start at the designated point in the input.


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