fixed `switch` syntax for c++ and rust backends.