mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Better case expression parsing, better enum errors
This commit is contained in:
parent
ce8899f1a7
commit
322b83d1c6
3 changed files with 25 additions and 10 deletions
|
@ -1124,15 +1124,16 @@ bool BfPassInstance::WantsRangeRecorded(BfSourceData* bfSource, int srcIdx, int
|
|||
if (bfSource == NULL)
|
||||
return true;
|
||||
|
||||
if (!mErrors.IsEmpty())
|
||||
{
|
||||
// If the last error had a range that was a subset of this one, then just keep the first error
|
||||
// This helps reduce cascading errors to their root cause
|
||||
auto lastError = mErrors.back();
|
||||
if ((lastError->mSource == bfSource) && (isWarning == lastError->mIsWarning) && (isDeferred == lastError->mIsDeferred) &&
|
||||
(lastError->mSrcStart >= srcIdx) && (lastError->mSrcEnd <= srcIdx + srcLen))
|
||||
return false;
|
||||
}
|
||||
//TODO: Was this useful, or does 'var' resolution do this better?
|
||||
// if (!mErrors.IsEmpty())
|
||||
// {
|
||||
// // If the last error had a range that was a subset of this one, then just keep the first error
|
||||
// // This helps reduce cascading errors to their root cause
|
||||
// auto lastError = mErrors.back();
|
||||
// if ((lastError->mSource == bfSource) && (isWarning == lastError->mIsWarning) && (isDeferred == lastError->mIsDeferred) &&
|
||||
// (lastError->mSrcStart >= srcIdx) && (lastError->mSrcEnd <= srcIdx + srcLen))
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// Don't record errors that have already occurred at this location
|
||||
BfErrorBase checkError;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue