-
Notifications
You must be signed in to change notification settings - Fork 441
Introduce FixIt.Change
API that replaces the child of a syntax node
#2205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'd like to have a go at this if it's okay! |
@mininny it now yours :D |
@ahoppen, I wanted to tackle this issue but apparently there's no way to make |
You should be able to always use
|
What could be the use cases for |
One use case (that I ran into recently) is adding a return type to a function declaration that doesn’t have one. Or potentially appending/removing a parameter. |
Currently, Fix-Its are only able to replace syntax nodes but that makes it impossible to replace a
nil
node by a proper syntax node.We should offer a
FixIt.Change
that replaces the child of a syntax node, with a signature that’s something like this (written in GitHub, not sure if it compiles, but it gets the idea across).FixItApplier
will need to be updated to also handle this new change kindrdar://115562892
The text was updated successfully, but these errors were encountered: