LLVM API Documentation
#include <MCAsmLexer.h>
Public Types | |
| enum | TokenKind { Eof, Error, Identifier, Register, String, Integer, EndOfStatement, Colon, Plus, Minus, Tilde, Slash, LParen, RParen, Star, Comma, Dollar, Equal, EqualEqual, Pipe, PipePipe, Caret, Amp, AmpAmp, Exclaim, ExclaimEqual, Percent, Less, LessEqual, LessLess, LessGreater, Greater, GreaterEqual, GreaterGreater } |
Public Member Functions | |
| AsmToken () | |
| AsmToken (TokenKind _Kind, const StringRef &_Str, int64_t _IntVal=0) | |
| TokenKind | getKind () const |
| bool | is (TokenKind K) const |
| bool | isNot (TokenKind K) const |
| SMLoc | getLoc () const |
| StringRef | getStringContents () const |
| getStringContents - Get the contents of a string token (without quotes). | |
| StringRef | getIdentifier () const |
| StringRef | getString () const |
| int64_t | getIntVal () const |
Public Attributes | |
| TokenKind | Kind |
| StringRef | Str |
| int64_t | IntVal |
Definition at line 23 of file MCAsmLexer.h.
Definition at line 24 of file MCAsmLexer.h.
| llvm::AsmToken::AsmToken | ( | ) | [inline] |
Definition at line 59 of file MCAsmLexer.h.
Definition at line 60 of file MCAsmLexer.h.
| TokenKind llvm::AsmToken::getKind | ( | ) | const [inline] |
Definition at line 63 of file MCAsmLexer.h.
References Kind.
Referenced by llvm::MCAsmLexer::getKind().
Definition at line 65 of file MCAsmLexer.h.
References Kind.
Referenced by llvm::MCAsmLexer::isNot().
| SMLoc AsmToken::getLoc | ( | ) | const |
Definition at line 21 of file MCAsmLexer.cpp.
References llvm::StringRef::data(), llvm::SMLoc::getFromPointer(), and Str.
| StringRef llvm::AsmToken::getStringContents | ( | ) | const [inline] |
getStringContents - Get the contents of a string token (without quotes).
Definition at line 70 of file MCAsmLexer.h.
References Kind, llvm::StringRef::size(), llvm::StringRef::slice(), Str, and String.
Referenced by getIdentifier().
| StringRef llvm::AsmToken::getIdentifier | ( | ) | const [inline] |
getIdentifier - Get the identifier string for the current token, which should be an identifier or a string. This gets the portion of the string which should be used as the identifier, e.g., it does not include the quotes on strings.
Definition at line 79 of file MCAsmLexer.h.
References getString(), getStringContents(), Identifier, and Kind.
| StringRef llvm::AsmToken::getString | ( | ) | const [inline] |
getString - Get the string for the current token, this includes all characters (for example, the quotes on strings) in the token.
The returned StringRef points into the source manager's memory buffer, and is safe to store across calls to Lex().
Definition at line 90 of file MCAsmLexer.h.
References Str.
Referenced by getIdentifier().
| int64_t llvm::AsmToken::getIntVal | ( | ) | const [inline] |
Definition at line 50 of file MCAsmLexer.h.
Referenced by getIdentifier(), getIntVal(), getKind(), getStringContents(), is(), and isNot().
A reference to the entire token contents; this is always a pointer into a memory buffer owned by the source manager.
Definition at line 54 of file MCAsmLexer.h.
Referenced by getLoc(), getString(), and getStringContents().
| int64_t llvm::AsmToken::IntVal |