forked from qt-creator/qt-creator
C++: Add utf16 indices to Macro and Document::MacroUse
In most cases we need to work with the utf16 indices. Only in cppfindreferences the byte interface is still needed since there we read in files and work on a QByteArray to save memory. Change-Id: I6ef6a93fc1875a8c9a305c075d51a9ca034c41bb Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
15
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
15
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
@@ -36,6 +36,21 @@ using namespace CPlusPlus;
|
||||
\sa Token
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn static void Lexer::yyinp_utf8(const char *¤tSourceChar, unsigned char &yychar, unsigned &utf16charCounter)
|
||||
|
||||
Process a single unicode code point in an UTF-8 encoded source.
|
||||
|
||||
\a currentSourceChar points to the UTF-8 encoded source.
|
||||
\a yychar must be the byte pointed to by \a currentSourceChar.
|
||||
|
||||
Points \a currentSourceChar to the byte of the next code point
|
||||
and modifies \a yychar to the value pointed by the updated
|
||||
\a currentSourceChar. \a utf16charCounter will be incremented by
|
||||
the number of UTF-16 code units that were needed for that code
|
||||
point.
|
||||
*/
|
||||
|
||||
Lexer::Lexer(TranslationUnit *unit)
|
||||
: _translationUnit(unit),
|
||||
_control(unit->control()),
|
||||
|
||||
Reference in New Issue
Block a user