feat(compliance): update to latest 2.0 spec (#103)

This commit is contained in:
Kat Marchán 2024-12-19 12:54:42 -08:00 committed by GitHub
parent d0366db21f
commit 4734b0601b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 62 additions and 2 deletions

View File

@ -1,7 +1,7 @@
//! `kdl` is a "document-oriented" parser and API for the [KDL Document
//! Language](https://kdl.dev), a node-based, human-friendly configuration and
//! serialization format.
//!
//!
//! Unlike serde-based implementations, this crate preserves formatting when
//! editing, as well as when inserting or changing values with custom
//! formatting. This is most useful when working with human-maintained KDL

View File

@ -866,7 +866,7 @@ fn badval_ty_char(input: &mut Input<'_>) -> PResult<()> {
/// `line-space := newline | ws | single-line-comment`
fn line_space(input: &mut Input<'_>) -> PResult<()> {
alt((newline, ws, single_line_comment)).parse_next(input)
alt((node_space, newline, single_line_comment)).parse_next(input)
}
/// `node-space := ws* escline ws* | ws+`

View File

@ -0,0 +1 @@
node "12"

View File

@ -0,0 +1,2 @@
node
node

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
node

View File

@ -0,0 +1,2 @@
a
b

View File

@ -0,0 +1,4 @@
parent {
child
child
}

View File

@ -0,0 +1 @@
(type)node

View File

@ -0,0 +1 @@
node

View File

@ -0,0 +1 @@
node "a\\ b\na\\b"

View File

@ -0,0 +1 @@
node "\"\"\""

View File

@ -0,0 +1 @@
node " a"

View File

@ -0,0 +1,4 @@
node "1\
2"

View File

@ -0,0 +1,2 @@
node; \
node

View File

@ -0,0 +1 @@
\

View File

@ -0,0 +1,3 @@
\
node

View File

@ -0,0 +1,3 @@
a \
b

View File

@ -0,0 +1,5 @@
parent {
child
\ // comment
child
}

View File

@ -1,2 +1,3 @@
node1
\
node2

View File

@ -0,0 +1,2 @@
\
(type)node

View File

@ -0,0 +1,4 @@
node
\
/-
node

View File

@ -0,0 +1,4 @@
node """
a\\ b
a\\\ b
"""

View File

@ -0,0 +1,3 @@
node """
\"""
"""

View File

@ -0,0 +1,4 @@
node """
a
\
"""

View File

@ -0,0 +1,4 @@
node """
a
\
"""

View File

@ -0,0 +1,4 @@
node """
\s escaped prefix
literal prefix
"""