Idea For Fixing #168#169
Draft
abdelkadouss wants to merge 2 commits into
Draft
Conversation
yet), impl for document nodes node
Member
|
Is this authored by an LLM? |
Author
If u mean the code, NOPE AT ALL. the PR message yes becuse i have an english issue. |
Author
|
I've spent half the day on this |
Member
|
Just checking! Thank you. I wanted to make sure the anti-LLM |
Author
|
@zkat What u think?, did u acsepte the idea?, r u gonna insha'Allah impl the new parser this way?. |
Member
|
I'm not entirely sure how this approach would really work? v1 and v2 are very different in a lot of ways, parser-wise. I don't think you'll find much benefit in just parameterizing the KdlVersion like this... |
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.
PR summary
You mentioned in #168 that you're going to rewrite/refactor the v1 parser in this lib directly instead of depending on an older version of kdl. I think this is going to be a big effort and make significant overhead. What I'd recommend instead is to have only one parser that supports both v1 and v2. This will, insha'Allah, remove a big chunk of code and then it's going to be easier to maintain and develop, insha'Allah. And it's easier to implement in the first place. All you have to do is just add some code in the
parser_v2parse functions to do things differently for v1. For example, forkeywords, I've made an example for that in this PR. Make sure to check all theNOTE(mantainer)andTODO(mantainer)comments in the code.Progress
Note about the PR state and purpose
This is not a fix; this is just a starting point. I just want to give you an idea of how you can fix this issue, not fix it myself. This PR is not mergeable as-is, and I'm not saying to complete it (though you can if you find it useful). But you can get the idea and then make your own PR (or just overwrite this one).