10 #ifndef LLVM_MC_MCPARSER_MCASMLEXER_H 11 #define LLVM_MC_MCPARSER_MCASMLEXER_H 49 const char *TokStart =
nullptr;
50 bool SkipSpace =
true;
52 bool IsAtStartOfStatement =
true;
53 bool LexMasmIntegers =
false;
85 return CurTok.
front();
89 IsAtStartOfStatement =
false;
95 virtual StringRef LexUntilEndOfStatement() = 0;
110 size_t ReadCount = peekTokens(Buf, ShouldSkipSpace);
120 bool ShouldSkipSpace =
true) = 0;
148 this->CommentConsumer = CommentConsumer;
158 #endif // LLVM_MC_MCPARSER_MCASMLEXER_H const AsmToken & getTok() const
Get the current (last) lexed token.
This class represents lattice values for constants.
void setSkipSpace(bool val)
Set whether spaces should be ignored by the lexer.
bool is(AsmToken::TokenKind K) const
Check if the current token has kind K.
Generic assembler lexer interface, for use by target specific assembly lexers.
Target independent representation for an assembler token.
void setLexMasmIntegers(bool V)
Set whether to lex masm-style binary and hex literals.
void SetError(SMLoc errLoc, const std::string &err)
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
const std::string & getErr()
Get the current error string.
const AsmToken peekTok(bool ShouldSkipSpace=true)
Look ahead at the next token to be lexed.
bool getAllowAtInIdentifier()
iterator erase(const_iterator CI)
void setCommentConsumer(AsmCommentConsumer *CommentConsumer)
AsmToken::TokenKind getKind() const
Get the kind of current token.
void UnLex(AsmToken const &Token)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
const AsmToken & Lex()
Consume the next token from the input stream and return it.
iterator insert(iterator I, T &&Elt)
LLVM_NODISCARD bool empty() const
bool isNot(AsmToken::TokenKind K) const
Check if the current token has kind K.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SMLoc getErrLoc()
Get the current error location.
StringRef - Represent a constant reference to a string, i.e.
Represents a location in source code.
bool isAtStartOfStatement()
void setAllowAtInIdentifier(bool v)