Add KDL v2 syntax support while preserving existing KDL v1 compatibility#18
Open
tassis wants to merge 3 commits into
Open
Add KDL v2 syntax support while preserving existing KDL v1 compatibility#18tassis wants to merge 3 commits into
tassis wants to merge 3 commits into
Conversation
f02626f to
2a12271
Compare
1fd04a0 to
a4f036a
Compare
ccb8ebb to
43c3f09
Compare
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.
Add permissive KDL v2 syntax support while preserving existing KDL v1 editor compatibility.
This grammar is intended for editor/tooling use-cases and should not be treated as a strict KDL version validator.
Changes
Added KDL v2 boolean and null literals:
#true#false#nullAdded KDL v2 keyword-like numeric literals:
#inf#-inf#nanRelaxed spacing in a few places commonly used by KDL v2, including:
=Added support for KDL v2 multiline strings
Added support for KDL v2 raw strings such as:
#"value"###"value"##while keeping KDL v1 raw strings such as:
r#"value"#It may successfully parse documents that mix KDL v1 and KDL v2 literal forms.
Notes
This PR used AI assistance for parts of the work, including Unicode-related rewrites, test case generation, and discussions around how to implement KDL v2 specification details.