Stream: t-compiler/rust-analyzer

Topic: Getting trailing comma

L.apz (May 20 2019 at 19:46, on Zulip):

Is their an easy way of getting the comma associated with a match arm. I'm working on merging match arms (#1250) and need to know how to do this

matklad (May 20 2019 at 19:49, on Zulip):

Not, comma is a sibling node of the match arm. non_trivia_sibling(arm.syntax(), direction::Right) should do the trick

L.apz (May 20 2019 at 20:04, on Zulip):


Last update: Jul 27 2021 at 22:00UTC