What does Masquerade do when you have no cards in hand, library or discard?
Out of interest, how did you reach the position of having zero cards in hand, library and discard?

Anyway, the answer is fairly simple, I think.  Consider the following section of the rules, qualifying the action of "draw 5 cards from your deck":


  If there still aren't enough cards to draw/reveal, he just
  draws/reveals what he can.


It seems clear that Dominion follows the same rules philosophy as, for instance, Magic the Gathering: if you cannot fully carry out an action, carry out as much of it as you can.

First, you try to draw 2 cards.  You can't, so instead you draw 0 cards.

Next, you try to pass a card left.  You can't, so you don't, though you probably do receive a card from your right.

Next, assuming that you were passed a card, you have the option to trash it.

Simple enough!