Open mimoo opened 2 years ago
perhaps I can also take a different approach for the const Field
argument of functions. Because it's not a field, perhaps I should have something like Int
or Number
instead. I think starting with that would be better.
Because the TyKind
is something created by the parser, who at this point might have no idea what the value is at runtime. Only the type checker knows
Let people use access fields directly if they have imported the lib? Actually should I forbid access fields in general?
To check if a list of booleans is true, I can simply add them up and check that they're not 0 (sum has an inverse)
To check if a TyKind::Field is a constant I can change the variant to TyKind::Field { constant: bool }