Introduced a token cache for the C++ editor.

This should speed things up a bit, because before, the line was tokenized at
least 3 times.
This commit is contained in:
Erik Verbruggen
2010-06-04 09:36:05 +02:00
parent 414d9fe3e0
commit c2393df023
23 changed files with 244 additions and 86 deletions

View File

@@ -35,11 +35,12 @@
namespace CPlusPlus {
class BackwardsScanner;
class TokenCache;
class CPLUSPLUS_EXPORT MatchingText
{
public:
MatchingText();
MatchingText(TokenCache *tokenCache);
static bool shouldInsertMatchingText(const QTextCursor &tc);
static bool shouldInsertMatchingText(const QChar &lookAhead);
@@ -50,6 +51,8 @@ public:
private:
bool shouldInsertNewline(const QTextCursor &tc) const;
TokenCache *_tokenCache;
};
} // end of namespace CPlusPlus