Proposal: strict ordering of PtrTypeStart and ArrayTypeStart qualifiers #2992
Labels
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
The pointer and array types can be qualified with
align
,const
,volatile
andallowzero
.In the current grammar they are specified as any amount and no specific ordering. The reality is that they can only occur once.
Having relaxed ordering gives no particular benefit to the language and can potentially confuse users into believing the order carries meaning.
Parsing can also be performed more efficiently with strict ordering.
I propose that we fix the order changing them into the following:
EDIT: Moved KEYWORD_allowzero? first to be consistent with zig fmt
The text was updated successfully, but these errors were encountered: