You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, ApplyCodeAction deletes the very node that the CodeAction specifies, but this is not sound enough.
Given
Module[{a, b=2(* b is unused *)}, a]
The symbol b is marked, but in fact, we want to remove b = 2. So I think a code action can be populated up until it reaches the node that can actually fix the problem. Moreover, the trailing comment seems easy to be removed if we treat it as the same as the trailing comma, but it will still be convenient to provide an additional list of nodes that can be removed as well.
I know that CodeParser`CodeAction` is not ready yet, so I am just sharing the idea.
The text was updated successfully, but these errors were encountered:
Currently,
ApplyCodeAction
deletes the very node that theCodeAction
specifies, but this is not sound enough.Given
The symbol
b
is marked, but in fact, we want to removeb = 2
. So I think a code action can be populated up until it reaches the node that can actually fix the problem. Moreover, the trailing comment seems easy to be removed if we treat it as the same as the trailing comma, but it will still be convenient to provide an additional list of nodes that can be removed as well.I know that
CodeParser`CodeAction`
is not ready yet, so I am just sharing the idea.The text was updated successfully, but these errors were encountered: