The author has probably never written a compiler before.
Inside any compiler, you are going to have “type keys” and switch statements all over the place.
Even if you are writing a compiler in languages with builtin “tagged unions” and “pattern matching” you are still using “type keys” and switch statements.
Trying to write a compiler without a switch statement would lead to a giant unreadable mess.