[fix] Introduce intermediate virtual nodes for select concrete nodes#133
Merged
[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.
|
Collaborator
Author
|
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. |
Collaborator
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,CtExecutableandCtExecutableReference. To add a new type, simply add it to the list inNodeFactory.EXPLODED_TYPES.