All mental illnesses should have an impact on a trial. Does that mean they shouldn't in some way be held accountable for their actions? Of course not. All people should be held accountable in one way or another.
With that said, I have a son with Asperger's. He doesn't understand what people want. He doesn't understand tones or facial expressions. He often doesn't comprehend "No" to it's full extent. While he is very bright in some ways he is like a savant. He is brilliant if you are trying to break down something like a scientific theory, but tell the kid not to say mean things to his brother and he doesn't actually comprehend what mean is.
So when you say leniency, yes to an extent. Prisons do not really offer mental health services like many think. They throw pills at them. So a mental hospital would be the best bet.
It is a parent's responsibility to teach a child with Asperger's what not to do and how to comprehend basic emotions and expressions from others. Since I am a sexual abuse survivor I have actually spent some time explaining some basic meanings so that my son will understand what a female is implying. I have spent time explaining "No means no" even if it looks like a yes (the way he sees things). My son is almost 13. I hope I never have to deal with a sex crime when it comes to him, but if I did I think I would feel it was my fault.
A lot of people with Asperger's need very basic explanations even for things that seem like a no brainer to us.