fix: char literal not correctly syntax parsed.

This commit is contained in:
Roy Qu 2024-03-06 18:21:47 +08:00
parent 498bc556e2
commit eff6beba0a
1 changed files with 2 additions and 3 deletions

View File

@ -403,7 +403,8 @@ void CppSyntaxer::procAsciiChar()
while (mRun < mLineSize) {
if (mLine[mRun] =='\'') {
mRun++;
break;
mRange.state = RangeState::rsUnknown;
return;
} if (mLine[mRun] == '\\') {
if (mRun+1>=mLineSize) {
mRun++;
@ -417,8 +418,6 @@ void CppSyntaxer::procAsciiChar()
}
mRun+=1;
}
if (mRun<mLineSize)
mRange.state = RangeState::rsUnknown;
}
void CppSyntaxer::procBraceClose()