mentat/edn
Victor Porof 1b26e23d02 Implement edn pretty printing using pretty.rs. Fixes #195. (#245)
* Implement pretty printing

Signed-off-by: Victor Porof <victor.porof@gmail.com>

* Rewrite pretty printing.

This does a few things.  First, it use pretty.rs directly, without the
layer of macro obfuscation.  The code is significantly simpler as a
result.

Second, it tightens the layout, using pretty.rs to group nested
layouts that fit on a single line.  This is Clojure's EDN style, more
or less.

Third, it drops "special format" support for queries.  This wasn't
completely implemented; if we want it, we can newtype
Query(edn::Value) and figure out how to really implement this idea.

* Rename to reflect functionality.

* Make write interface more Rust-like.

There isn't a clear standard in the stdlib, but a function that takes
ownership of a writer and then returns it back is definitely not
Rust-like.  That's what a (mutable) reference is for.

* Review comment: Use as_ref to avoid cloning strings.

* Post: Fix tests to use `without_spans()`.
2017-02-21 11:48:08 -08:00
..
src Implement edn pretty printing using pretty.rs. Fixes #195. (#245) 2017-02-21 11:48:08 -08:00
tests Add a span component to edn::Value, r=ncalexan 2017-02-17 18:31:26 +01:00
build.rs Implement a basic EDN parser. (#149) r=rnewman,bgrins,nalexander 2017-01-11 13:03:04 -08:00
Cargo.toml Implement edn pretty printing using pretty.rs. Fixes #195. (#245) 2017-02-21 11:48:08 -08:00
README.md Update README for edn; r=me 2017-02-16 18:32:36 +00:00

This crate implements a basic EDN parser for Project Mentat.

It was originally developed as a separate project called barnardsstar.