Can I prevent expansion of \def at certain point by specifying some kind of command (akin to "return" keyword in a function) instead of using \if and \else?
\def\myTest%
{%
expand this
% do something to prevent further expansion (but not with \if, \else)
don't expand this
}
\def\myTest%
{%
expand this
% do something to prevent further expansion (but not with \if, \else)
don't expand this
}