refactor emit `case`
add newline indent to emit `do`