Issue number of the reported bug or feature request: ENG2STAAR-3302
Describe your changes
Added the SourceUtil::expandRangeIfValid function, that is essentially a combination of SourceUtil::expandRange and SourceUtil::isPartialMacro. That is, the new function will find the most expanded version of a range while being careful about partial macro expansions. This allows one to retrieve the source for this range without worrying about it containing extra tokens or even being split between two locations.
Issue number of the reported bug or feature request: ENG2STAAR-3302
Describe your changes Added the
SourceUtil::expandRangeIfValid
function, that is essentially a combination ofSourceUtil::expandRange
andSourceUtil::isPartialMacro
. That is, the new function will find the most expanded version of a range while being careful about partial macro expansions. This allows one to retrieve the source for this range without worrying about it containing extra tokens or even being split between two locations.Testing performed Added new test file.