mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-28 15:04:54 +01:00
Instead of traversing the entire pattern block looking for `VarPattern`s, we keep track of them on creation, and then build `VarStorage`s directly from that list. This also gets rid of the global `var_storage_map`, and instead keep that information narrowly scoped to each full-pattern, and consume it in a single linear traversal instead of with random-access lookups. To enable that, this fixes a parse bug where nested `var` patterns were getting diagnosed but not marked as errors.