Skip to content

Commit

Permalink
Use reflection to implement TreeDiffer.DiffVisitor.
Browse files Browse the repository at this point in the history
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.

RELNOTES=n/a
PiperOrigin-RevId: 492735035
  • Loading branch information
eamonnmcmanus authored and Compile-Testing Team committed Dec 4, 2022
1 parent 75b95ed commit d9f0c98
Show file tree
Hide file tree
Showing 4 changed files with 231 additions and 768 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ License
See the License for the specific language governing permissions and
limitations under the License.

[ci-shield]: https://github.com/google/compile-testing/actions/workflows/ci.yml/badge.svg?branch=master
[ci-shield]: https://github.com/google/compile-testing/actions/workflows/ci.yml/badge.svg?branch=main
[ci-link]: https://github.com/google/compile-testing/actions
[maven-shield]: https://img.shields.io/maven-central/v/com.google.testing.compile/compile-testing.png
[maven-link]: https://search.maven.org/artifact/com.google.testing.compile/compile-testing
Expand Down
Loading

0 comments on commit d9f0c98

Please sign in to comment.