Skip to content
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

How can I apply the diff actions on the left AST? #146

Open
dareenkf opened this issue Mar 4, 2021 · 6 comments
Open

How can I apply the diff actions on the left AST? #146

dareenkf opened this issue Mar 4, 2021 · 6 comments

Comments

@dareenkf
Copy link

dareenkf commented Mar 4, 2021

I wonder if I can reconstruct the left AST by adding the diff resulted operations and then rewrite the code to a file.

@martinezmatias
Copy link
Contributor

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

@dareenkf
Copy link
Author

dareenkf commented Mar 4, 2021

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.

@martinezmatias
Copy link
Contributor

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.

@dareenkf
Copy link
Author

dareenkf commented Mar 4, 2021

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.

@martinezmatias
Copy link
Contributor

That's a feature we want to implement.
If you want to try to implement it, it'd be nice, we can guide you :)

@monperrus
Copy link
Contributor

FYI @algomaster99 is working on this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants