private static bool IsHoistedCommand(ICommand command)
{
if (command == null)
return false;
if (command is VarCommand)
return true;
if (command is ExpressionCommand && ((ExpressionCommand)command).Expression is FunctionExpression
&& ((FunctionExpression)((ExpressionCommand)command).Expression).Name != null)
return true;
return false;
}