import makefile highlighter

This commit is contained in:
Roy Qu 2022-12-08 10:46:39 +08:00
parent b4e561cf83
commit 263cece0ce
2 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
Red Panda C++ Version 2.6
- enhancement: Highlighter for makefiles
- fix: QSortFilterProxyModel not correctly cleared when exiting and project closed. (ASSERT fails in DEBUG mode.)
Red Panda C++ Version 2.5

View File

@ -511,6 +511,12 @@ void MakefileHighlighter::next()
case '#':
procComment();
break;
case '-':
if (mState == RangeState::Command)
procSymbol();
else
procIdentifier();
break;
default:
if (mLine[mRun]>='0' && mLine[mRun]<='9') {
procNumber();
@ -606,6 +612,10 @@ void MakefileHighlighter::next()
if (mLine[mRun+1]=='=') {
mRun++;
procAssignment();
} else if (mLine[mRun+1]==':') {
mRun+=2;
mTokenID = TokenId::Target;
mState = RangeState::Prequisitions;
} else {
mRun++;
mTokenID = TokenId::Target;