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

Use reflection to implement TreeDiffer.DiffVisitor. #343

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Dec 4, 2022

Use reflection to implement TreeDiffer.DiffVisitor.

This is much more robust than overriding individual visitor methods.
It means we won't forget to check some property of an AST node,
and it also means we automatically handle new kinds of nodes.

Using reflection does make this potentially more expensive than having individual visitor methods. The overhead is likely to be small compared to the cost of compiling source code to produce the ASTs in the first place.

Fixes #303.

@copybara-service copybara-service bot force-pushed the test_main_492735035 branch 5 times, most recently from d9f0c98 to a4a82e1 Compare December 4, 2022 19:31
@copybara-service copybara-service bot closed this Dec 12, 2022
@copybara-service copybara-service bot deleted the test_main_492735035 branch December 12, 2022 19:20
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

Successfully merging this pull request may close these issues.

We probably don't handle recent Java features
0 participants