Go to file
2016-09-04 11:17:06 -07:00
src Split up type-parsing function 2016-09-04 10:59:23 -07:00
tests Parse doc comments 2016-09-04 10:21:36 -07:00
.gitignore item::parse 2016-09-03 11:33:15 -07:00
Cargo.toml Release 0.2.0 2016-09-04 11:17:06 -07:00
LICENSE-APACHE item::parse 2016-09-03 11:33:15 -07:00
LICENSE-MIT item::parse 2016-09-03 11:33:15 -07:00
README.md Release 0.2.0 2016-09-04 11:17:06 -07:00

Nom parser for Rust items

Parse Rust structs and enums without a Syntex dependency, intended for use with Macros 1.1.

[dependencies]
item = "0.2"
extern crate item;

let raw = "
    #[derive(Debug, Clone)]
    pub struct Item {
        pub ident: Ident,
        pub attrs: Vec<Attribute>,
    }
";

let ast = item::parse(raw).unwrap();

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.