mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Avoid using a large switch that needs to be manually extended when adding a new kind of instruction. Instead, the expression category for an instruction is now specified when defining the `InstKind`. In passing, add a distinct expression category value for patterns. This isn't used for much except some error checking at the moment, but it keeps the number of instructions that we need to manually classify as `NotExpr` despite having a type very low.