I'm working on a migration pass. Given code like this:
if let x = something,
let y = somethingElse
{ }
I want to remove the let y
line entirely, leaving me with just this:
if let x = something
{ }
Each item within the IfStmt
is a StmtConditionElement
, which has its own SourceRange
. That's working great. I can identify the source range of the let y = somethingElse
range. But is there a way to find my way back to the preceding comma, so that I can leave things in a constant state? I'm not finding anything on either IfStmt
or StmtConditionElement
that would indicate the location of the commas.