mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-19 18:10:14 +00:00
Don't repeat name in comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221664 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8201185d61
commit
3959002c51
@ -18,7 +18,7 @@
|
||||
|
||||
namespace llvm {
|
||||
|
||||
/// AsmToken - Target independent representation for an assembler token.
|
||||
/// Target independent representation for an assembler token.
|
||||
class AsmToken {
|
||||
public:
|
||||
enum TokenKind {
|
||||
@ -76,24 +76,24 @@ public:
|
||||
SMLoc getEndLoc() const;
|
||||
SMRange getLocRange() const;
|
||||
|
||||
/// getStringContents - Get the contents of a string token (without quotes).
|
||||
/// Get the contents of a string token (without quotes).
|
||||
StringRef getStringContents() const {
|
||||
assert(Kind == String && "This token isn't a string!");
|
||||
return Str.slice(1, Str.size() - 1);
|
||||
}
|
||||
|
||||
/// 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.
|
||||
/// 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.
|
||||
StringRef getIdentifier() const {
|
||||
if (Kind == Identifier)
|
||||
return getString();
|
||||
return getStringContents();
|
||||
}
|
||||
|
||||
/// getString - Get the string for the current token, this includes all
|
||||
/// characters (for example, the quotes on strings) in the token.
|
||||
/// 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().
|
||||
@ -114,8 +114,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/// MCAsmLexer - Generic assembler lexer interface, for use by target specific
|
||||
/// assembly lexers.
|
||||
/// Generic assembler lexer interface, for use by target specific assembly
|
||||
/// lexers.
|
||||
class MCAsmLexer {
|
||||
/// The current token, stored in the base class for faster access.
|
||||
AsmToken CurTok;
|
||||
@ -143,7 +143,7 @@ protected: // Can only create subclasses.
|
||||
public:
|
||||
virtual ~MCAsmLexer();
|
||||
|
||||
/// Lex - Consume the next token from the input stream and return it.
|
||||
/// 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.
|
||||
@ -153,37 +153,37 @@ public:
|
||||
|
||||
virtual StringRef LexUntilEndOfStatement() = 0;
|
||||
|
||||
/// getLoc - Get the current source location.
|
||||
/// Get the current source location.
|
||||
SMLoc getLoc() const;
|
||||
|
||||
/// getTok - Get the current (last) lexed token.
|
||||
/// Get the current (last) lexed token.
|
||||
const AsmToken &getTok() {
|
||||
return CurTok;
|
||||
}
|
||||
|
||||
/// peekTok - Look ahead at the next token to be lexed.
|
||||
/// Look ahead at the next token to be lexed.
|
||||
virtual const AsmToken peekTok(bool ShouldSkipSpace = true) = 0;
|
||||
|
||||
/// getErrLoc - Get the current error location
|
||||
/// Get the current error location
|
||||
const SMLoc &getErrLoc() {
|
||||
return ErrLoc;
|
||||
}
|
||||
|
||||
/// getErr - Get the current error string
|
||||
/// Get the current error string
|
||||
const std::string &getErr() {
|
||||
return Err;
|
||||
}
|
||||
|
||||
/// getKind - Get the kind of current token.
|
||||
/// Get the kind of current token.
|
||||
AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
|
||||
|
||||
/// is - Check if the current token has kind \p K.
|
||||
/// Check if the current token has kind \p K.
|
||||
bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
|
||||
|
||||
/// isNot - Check if the current token has kind \p K.
|
||||
/// Check if the current token has kind \p K.
|
||||
bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
|
||||
|
||||
/// setSkipSpace - Set whether spaces should be ignored by the lexer
|
||||
/// Set whether spaces should be ignored by the lexer
|
||||
void setSkipSpace(bool val) { SkipSpace = val; }
|
||||
|
||||
bool getAllowAtInIdentifier() { return AllowAtInIdentifier; }
|
||||
|
Loading…
Reference in New Issue
Block a user