work save

This commit is contained in:
royqh1979@gmail.com 2021-10-02 14:54:49 +08:00
parent 237e86cea0
commit 22341d11fa
3 changed files with 12 additions and 2 deletions

View File

@ -616,8 +616,9 @@ void CppTokenizer::advance()
bool CppTokenizer::isLetterChar(const QChar &ch) bool CppTokenizer::isLetterChar(const QChar &ch)
{ {
return (ch>= 'A' && ch<='Z') // return (ch>= 'A' && ch<='Z')
|| (ch>='a' && ch<='z') // || (ch>='a' && ch<='z')
return ch.isLetter()
|| ch == '_' || ch == '_'
|| ch == '*' || ch == '*'
|| ch == '&' || ch == '&'

View File

@ -1589,3 +1589,8 @@ SynRangeState SynEditCppHighlighter::getRangeState() const
{ {
return mRange; return mRange;
} }
bool SynEditCppHighlighter::isIdentChar(const QChar &ch) const
{
return ch=='_' || ch.isDigit() || ch.isLetter();
}

View File

@ -186,6 +186,10 @@ public:
// SynHighlighter interface // SynHighlighter interface
public: public:
SynRangeState getRangeState() const override; SynRangeState getRangeState() const override;
// SynHighlighter interface
public:
bool isIdentChar(const QChar &ch) const override;
}; };
#endif // SYNEDITCPPHIGHLIGHTER_H #endif // SYNEDITCPPHIGHLIGHTER_H