1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use syn::synom::Synom; use syn::Ident; /// Binding to extern struct: `extern struct Foo;`. #[allow(missing_docs)] pub struct ExternStruct { pub ident: Ident, } impl Synom for ExternStruct { named!(parse -> Self, do_parse!( keyword!(extern) >> keyword!(struct) >> ident: syn!(Ident) >> punct!(;) >> (ExternStruct { ident }) )); }