Annotations on match key elements come after the key element, while in all other cases, it seems that the annotations come before the object they annotate (e.g. struct fields).
Is there a reason for this?
Yes, it is due to the bison grammar.
Putting them in front makes the grammar ambiguous, since the annotation has an optional list of expressions, which could be interpreted as the key expression.
Annotations on match key elements come after the key element, while in all other cases, it seems that the annotations come before the object they annotate (e.g. struct fields). Is there a reason for this?