4 releases (2 breaking)
Uses old Rust 2015
0.3.0 | Jun 24, 2017 |
---|---|
0.2.0 | Mar 6, 2017 |
0.1.1 | Sep 23, 2015 |
0.1.0 | Sep 20, 2015 |
#61 in #symbol
15KB
309 lines
edn.rs
An EDN (Extensible Data Notation) parser.
Examples
extern crate edn;
use edn::parser::Parser;
fn main() {
let str = "(defn sum [xs]
(reduce + 0 xs))
(println (sum [1 2 3 4 5]))";
let mut parser = Parser::new(str);
println!("{:?}", parser.read());
println!("{:?}", parser.read());
}
prints
Some(Ok(List([Symbol("defn"), Symbol("sum"), Vector([Symbol("xs")]), List([Symbol("reduce"), Symbol("+"), Integer(0), Symbol("xs")])])))
Some(Ok(List([Symbol("println"), List([Symbol("sum"), Vector([Integer(1), Integer(2), Integer(3), Integer(4), Integer(5)])])])))
License
MIT
Dependencies
~345KB