Tom Swifty

A Tom Swifty (or Tom Swiftie) is a phrase in which a quoted sentence is linked by a pun to the manner in which it is attributed. Tom Swifties may be considered a type of wellerism. The standard syntax is for the quoted sentence to be first, followed by the pun (usually a description of the act of speaking):

"If you want me, I shall be in the attic," said Tom, loftily.

The hypothetical speaker is usually, by convention, called "Tom" (or "he" or "she").