Describe your changes
The SourceUtil::getRangeForStatement method was not working properly when called on function macro calls that were themselves arguments to another macro. The reason was that we were using a function that always got the first token of the macro expansion, which was the macro name, instead of the full range.
For example, when the function would return only the source range of INNER instead of INNER(1) in
return OUTER(INNER(1));
This change also significantly simplifies the SourceUtil::isPartialMacro function, which was suffering from the same issue.
ENG2STAAR-2680
Describe your changes The
SourceUtil::getRangeForStatement
method was not working properly when called on function macro calls that were themselves arguments to another macro. The reason was that we were using a function that always got the first token of the macro expansion, which was the macro name, instead of the full range.For example, when the function would return only the source range of
INNER
instead ofINNER(1)
inThis change also significantly simplifies the
SourceUtil::isPartialMacro
function, which was suffering from the same issue.Testing performed Added unit tests