Commit 2025-11-19 10:28 1d2373e8

View on Github →

feat(to_additive): allow referring to arguments by name (#31748) This PR modifies the (reorder := ...), (dont_translate := ...) and (relevant_arg := ...) syntax to allow referring to arguments by either the name, or the (1-indexed) position. We also add hover information to these arguments. The relevant_arg flag uses the hack that an out-of-bounds value means that there is no relevant argument. I didn't change the back-end, but I changed the syntax so that you have to write relevant_arg := _ to achieve this, which I think is clearer. Further work (not in this PR):

  • golf existing syntax with argument names.
  • This feature may be ported to other attributes like to_additive_ignore_args.

Estimated changes