Commit Graph

79 Commits

Author SHA1 Message Date
Kat Marchán a1555949ed refactor: clean up parser/FromStr toplevel stuff and add one for KdlIdentifier 2022-04-23 01:21:28 -07:00
Kat Marchán 8ed6a5cd06
feat(errors): improve parsing errors and fix some bugs (#33) 2022-04-22 19:41:28 -07:00
Kat Marchán 16c82f1ec1
feat(types): add type annotation support (#31) 2022-04-22 12:00:32 -07:00
Kat Marchán e242613127
tests: test some example documents 2022-04-22 02:35:02 -07:00
Melody Horn ad34cfd93a
feat(tests): add test for kdl-schema.kdl (#30) 2022-04-22 02:26:52 -07:00
Kat Marchán 364ea6173c
feat(api): complete rewrite into document-oriented parser (#29)
This new version of kdl-rs is a complete rewrite that introduces
a formatting-aware-and-preserving parser, much like toml_edit et al.

BREAKING CHANGE: Completely new API and bumped MSRV to 1.56.0.
2022-04-22 02:20:30 -07:00
Nicolas Sauzede d52e101ff9
docs: Fix Implementations link (#22) 2021-10-11 18:26:32 -07:00
Kat Marchán d8715c8d41
docs: fix license in readme 2021-09-22 10:39:31 -07:00
Kat Marchán a358750d89
(cargo-release) start next development iteration 3.0.1-alpha.0 2021-09-16 01:32:27 -07:00
Kat Marchán 3f3c8721a2
(cargo-release) version 3.0.0 2021-09-16 01:32:05 -07:00
Kat Marchán 2de180b8a4
doc: update changelog 2021-09-16 01:31:50 -07:00
Kat Marchán f811c5c89c
feat(spec): update parser to handle KDL 1.0.0
Fixes: https://github.com/kdl-org/kdl-rs/issues/18

BREAKING CHANGE: Various things have changed in the process of moving to KDL 1.0.0. Please test your stuff
2021-09-16 01:30:58 -07:00
Kat Marchán cd98acddd1
(cargo-release) start next development iteration 2.0.1-alpha.0 2021-09-16 00:02:39 -07:00
Kat Marchán b62f81e1f7
(cargo-release) version 2.0.0 2021-09-16 00:02:19 -07:00
Kat Marchán acfdc960ac
doc: update changelog 2021-09-16 00:02:03 -07:00
Kat Marchán 136faa055f
meta: fix changelog gen 2021-09-16 00:01:34 -07:00
Kat Marchán 63c21684da
doc: make it official? 2021-09-16 00:00:16 -07:00
Kat Marchán 0dbf75c78e
feat(license): change license to Apache-2.0
BREAKING CHANGE: This is a significant licensing change. Please review.
2021-09-15 23:59:34 -07:00
Kat Marchán 832cc072c9
meta: add publishing bits 2021-09-15 23:59:15 -07:00
Kat Marchán 87f836134c
1.1.0 2021-05-08 14:42:29 -07:00
Kat Marchán ebc846a79c
docs: add changelog 2021-05-08 14:42:19 -07:00
jam1garner c1b7c25c00
fix(numbers): Fix parsing of non-integer and non-decimal numbers (#13) 2021-05-08 14:40:37 -07:00
jam1garner 9bc5363bb5
fix(deps): Remove nom dependency on `bitvec` and `lexical` (#14) 2021-05-08 14:40:23 -07:00
jam1garner 94190697d8
feat(docs): Add documentation for the entire crate (#16) 2021-05-08 14:40:15 -07:00
hclarke 95a1ee3e57
feat(identifier): much larger character set for identifiers (not just alphanumeric), to match spec more closely (#7) 2021-05-08 14:40:02 -07:00
hclarke b8c8b52748
feat(display): implemented Display for KdlNode (#6) 2021-05-08 14:39:35 -07:00
Kat Marchán b9d7ac4ca0
1.0.0 2020-12-19 13:14:37 -08:00
Kat Marchán b325d58e68
update Cargo.toml 2020-12-19 13:14:12 -08:00
Kat Marchán f6d5e773c3
clog config and changelog 2020-12-19 13:07:35 -08:00
Kat Marchán 4cc487f9ca
update readme 2020-12-19 12:58:16 -08:00
Kat Marchán 10fb1442e8
unicode whitespace and newlines! 2020-12-19 12:52:33 -08:00
Kat Marchán 758a0bc46e
fmt 2020-12-18 22:58:31 -08:00
Kat Marchán 5809d21898
require terminator after node_children too 2020-12-18 22:53:59 -08:00
Kat Marchán 2c443aed85
cargo fmt 2020-12-18 22:35:52 -08:00
Kat Marchán b5202a4403
oops casing 2020-12-18 22:35:35 -08:00
Kat Marchán ede98b9a7b
fix nodes
Credit: @lucretiel
2020-12-18 22:32:06 -08:00
Kat Marchán 3d43e834fb
fix nuget example 2020-12-18 22:31:36 -08:00
Kat Marchán d0d241b65f
broken nodes parser that should really work? 2020-12-18 21:19:27 -08:00
Kat Marchán 2f282ee206
unnecessary slice 2020-12-18 21:05:01 -08:00
Kat Marchán b4d3f07d09
more stuff 2020-12-18 20:46:52 -08:00
Kat Marchán a032a9ec86
fix a bunch of stuff and write tests for slashdash 2020-12-18 20:09:59 -08:00
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
Lily Ballard 685a537658
Add From and TryFrom impls for converting to/from KdlNodeValue (#5)
* 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`.
2020-12-16 17:47:39 -08:00
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
Lily Ballard c61ef72b03
Export KdlNodeValue (#4) 2020-12-16 17:42:54 -08:00
Lily Ballard 597b89a6cd
Fix newline handling in single-line comments (#2) 2020-12-16 00:49:13 -08:00
Kat Marchán 19b0d8c192
add coc 2020-12-14 20:30:58 -08:00
Kat Marchán 7ae76ac5e5
org got renamed 2020-12-14 19:02:37 -08:00
Kat Marchán a18e7dcd7d
clean up readme 2020-12-14 18:44:20 -08:00
Kat Marchán ef630148fc
added some examples 2020-12-14 17:40:29 -08:00