mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-14 15:08:35 +00:00
Proposal p5434 specifies `-> val T`, `-> ref T`, and `-> var T` as return forms. `-> ref T` is parsed as a `RefPrimitiveForm`; extend that to parse a leading `val` or `var` after `->` as a `ValPrimitiveForm` or `VarPrimitiveForm`, reusing the nodes produced by `form(val T)` and `form(var T)`, and check them as forms. --------- Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com>