forked from qt-creator/qt-creator
C++: Clarify units of a Token
This will avoid confusion when later more length and indices methods are
added.
In Token:
length() --> bytes()
begin() --> bytesBegin()
end() --> bytesEnd()
Change-Id: I244c69b022e239ee762b4114559e707f93ff344f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
4
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
4
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
@@ -108,7 +108,7 @@ void Lexer::scan(Token *tok)
|
||||
{
|
||||
tok->reset();
|
||||
scan_helper(tok);
|
||||
tok->f.length = _currentChar - _tokenStart;
|
||||
tok->f.bytes = _currentChar - _tokenStart;
|
||||
}
|
||||
|
||||
void Lexer::scan_helper(Token *tok)
|
||||
@@ -141,7 +141,7 @@ void Lexer::scan_helper(Token *tok)
|
||||
tok->lineno = _currentLine;
|
||||
|
||||
_tokenStart = _currentChar;
|
||||
tok->offset = _currentChar - _firstChar;
|
||||
tok->byteOffset = _currentChar - _firstChar;
|
||||
|
||||
if (_yychar) {
|
||||
s._newlineExpected = false;
|
||||
|
||||
Reference in New Issue
Block a user