[cfe-commits] r38970 - in /cfe/cfe/trunk/include/clang/Lex: Lexer.h LexerToken.h
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:26:22 PDT 2007
Author: sabre
Date: Wed Jul 11 11:26:21 2007
New Revision: 38970
URL: http://llvm.org/viewvc/llvm-project?rev=38970&view=rev
Log:
Rename LexerToken methods to be more consistent
Modified:
cfe/cfe/trunk/include/clang/Lex/Lexer.h
cfe/cfe/trunk/include/clang/Lex/LexerToken.h
Modified: cfe/cfe/trunk/include/clang/Lex/Lexer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/Lexer.h?rev=38970&r1=38969&r2=38970&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/Lexer.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/Lexer.h Wed Jul 11 11:26:21 2007
@@ -124,12 +124,12 @@
/// the preprocessor.
void Lex(LexerToken &Result) {
// Start a new token.
- Result.StartToken();
+ Result.startToken();
// NOTE, any changes here should also change code after calls to
// Preprocessor::HandleDirective
if (IsAtStartOfLine) {
- Result.SetFlag(LexerToken::StartOfLine);
+ Result.setFlag(LexerToken::StartOfLine);
IsAtStartOfLine = false;
}
@@ -185,8 +185,8 @@
/// addition, since tokens cannot overlap, this also updates BufferPtr to be
/// TokEnd.
void FormTokenWithChars(LexerToken &Result, const char *TokEnd) {
- Result.SetLocation(getSourceLocation(BufferPtr));
- Result.SetLength(TokEnd-BufferPtr);
+ Result.setLocation(getSourceLocation(BufferPtr));
+ Result.setLength(TokEnd-BufferPtr);
BufferPtr = TokEnd;
}
Modified: cfe/cfe/trunk/include/clang/Lex/LexerToken.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Lex/LexerToken.h?rev=38970&r1=38969&r2=38970&view=diff
==============================================================================
--- cfe/cfe/trunk/include/clang/Lex/LexerToken.h (original)
+++ cfe/cfe/trunk/include/clang/Lex/LexerToken.h Wed Jul 11 11:26:21 2007
@@ -52,45 +52,45 @@
};
tok::TokenKind getKind() const { return Kind; }
- void SetKind(tok::TokenKind K) { Kind = K; }
+ void setKind(tok::TokenKind K) { Kind = K; }
/// getLocation - Return a source location identifier for the specified
/// offset in the current file.
SourceLocation getLocation() const { return Loc; }
unsigned getLength() const { return Length; }
- void SetLocation(SourceLocation L) { Loc = L; }
- void SetLength(unsigned Len) { Length = Len; }
+ void setLocation(SourceLocation L) { Loc = L; }
+ void setLength(unsigned Len) { Length = Len; }
- /// StartToken - Reset all flags to cleared.
+ /// startToken - Reset all flags to cleared.
///
- void StartToken() {
+ void startToken() {
Flags = 0;
IdentInfo = 0;
Loc = SourceLocation();
}
IdentifierInfo *getIdentifierInfo() const { return IdentInfo; }
- void SetIdentifierInfo(IdentifierInfo *II) {
+ void setIdentifierInfo(IdentifierInfo *II) {
IdentInfo = II;
}
- /// SetFlag - Set the specified flag.
- void SetFlag(TokenFlags Flag) {
+ /// setFlag - Set the specified flag.
+ void setFlag(TokenFlags Flag) {
Flags |= Flag;
}
- /// ClearFlag - Unset the specified flag.
- void ClearFlag(TokenFlags Flag) {
+ /// clearFlag - Unset the specified flag.
+ void clearFlag(TokenFlags Flag) {
Flags &= ~Flag;
}
- /// SetFlagValue - Set a flag to either true or false.
- void SetFlagValue(TokenFlags Flag, bool Val) {
+ /// setFlagValue - Set a flag to either true or false.
+ void setFlagValue(TokenFlags Flag, bool Val) {
if (Val)
- SetFlag(Flag);
+ setFlag(Flag);
else
- ClearFlag(Flag);
+ clearFlag(Flag);
}
/// isAtStartOfLine - Return true if this token is at the start of a line.
More information about the cfe-commits
mailing list