- fix: Hex float point literal is not correctly colored.

This commit is contained in:
Roy Qu 2023-03-03 18:11:06 +08:00
parent da3dda97e3
commit 989f1a892d
2 changed files with 5 additions and 7 deletions

View File

@ -19,6 +19,7 @@ Red Panda C++ Version 2.16
- enhancement: Switch current call stack frame in the CPU info dialog
- fix: Shouldn't try evaluate value of the selection in the cpu info dialog.
- enhancement: Show oct/bin/bin value in the memory view's tooltip.
- fix: Hex float point literal is not correctly colored.
Red Panda C++ Version 2.15

View File

@ -686,7 +686,7 @@ void CppSyntaxer::numberProc()
}
break;
case '.':
if (mTokenId != TokenId::Hex && mTokenId != TokenId::Octal) {
if (mTokenId != TokenId::Octal) {
mTokenId = TokenId::Float;
} else {
mTokenId = TokenId::Unknown;
@ -724,13 +724,10 @@ void CppSyntaxer::numberProc()
break;
case 'p':
case 'P':
if (mTokenId!=TokenId::Hex) {
mTokenId = TokenId::Float;
mTokenId = TokenId::Float;
mRun++;
if (mRun < mLineSize && (mLine[mRun]== '+' || mLine[mRun]== '-')) // number = float, but no exponent. an arithmetic operator
mRun++;
if (mRun < mLineSize && (mLine[mRun]== '+' || mLine[mRun]== '-')) // number = float, but no exponent. an arithmetic operator
mRun++;
break;
}
break;
default:
return;