LLVM  3.7.0
Public Member Functions | Protected Member Functions | List of all members
llvm::AsmLexer Class Reference

AsmLexer - Lexer class for assembly files. More...

#include <AsmLexer.h>

Inheritance diagram for llvm::AsmLexer:
[legend]
Collaboration diagram for llvm::AsmLexer:
[legend]

Public Member Functions

 AsmLexer (const MCAsmInfo &MAI)
 
 ~AsmLexer () override
 
void setBuffer (StringRef Buf, const char *ptr=nullptr)
 
StringRef LexUntilEndOfStatement () override
 
StringRef LexUntilEndOfLine ()
 
const AsmToken peekTok (bool ShouldSkipSpace=true) override
 Look ahead at the next token to be lexed. More...
 
bool isAtStartOfComment (const char *Ptr)
 
bool isAtStatementSeparator (const char *Ptr)
 
const MCAsmInfogetMAI () const
 
- Public Member Functions inherited from llvm::MCAsmLexer
virtual ~MCAsmLexer ()
 
const AsmTokenLex ()
 Consume the next token from the input stream and return it. More...
 
SMLoc getLoc () const
 Get the current source location. More...
 
const AsmTokengetTok () const
 Get the current (last) lexed token. More...
 
const SMLocgetErrLoc ()
 Get the current error location. More...
 
const std::string & getErr ()
 Get the current error string. More...
 
AsmToken::TokenKind getKind () const
 Get the kind of current token. More...
 
bool is (AsmToken::TokenKind K) const
 Check if the current token has kind K. More...
 
bool isNot (AsmToken::TokenKind K) const
 Check if the current token has kind K. More...
 
void setSkipSpace (bool val)
 Set whether spaces should be ignored by the lexer. More...
 
bool getAllowAtInIdentifier ()
 
void setAllowAtInIdentifier (bool v)
 

Protected Member Functions

AsmToken LexToken () override
 LexToken - Read the next token and return its code. More...
 
- Protected Member Functions inherited from llvm::MCAsmLexer
 MCAsmLexer ()
 
void SetError (const SMLoc &errLoc, const std::string &err)
 

Additional Inherited Members

- Protected Attributes inherited from llvm::MCAsmLexer
const char * TokStart
 
bool SkipSpace
 
bool AllowAtInIdentifier
 

Detailed Description

AsmLexer - Lexer class for assembly files.

Definition at line 27 of file AsmLexer.h.

Constructor & Destructor Documentation

AsmLexer::AsmLexer ( const MCAsmInfo MAI)
AsmLexer::~AsmLexer ( )
override

Definition at line 30 of file AsmLexer.cpp.

Member Function Documentation

const MCAsmInfo& llvm::AsmLexer::getMAI ( ) const
inline

Definition at line 55 of file AsmLexer.h.

bool AsmLexer::isAtStartOfComment ( const char *  Ptr)

Definition at line 461 of file AsmLexer.cpp.

References llvm::MCAsmInfo::getCommentString().

Referenced by LexToken(), and LexUntilEndOfStatement().

bool AsmLexer::isAtStatementSeparator ( const char *  Ptr)

Definition at line 474 of file AsmLexer.cpp.

References llvm::MCAsmInfo::getSeparatorString().

Referenced by LexToken(), and LexUntilEndOfStatement().

AsmToken AsmLexer::LexToken ( )
overrideprotectedvirtual
StringRef AsmLexer::LexUntilEndOfLine ( )

Definition at line 429 of file AsmLexer.cpp.

References llvm::StringRef::end(), and llvm::MCAsmLexer::TokStart.

StringRef AsmLexer::LexUntilEndOfStatement ( )
overridevirtual
const AsmToken AsmLexer::peekTok ( bool  ShouldSkipSpace = true)
overridevirtual
void AsmLexer::setBuffer ( StringRef  Buf,
const char *  ptr = nullptr 
)

Definition at line 33 of file AsmLexer.cpp.

References llvm::StringRef::begin(), and llvm::MCAsmLexer::TokStart.


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