forked from qt-creator/qt-creator
		
	Introduced token caching to prevent repetetive tokenizing.
Also removed TokenUnderCursor as it's functionality is in the token cache. Reviewed-by: ckamm
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user