Rust parser for KDL
Go to file
Lily Ballard d7670e17b4
Add line, column to KdlError (#3)
* Add line and column numbers to KdlError

These numbers are calculated using our `newline` rule, as I'm not aware
of any standard for how to calculate line numbers in error messages.

The error retains the original `offset` field as well, but it's now
expressed in characters rather than bytes.

* Clean up error handling in parse_document()

We don't need to worry about `Incomplete` errors, the `complete` family
of parsers (which we're using) doesn't ever produce those. We can use
the `.finish()` function to unwrap the error instead, so we don't have
to worry about the underlying error types.
2020-12-16 17:43:13 -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 line, column to KdlError (#3) 2020-12-16 17:43:13 -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!)