gumtree-spoon-ast-diff
gumtree-spoon-ast-diff copied to clipboard
How can I apply the diff actions on the left AST?
I wonder if I can reconstruct the left AST by adding the diff resulted operations and then rewrite the code to a file.
Hi @dareenkf I am not sure if I get your point. When you compute the diff, you have already the left and the right. So, there is no need to reconstruct any of those files. Did I misunderstood your point? Regards Matias
Hi @martinezmatias , I mean that I want to apply the operations to the left AST, and then pretty print the new AST to a file.
We haven't implement that feature yet. In any case, if you apply to file Left the operations from a diff obtained of comparing files Left and Right, then the result should be file Right, which you have it.
I know that, however, I plan to modify some of the operations before applying them to the left AST. Any way thanks for you reply! I'll try to figure out a way.
That's a feature we want to implement. If you want to try to implement it, it'd be nice, we can guide you :)
FYI @algomaster99 is working on this feature