fix AST for case statement

the expression inside the switch statement was being added to
the end of the AST instead of to the beginning