Open
Description
The name of a C struct/union is only allowed to be a single token like S
or U
. However, a C enum is unexpectedly allowed to be a path like ::E
or E1::E2
. This is because the parse_enum_def
method is reused when parsing a lib
. A likely simple fix would be to add a parameter to parse_enum_def
on whether the name should be a const token or a path node
lib L
struct S
i : Int32
end
union U
i : Int32
end
enum ::E
A
end
enum E1::E2
B
end
end
p L::S
p L::U
p E::A
p L::E1::E2::B