On Sat Jun 1 09:47:08 2024 +0000, Rémi Bernon wrote:
I think something like `is_definition` is also more appropriate for
an object property. Same below.
I changed it, although it seems a bit awkward now given 6/6, since the
name reflects whether we should define the type when writing the header, not whether the type was defined when parsing (in contrast to the "defined" field of type_t). Hmm, okay, I don't know then. I find it awkward to store information about codegen action at parse time, on the data, and I think it should be rather only up to the codegen code to decide what to do depending on what the parsed data *is*. For this reason, I thought that `is_definition` was better describing the nature of the parsed information, rather than what we intend to do with it, and `is_defined` doesn't feel exactly right in this case (maybe better that `define`). Anyway, it probably doesn't matter much.
I agree in general. We could always propagate the "defined_in_import" field to statements and vars. I dunno if it's worth changing though.