Closed sbillig closed 12 months ago
@Y-Nak I added the enum record variant fields to the scope graph, in the way that we decided wasn't very elegant 🙃. This seemed nicer than adding a lookup from ScopeId(u32)
to ScopeKind
Great!
I feel
comma
should be required for an enum definition as well if it is required for a struct definition. I want to hear your opinion.
I agree; I'll make this change separately.
v2 parser and HIR now allow record-type enum variants.
Struct (and record enum variant) fields must now be separated by a comma (newlines are allowed but not required). This allows a struct with multiple fields to be defined on a single line, eg
struct S { x: u8, y: u8 }
.Nit-picky feedback welcome.