Rust parser for KDL
Go to file
Lily Ballard 45ed92fdac
Add tests for the example KDL files (#1)
* Add From impls for KdlNodeValue

Most clients probably don't need to create these directly, but we may as
well make it easy for them.

* Add TryFrom impls to convert from KdlNodeValue to underlying types

This includes converting from borrowed values, which will produce `&str`
instead of `String`.

* Add test for parsing examples/ci.kdl

This tests that the file can parse, and that its contents match what we
expect. This test currently fails as the file cannot be parsed.

I may have gone a little overboard in the macro I wrote in order to
generate the expected nodes.

* Add test for parsing examples/cargo.kdl

* Add test for examples/nuget.kdl

Unlike the others, this one just validates that it parses, as the file
is sufficiently large that I don't want to copy its contents into the
test.
2020-12-16 17:48:05 -08:00
.github add GH Action config 2020-12-14 00:05:51 -08:00
examples added some examples 2020-12-14 17:40:29 -08:00
src Add From and TryFrom impls for converting to/from KdlNodeValue (#5) 2020-12-16 17:47:39 -08:00
tests Add tests for the example KDL files (#1) 2020-12-16 17:48:05 -08:00
.gitignore initial commit 2020-12-10 18:42:50 -08:00
CODE_OF_CONDUCT.md add coc 2020-12-14 20:30:58 -08:00
Cargo.toml wip parser 2020-12-12 11:50:34 -08:00
LICENSE.md add license and description 2020-12-10 18:53:27 -08:00
README.md org got renamed 2020-12-14 19:02:37 -08:00

README.md

kdl - Kat's Document Language

kdl is a document language, mostly based on SDLang, with xml-like semantics that looks like you're invoking a bunch of CLI commands!

It's meant to be used both as a serialization format and a configuration language, and is relatively light on syntax compared to XML.

This repository is the official/reference implementation in Rust, and corresponds to the kdl crate

Design and Discussion

kdl is still extremely new, and discussion about the format should happen over on the spec repo's discussions page. Feel free to jump in and give us your 2 cents!

License

The code in this repository is covered by the Parity License, a strong copyleft license. That means that you can only use this project if you're working on an open source-licensed product (MIT/Apache projects are ok!)