Rows like this are problematic. Direct types expand exponentially with more and more levels of internal types.
Instead we need to take type cases like this and make them indirect. This could be automatic, or an annotation, but it needs to be relatively easy and at least have a lint step to identify them.
type AST = Typedef { location: SourceLocation, lhs-type: Type, implies: Vector<Type>, implements: Vector<Type>,
size: Type, alias: Type, opaque-alias: Type, cases: Vector<(CString,Vector<(CString,Type)>)>,
misc-type: Type, implied-phi: Type };
This makes the AST type become hundreds of bytes per instance no matter whether or not it is actually a Typedef.
Rows like this are problematic. Direct types expand exponentially with more and more levels of internal types.
Instead we need to take type cases like this and make them indirect. This could be automatic, or an annotation, but it needs to be relatively easy and at least have a lint step to identify them.
This makes the AST type become hundreds of bytes per instance no matter whether or not it is actually a Typedef.