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.
Started working on v2 changes, and making a PR just to communicate interest in working on it. If someone else is already on it, feel free to close this PR.
Below is the contents of https://github.com/kdl-org/kdl/blob/main/CHANGELOG.md organized to show the relevant changes that need to be made:
general
node \<EOF>
is now a legal KDL document.;
, even if the closing}
is on the same line, so this is now a legal node:node{foo;bar;baz}
(foo)
annotations (so,( foo )
would be legal (( f oo )
would not be, since it has two identifiers))(blah) node (thing) 1 y= (who) 2
)=
for props (x = 1
).1
,+.1
etc are no longer valid identifiers, to prevent confusion and conflicts with numbers.u128
andi128
have been added as well-known number type annotations.128-bit integer type annotations have been added to the list of "well-known" type annotations.(duplicate)/- kdl-version 2
(or1
) as the first line in a document, optionally preceded by the BOM.node-space*
fornode
andfinal-node
have been moved intobase-node
.keywords
null
,true
, andfalse
are now#null
,#true
, and#false
. Using the unprefixed versions of these values is a syntax error.#inf
,#-inf
, and#nan
have been added in order to properly support IEEE floats for implementations that choose to represent their decimals that way.inf
,-inf
, andnan
are now syntax errors.comments
node-space
is now allowed as whitespace after aslashdash
, meaning line continuations will work now./-
) -compatible locations adjusted to be more clear and intuitive. They can now be used in exactly three different places: before nodes, before entire entries, or before entire child blocks.Slashdash ((duplicate)/-
)-compatible locations and related grammar adjusted to be more clear and intuitive. This includes some changes relating to whitespace, including comments and newlines, which are breaking changes.string characters
/
) is no longer an escaped character.U+0020
) can now be written into quoted strings with the\s
escape.(duplicate)\s
is now a valid escape within a string, representing a space character.Single line comments ((seems to already have been the case in//
) can now be immediately followed by a newline.knuffel
)\
in a string is now discarded.U+000B
) are now considered to be newlines.,
,<
, and>
are now legal identifier characters. They were previously reserved for KQL but this is no longer necessary.#
is no longer a legal identifier character.Equals signs other than(seems to already have been the case in=
are no longer supported in properties.knuffel
)code points
0x20
(except newline and whitespace code points), code points above0x10FFFF
, Delete control character (0x7F
), and the unicode "direction control" characters are now completely banned from appearing literally in KDL documents. They can now only be represented in regular strings, and there's no facilities to represent them in raw strings. This should be considered a security improvement.\u{}
). All KDL documents and string values should be valid UTF-8 now, as was intended.raw strings
r
prefix: they are now specified by using#""#
.(duplicate)raw-string
productions have been updated to be explicitly non-greedy and "fallible".#"""#
, which are now properly treated as invalid multi-line raw strings (instead of the equivalent of"\""
).multiline
LF
s."""
as delimeters. The opening delimiter must be immediately followed by a newline, and the closing delimiter must be on its own line, prefixed by optional whitespace."""
instead of a single"
. Using"""
for a single-line string is a syntax error.not relevant
unicode_silly
test case._fail
suffix in all test cases which are expected to fail.