Closed mcpiroman closed 2 years ago
Thanks, @mcpiroman!
Thank you for the quick fix!
Could it also be more feasible and easy to use to extract the now common parametrization expressions from NUMERIC_DATATYPE, CHARACTER_DATATYPE and CUSTOM_DATATYPE to another rules, like NUMERIC_DATATYPE_CONSTRAINTS and CHARACTER_DATATYPE_CONSTRAINTS, or would backward-compatibility concerns not allow that?
I'm asking because I'm likely to report and PR more issues of this kind and would like to know how to go about that.
Could it also be more feasible and easy to use to extract the now common parametrization expressions from NUMERIC_DATATYPE, CHARACTER_DATATYPE and CUSTOM_DATATYPE to another rules, like NUMERIC_DATATYPE_CONSTRAINTS and CHARACTER_DATATYPE_CONSTRAINTS, or would backward-compatibility concerns not allow that?
You're right, I agree with you. I should've added a common rule instead of duplicating the code, I just changed it:
Regarding backward-compatibility, tbh I'm more concerned with removing nodes from the AST than adding new nodes.
Parser throws on this valid code:
The reason is that parametrization is defined only for concrete type kinds like NUMERIC_DATATYPE or CHARACTER_DATATYPE, but in this case
a
is CUSTOM_DATATYPE.