forked from qt-creator/qt-creator
Introduced a backwards scanner for finding expression under cursor
The backwards scanner lazily tokenizes strings. This optimizes the common case where scanning one or two lines is enough while at the same time we extended the limit from 5 to 10 lines. Reviewed-by: Roberto Raggi
This commit is contained in:
@@ -41,6 +41,13 @@ class SimpleLexer;
|
||||
class CPLUSPLUS_EXPORT SimpleToken
|
||||
{
|
||||
public:
|
||||
SimpleToken(int kind, int position, int length, const QStringRef &text)
|
||||
: _kind(kind)
|
||||
, _position(position)
|
||||
, _length(length)
|
||||
, _text(text)
|
||||
{ }
|
||||
|
||||
SimpleToken()
|
||||
: _kind(0),
|
||||
_position(0),
|
||||
|
||||
Reference in New Issue
Block a user