Commit Graph

61 Commits

Author SHA1 Message Date
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
Lily Ballard b5f8561b79
Replace ```ignore with ```text (#21)
Using the `ignore` marker makes `cargo test` think this is rust code
that should be ignored, which means it prints an "ignored" line in the
test output. It also makes `cargo doc --document-private-items` attempt
to colorize it as rust code. Marking this as `text` instead fixes both
issues.
2020-12-14 17:40:11 -08:00
Kat Marchán 775aa0fed0
BANISH THE COMMAS 2020-12-14 00:30:08 -08:00
Kat Marchán 0cbb505c97
deindent because why nnot 2020-12-14 00:21:54 -08:00
Kat Marchán 75c176ae54
switch to LF line endings 2020-12-14 00:07:14 -08:00
Kat Marchán be237e7d69
add KDL example file 2020-12-14 00:06:10 -08:00
Kat Marchán a8f3ef3c9f
add GH Action config 2020-12-14 00:05:51 -08:00
Kat Marchán 42564a7cf7
rename Node and NodeValue 2020-12-13 22:31:30 -08:00
Kat Marchán e715b08800
strings done! 2020-12-13 22:25:55 -08:00
Kat Marchán 7ec15b7a04
reserve # so stuff like serde can use it for, say, indexing into values 2020-12-13 20:45:28 -08:00
Kat Marchán 6113d727d9
specced out string format 2020-12-13 20:38:31 -08:00
Kat Marchán 7af5ecd72c
note that spec is CC-BY-SA 2020-12-13 18:25:18 -08:00
Kat Marchán 4b4ffb71fd
0 is an integer (thanks, tef!) 2020-12-13 17:28:24 -08:00
Kat Marchán 948e983b69
lbr 2020-12-13 16:49:16 -08:00
Kat Marchán 842d1da3b9
numbers 2020-12-13 16:47:36 -08:00
Kat Marchán 54299642da
fix raw_string 2020-12-12 18:44:05 -08:00
Kat Marchán a316f6d2ef
some progress + tests 2020-12-12 17:51:18 -08:00
Kat Marchán 100a736145
node, identifier, and comments done 2020-12-12 15:07:19 -08:00
Kat Marchán 950d5bfc85
fuck tabs 2020-12-12 12:33:27 -08:00