LLVM API Documentation
#include <MCAsmLexer.h>
Public Member Functions | |
virtual | ~MCAsmLexer () |
const AsmToken & | Lex () |
virtual StringRef | LexUntilEndOfStatement ()=0 |
SMLoc | getLoc () const |
getLoc - Get the current source location. More... | |
const AsmToken & | getTok () |
getTok - Get the current (last) lexed token. More... | |
const SMLoc & | getErrLoc () |
getErrLoc - Get the current error location More... | |
const std::string & | getErr () |
getErr - Get the current error string More... | |
AsmToken::TokenKind | getKind () const |
getKind - Get the kind of current token. More... | |
bool | is (AsmToken::TokenKind K) const |
is - Check if the current token has kind K . More... | |
bool | isNot (AsmToken::TokenKind K) const |
isNot - Check if the current token has kind K . More... | |
void | setSkipSpace (bool val) |
setSkipSpace - Set whether spaces should be ignored by the lexer More... | |
Protected Member Functions | |
MCAsmLexer () | |
virtual AsmToken | LexToken ()=0 |
void | SetError (const SMLoc &errLoc, const std::string &err) |
Protected Attributes | |
const char * | TokStart |
bool | SkipSpace |
MCAsmLexer - Generic assembler lexer interface, for use by target specific assembly lexers.
Definition at line 108 of file MCAsmLexer.h.
|
protected |
Definition at line 15 of file MCAsmLexer.cpp.
|
virtual |
Definition at line 19 of file MCAsmLexer.cpp.
|
inline |
getErr - Get the current error string
Definition at line 158 of file MCAsmLexer.h.
|
inline |
getErrLoc - Get the current error location
Definition at line 153 of file MCAsmLexer.h.
|
inline |
getKind - Get the kind of current token.
Definition at line 163 of file MCAsmLexer.h.
References llvm::AsmToken::getKind().
SMLoc MCAsmLexer::getLoc | ( | ) | const |
getLoc - Get the current source location.
Definition at line 22 of file MCAsmLexer.cpp.
References llvm::SMLoc::getFromPointer(), and TokStart.
|
inline |
getTok - Get the current (last) lexed token.
Definition at line 148 of file MCAsmLexer.h.
Referenced by llvm::MCAsmParser::getTok().
|
inline |
is - Check if the current token has kind K
.
Definition at line 166 of file MCAsmLexer.h.
References llvm::AsmToken::is().
|
inline |
isNot - Check if the current token has kind K
.
Definition at line 169 of file MCAsmLexer.h.
References llvm::AsmToken::isNot().
|
inline |
Lex - Consume the next token from the input stream and return it.
The lexer will continuosly return the end-of-file token once the end of the main input file has been reached.
Definition at line 138 of file MCAsmLexer.h.
References LexToken().
|
protectedpure virtual |
Implemented in llvm::AsmLexer.
Referenced by Lex().
|
pure virtual |
Implemented in llvm::AsmLexer.
|
inlineprotected |
Definition at line 126 of file MCAsmLexer.h.
|
inline |
setSkipSpace - Set whether spaces should be ignored by the lexer
Definition at line 172 of file MCAsmLexer.h.
References SkipSpace.
|
protected |
Definition at line 120 of file MCAsmLexer.h.
Referenced by llvm::AsmLexer::LexToken(), and setSkipSpace().
|
protected |
Definition at line 119 of file MCAsmLexer.h.
Referenced by getLoc(), llvm::AsmLexer::LexToken(), llvm::AsmLexer::LexUntilEndOfLine(), llvm::AsmLexer::LexUntilEndOfStatement(), and llvm::AsmLexer::setBuffer().