fredrikekre / Runic.jl

A code formatter for Julia with rules set in stone.
MIT License
103 stars 3 forks source link

Fix trailing comma in implicit tuples in destructuring #59

Closed fredrikekre closed 1 month ago

fredrikekre commented 1 month ago

This patch fixes the usage of trailing commas in implicit tuples when used in destructuring assignment, e.g. x, = z. In this context the trailing comma is needed to preserve the tuple node, which is different from e.g. implicit tuples in do-blocks. A trailing comma is allowed (e.g. preserved from the source) for multi-item implicit tuples so that e.g. x, y, = z can be used to signal that z contains more than two items. Closes #58.