Commit Graph

124 Commits

Author SHA1 Message Date
Kat Marchán 232d253cbf
(cargo-release) version 4.6.0 2022-10-09 12:10:17 -07:00
Kat Marchán 9ad7eda2e0
update changelog 2022-10-09 12:09:58 -07:00
Aria Beingessner 3ddbfec80e
feat(errors): Add better diagnostics for errant plain identifiers in nodes (#59)
Fixes: https://github.com/kdl-org/kdl-rs/issues/58
2022-10-09 12:00:32 -07:00
Kat Marchán ae5705c388
(cargo-release) start next development iteration 4.5.1-alpha.0 2022-08-30 20:26:33 -07:00
Kat Marchán 6315cd550a
(cargo-release) version 4.5.0 2022-08-30 20:26:08 -07:00
Kat Marchán da85a39a26
docs: update changelog 2022-08-30 20:25:55 -07:00
Aria Beingessner b17ef8e2c6
feat(spans): add spans to most elements (#57)
This necessitates passing the input around through all the sub-parsers so they
can compute their own sub-spans, which in turn necessitates making most of the
subparsers into nom-style 'function builders' by wrapping them in closures and
returning the closures.

The current impl hides this functionality behind an on-by-default "span" feature.

Some fallout of this change:

There is now a private parser::KdlParser type that must be constructed with the
full input for all span computation. The parser::parser method has been moved to
a method of this to make sure the full_input used for span computation is the
same one passed to parsing. In doing this a bug where the span of errors would
be incorrectly computed for non-ascii strings has been fixed.

Types now manually implement PartialEq and Hash to avoid incorporating the span
of the item into those computations.

All parser combinators must first have the KdlParser applied before using them,
making their signatures far more complex. Unfortunately KdlParser::parse can't
apply that for you because I don't think it's possible to express that complex
of a signature and not have the lifetimes get messed up.
2022-08-30 20:24:06 -07:00
Kat Marchán bbd011512a
(cargo-release) start next development iteration 4.4.1-alpha.0 2022-08-18 12:40:20 -07:00
Kat Marchán 857089dcae
(cargo-release) version 4.4.0 2022-08-18 12:39:55 -07:00
Kat Marchán 204460bf1b
update changelog 2022-08-18 12:39:21 -07:00
Kat Marchán 8d0f36ceb1
feat(deps): bump miette 2022-08-18 12:27:59 -07:00
Christopher Durham 2e9c0447f9
fix(formatting): Fix formatting when decoration is not present (#56) 2022-08-18 12:22:15 -07:00
Cliff L. Biffle bbc5e4e6a6
fix(fmt): Indent trailing brace of nested nodes. (#49)
In 4.3.0, the Display output for nested nodes always puts the trailing
braces on the left margin:

    a {
        b {
            c {
    }
    }
    }

This commit indents the trailing brace to match the node name, at least
when explicit trailing text is not provided.
2022-07-22 08:00:54 -07:00
Dimitri Merejkowsky 901fe3fd7b
docs: add some examples (#47) 2022-07-22 07:58:50 -07:00
Kat Marchán 6d32700b95
(cargo-release) start next development iteration 4.3.1-alpha.0 2022-06-10 17:08:20 -07:00
Kat Marchán 58a60f9a30
(cargo-release) version 4.3.0 2022-06-10 17:07:50 -07:00
Kat Marchán 129a2e1910
docs: update changelog 2022-06-10 17:06:57 -07:00
Nicola Papale cd2d6e42b1
feat(fmt): Add clear_fmt_recursive method (#45)
Fixes #46

When comparing two different `KdlNode` or `KdlDocument`, it's useful to
have a "canonical" representation where formatting differences do not
matter.

`clear_fmt` removes all formatting from a `KdlNode`, but does not apply
recursively, as a result, it doesn't create a canonical representation.
`clear_fmt_recursive` solves this by applying `clear_fmt` recursively to
the contents of the node.
2022-06-10 17:05:58 -07:00
Andrew Lilley Brinker b3ea4a87ee
docs: remove reference to Kaydle (#44)
Fixes: https://github.com/kdl-org/kdl-rs/issues/42

Kaydle is an in-development KDL implementation, but it's
not yet ready for use. This commit removes the reference to
it in the interest of not confusing potential users who might
expect it to be ready and be confused by the lack of an
available version on Crates.io.
2022-05-14 08:58:36 -07:00
Kat Marchán 5ef8eeef52
(cargo-release) start next development iteration 4.2.1-alpha.0 2022-05-11 08:29:48 -07:00
Kat Marchán 0bf6f953ff
(cargo-release) version 4.2.0 2022-05-11 08:29:27 -07:00
Kat Marchán 87e560630f
docs: update changelog 2022-05-11 08:24:35 -07:00
Nicola Papale afccf01216
feat(entry): Add accessors to entry type. (#43)
While the type of entries was parsed, there was no way for the library
user to access it. This commit let the user access the `ty` field of the
`KdlEntry` struct. It mirrors the accessors on the `value` field.
2022-05-11 08:20:08 -07:00
Kat Marchán ac3ca5773f
(cargo-release) start next development iteration 4.1.2-alpha.0 2022-04-27 23:28:33 -07:00
Kat Marchán f21bf8b49e
(cargo-release) version 4.1.1 2022-04-27 23:28:13 -07:00
Kat Marchán 11201dabc6
docs: update changelog 2022-04-27 23:27:42 -07:00
Kat Marchán 58a40fdf48
fix(compliance): pull in spec test suite and fix issues (#40)
This commit includes a whole bunch of fixes, some of which are significant changes to the parser and some related functionality. But I consider all changes to be bugfixes because they were compliance failures.
2022-04-27 23:21:28 -07:00
Kat Marchán 71df712c0c
(cargo-release) start next development iteration 4.1.1-alpha.0 2022-04-23 22:37:03 -07:00
Kat Marchán 6577a10c85
(cargo-release) version 4.1.0 2022-04-23 22:36:44 -07:00
Kat Marchán 4a920ba40f
docs: update changelog 2022-04-23 22:36:31 -07:00
Kat Marchán 12d373a1e0
feat(fmt): shiny new comment-preserving formatter! (#38)
Fixes: https://github.com/kdl-org/kdl-rs/issues/34
2022-04-23 22:34:51 -07:00
Kat Marchán 2d65b61532
docs: fix README links 2022-04-23 20:48:44 -07:00
Kat Marchán e068d33b3a
(cargo-release) start next development iteration 4.0.1-alpha.0 2022-04-23 02:36:19 -07:00
Kat Marchán ace541a7aa
(cargo-release) version 4.0.0 2022-04-23 02:36:00 -07:00
Kat Marchán 287a3171a0
docs: update changelog 2022-04-23 02:35:29 -07:00
Kat Marchán c2cdc5de37
docs: fix minor doc issues with error stuff 2022-04-23 02:24:23 -07:00
Kat Marchán 177c42cae7
feat(len): add APIs to calculate component lengths (#36)
Fixes: https://github.com/kdl-org/kdl-rs/issues/19
2022-04-23 02:15:31 -07:00
Kat Marchán 40b04418c9
fix(api): remove obsolete type 2022-04-23 01:38:05 -07:00
Kat Marchán 21f7dbf106
docs: readme updates 2022-04-23 01:37:48 -07:00
Kat Marchán d63f336d18 feat(errors): overhauled error reporting a ton 2022-04-23 01:21:28 -07:00
Kat Marchán 8106d65732 deps: bump thiserror 2022-04-23 01:21:28 -07:00
Kat Marchán 5846bea079 deps: remove phf dep 2022-04-23 01:21:28 -07:00
Kat Marchán 1a8eb35168 fix(parse): small parser tweaks + more tests 2022-04-23 01:21:28 -07:00
Kat Marchán 892bf06e69 feat(clear_fmt): add methods to clear formatting and reset it to default 2022-04-23 01:21:28 -07:00
Kat Marchán fc1d0fd24b chore: clean up and docs 2022-04-23 01:21:28 -07:00
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