AST: Refactor _more_ code out of giant switch statement

This is all pretty mindless refactoring, but suffice to say that vim
already refuses to jump between opening and closing braces of the
function that contains said switch statement.