- fix: Octal numeric escape sequences is not correctly syntax highlighted.

This commit is contained in:
Roy Qu 2023-04-01 16:50:55 +08:00
parent 68caa885bb
commit 63be630a16
2 changed files with 16 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Red Panda C++ Version 2.20
- fix: Projects created by some templates are not correct when editor's default encoding is not utf8.
- fix: File/Project visit histories are not correctly saved when clearing.
- change: Default max function frame size is 2MB under windows / 8MB others.
- fix: Octal numeric escape sequences is not correctly syntax highlighted.
Red Panda C++ Version 2.19

View File

@ -1177,7 +1177,13 @@ void CppSyntaxer::procStringEscapeSeq()
case '5':
case '6':
case '7':
mRun+=3;
for (int i=0;i<3;i++) {
if (mRun>=mLineSize ||
(mLine[mRun]<'0' || mLine[mRun]>'7')
)
break;
mRun+=1;
}
break;
case '8':
case '9':
@ -1194,6 +1200,14 @@ void CppSyntaxer::procStringEscapeSeq()
mRun+=1;
}
break;
case 'o':
mRun+=1;
while (mRun<mLineSize && (
(mLine[mRun]>='0' && mLine[mRun]<='7')
)) {
mRun+=1;
}
break;
case 'u':
mRun+=5;
break;