Add switch statements to javascript grammar
Trim trailing whitespace