Generalize DefaultPrettyPrinterVisitor#4717
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4717 +/- ##
===========================================
Coverage 58.303% 58.303%
Complexity 2512 2512
===========================================
Files 671 671
Lines 38761 38761
Branches 7031 7031
===========================================
Hits 22599 22599
Misses 13270 13270
Partials 2892 2892
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Thank you for this PR. It would be easier to merge the changes if you avoided mixing several subjects in a single PR. In fact, the preVisit/postVisit callbacks features has never been requested by the user community. So why should we include this type of evolution in the default implementation. You can integrate this using the composition pattern in your own visitor. |
Will do, creating two PRs for the first two commits then.
Hm, I'll try and see if I can easily implement this in my own code. |
This makes it much easier to override visitor methods
ab8fde2 to
cf32717
Compare
|
Dropped the first commit (now in PR #4718) and the third commit. |
|
Please create a new PR to integrate new modifications. This PR cannot be integrated in this state. |
Make the code in
DefaultPrettyPrinterVisitora bit easier to extend.protectedso that they can be used from overriding classes.preVisit/postVisitcallbacks that can be used to gather information when nodes are about to be printed, or have just been printed.