diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-06-04 12:37:26 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-06-04 12:37:26 +0200 |
commit | 424b9724d6dc4f860cfb8da17d51a715684ad94c (patch) | |
tree | 921120642920dd72762ebeef6919181130ccf4f7 /src/libs/cplusplus/BackwardsScanner.h | |
parent | 5f749306f11dbfd31a6f740ab9b1cb108476e202 (diff) | |
download | qt-creator-424b9724d6dc4f860cfb8da17d51a715684ad94c.tar.gz |
Revert "Introduced a token cache for the C++ editor."
This reverts commit c2393df02332618c8cf6159d9d6f6a40041ced89.
Diffstat (limited to 'src/libs/cplusplus/BackwardsScanner.h')
-rw-r--r-- | src/libs/cplusplus/BackwardsScanner.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/cplusplus/BackwardsScanner.h b/src/libs/cplusplus/BackwardsScanner.h index 25b7bd3289..cca06db75c 100644 --- a/src/libs/cplusplus/BackwardsScanner.h +++ b/src/libs/cplusplus/BackwardsScanner.h @@ -36,18 +36,16 @@ namespace CPlusPlus { -class TokenCache; - class CPLUSPLUS_EXPORT BackwardsScanner { enum { MAX_BLOCK_COUNT = 10 }; public: - BackwardsScanner(TokenCache *cache, - const QTextCursor &cursor, - int maxBlockCount = MAX_BLOCK_COUNT, - const QString &suffix = QString()); + BackwardsScanner(const QTextCursor &cursor, + const QString &suffix = QString(), + int maxBlockCount = MAX_BLOCK_COUNT); + int state() const; int startToken() const; int startPosition() const; @@ -69,18 +67,20 @@ public: int startOfMatchingBrace(int index) const; int startOfBlock(int index) const; + static int previousBlockState(const QTextBlock &block); + int size() const; private: const SimpleToken &fetchToken(int tokenIndex); private: - TokenCache *_tokenCache; QList<SimpleToken> _tokens; int _offset; int _blocksTokenized; QTextBlock _block; QString _text; + SimpleLexer _tokenize; int _maxBlockCount; int _startToken; }; |