Go to file
2016-09-04 11:31:37 -07:00
src Feature flag for nom dependency 2016-09-04 11:26:41 -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 Feature flag for nom dependency 2016-09-04 11:26:41 -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 Include the real Item struct in readme 2016-09-04 11:31:37 -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, Eq, PartialEq)]
    pub struct Item {
        pub ident: Ident,
        pub vis: Visibility,
        pub attrs: Vec<Attribute>,
        pub generics: Generics,
        pub body: Body,
    }
";

let ast = item::parse(raw);

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.