10 #ifndef LLVM_MC_MCPARSER_MCASMLEXER_H
11 #define LLVM_MC_MCPARSER_MCASMLEXER_H
15 #include "llvm/Support/DataTypes.h"
65 : Kind(_Kind), Str(_Str), IntVal(_IntVal) {}
76 assert(Kind ==
String &&
"This token isn't a string!");
101 assert(Kind ==
Integer &&
"This token isn't an integer!");
size_t size() const
size - Get the string size.
TokenKind getKind() const
void setSkipSpace(bool val)
setSkipSpace - Set whether spaces should be ignored by the lexer
virtual AsmToken LexToken()=0
StringRef getString() const
bool isNot(TokenKind K) const
SMLoc getLoc() const
getLoc - Get the current source location.
const AsmToken & getTok()
getTok - Get the current (last) lexed token.
AsmToken::TokenKind getKind() const
getKind - Get the kind of current token.
AsmToken - Target independent representation for an assembler token.
bool isNot(AsmToken::TokenKind K) const
isNot - Check if the current token has kind K.
int64_t getIntVal() const
AsmToken(TokenKind _Kind, StringRef _Str, int64_t _IntVal=0)
StringRef getStringContents() const
getStringContents - Get the contents of a string token (without quotes).
const std::string & getErr()
getErr - Get the current error string
bool is(AsmToken::TokenKind K) const
is - Check if the current token has kind K.
virtual StringRef LexUntilEndOfStatement()=0
const SMLoc & getErrLoc()
getErrLoc - Get the current error location
bool is(TokenKind K) const
#define LLVM_DELETED_FUNCTION
StringRef getIdentifier() const
void SetError(const SMLoc &errLoc, const std::string &err)
StringRef slice(size_t Start, size_t End) const
Represents a location in source code.