Fix line directive over consumption
This commit is contained in:
parent
3da58bf1ca
commit
6e6e3b2adb
|
@ -600,6 +600,7 @@ void Scanner::NextPreToken(void)
|
||||||
}
|
}
|
||||||
else if (mToken == TK_PREP_LINE)
|
else if (mToken == TK_PREP_LINE)
|
||||||
{
|
{
|
||||||
|
mPreprocessorMode = true;
|
||||||
NextPreToken();
|
NextPreToken();
|
||||||
int l = mLocation.mLine;
|
int l = mLocation.mLine;
|
||||||
int64 v = PrepParseConditional();
|
int64 v = PrepParseConditional();
|
||||||
|
@ -608,7 +609,8 @@ void Scanner::NextPreToken(void)
|
||||||
strcpy_s(mPreprocessor->mSource->mLocationFileName, mTokenString);
|
strcpy_s(mPreprocessor->mSource->mLocationFileName, mTokenString);
|
||||||
NextRawToken();
|
NextRawToken();
|
||||||
}
|
}
|
||||||
mPreprocessor->mLocation.mLine = v + mLocation.mLine - l - 1;
|
mPreprocessor->mLocation.mLine = int(v) + mLocation.mLine - l;
|
||||||
|
mPreprocessorMode = false;
|
||||||
}
|
}
|
||||||
else if (mToken == TK_PREP_FOR)
|
else if (mToken == TK_PREP_FOR)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue