commit | 10413f0b216b9d1c5b96a3ecc7a2a4230f3b90d2 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Fri Sep 30 09:12:02 2016 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Fri Sep 30 09:30:36 2016 -0700 |
tree | d44ce2176ca39d881c9461881f2ff53e1b0d3692 | |
parent | df92aafcf8d99521c4faedfcfa83aeae9b952762 [diff] [blame] |
Add keyword parser
diff --git a/src/macro_input.rs b/src/macro_input.rs index 64a735e..848e609 100644 --- a/src/macro_input.rs +++ b/src/macro_input.rs
@@ -27,8 +27,7 @@ named!(pub macro_input -> MacroInput, do_parse!( attrs: many0!(attribute) >> vis: visibility >> - which: alt!(punct!("struct") | punct!("enum")) >> - multispace >> + which: alt!(keyword!("struct") | keyword!("enum")) >> id: ident >> generics: generics >> item: switch!(value!(which),