-
Notifications
You must be signed in to change notification settings - Fork 8
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
[fix] Introduce intermediate virtual nodes for select concrete nodes #133
Conversation
Codecov Report
@@ Coverage Diff @@
## master #133 +/- ##
============================================
+ Coverage 80.11% 80.37% +0.26%
- Complexity 443 471 +28
============================================
Files 36 36
Lines 1624 1717 +93
Branches 243 260 +17
============================================
+ Hits 1301 1380 +79
- Misses 209 217 +8
- Partials 114 120 +6
Continue to review full report at Codecov.
|
The PR fails the file merge benchmark as, for some reason, the changes cause previously implicit type parameters to become explicit. This does not seem to be too much of a problem in practice, I don't think it affects anything other than textual accuracy. |
I think the deteriorated score is related to virtual nodes that do not have children not getting the leaf child list as described in #116 |
Fix #132
This PR introduces virtual nodes to create a layer of indirection between certain complex nodes and their child lists. This is necessary where nodes have varying amounts of certain types of children, and these children are adjacent in the "flat" representation, as otherwise there may be conflicts across syntactical boundaries.
Only a select few nodes are "exploded" with virtual nodes. Currently, it is only subtypes of
CtType
,CtExecutable
andCtExecutableReference
. To add a new type, simply add it to the list inNodeFactory.EXPLODED_TYPES
.