Token macros
diff --git a/synom/src/lib.rs b/synom/src/lib.rs
index 06a0f88..e8ad32a 100644
--- a/synom/src/lib.rs
+++ b/synom/src/lib.rs
@@ -116,9 +116,8 @@
/// # #[macro_use] extern crate synom;
/// # use syn::Ty;
/// # use synom::delimited::Delimited;
-/// # use synom::tokens::Comma;
/// // One or more Rust types separated by commas.
-/// named!(pub comma_separated_types -> Delimited<Ty, Comma>,
+/// named!(pub comma_separated_types -> Delimited<Ty, Token![,]>,
/// call!(Delimited::parse_separated_nonempty)
/// );
/// # fn main() {}
@@ -288,11 +287,10 @@
/// #[macro_use] extern crate synom;
///
/// use syn::Expr;
-/// use synom::tokens::Pound;
///
/// // An expression terminated by ##.
/// named!(expr_pound_pound -> Expr,
-/// terminated!(syn!(Expr), tuple!(syn!(Pound), syn!(Pound)))
+/// terminated!(syn!(Expr), tuple!(punct!(#), punct!(#)))
/// );
///
/// # fn main() {}
@@ -452,7 +450,6 @@
/// #[macro_use] extern crate synom;
///
/// use syn::{Ident, Ty};
-/// use synom::tokens::*;
///
/// #[derive(Debug)]
/// enum UnitType {
@@ -468,14 +465,14 @@
/// // Parse a unit struct or enum: either `struct S;` or `enum E { V }`.
/// named!(unit_type -> UnitType, do_parse!(
/// which: alt!(
-/// syn!(Struct) => { |_| 0 }
+/// keyword!(struct) => { |_| 0 }
/// |
-/// syn!(Enum) => { |_| 1 }
+/// keyword!(enum) => { |_| 1 }
/// ) >>
/// id: syn!(Ident) >>
/// item: switch!(value!(which),
/// 0 => map!(
-/// syn!(Semi),
+/// punct!(;),
/// move |_| UnitType::Struct {
/// name: id,
/// }
@@ -522,7 +519,6 @@
/// #[macro_use] extern crate synom;
///
/// use syn::Ident;
-/// use synom::tokens::*;
///
/// #[derive(Debug)]
/// enum UnitType {
@@ -538,14 +534,14 @@
/// // Parse a unit struct or enum: either `struct S;` or `enum E { V }`.
/// named!(unit_type -> UnitType, do_parse!(
/// is_struct: alt!(
-/// syn!(Struct) => { |_| true }
+/// keyword!(struct) => { |_| true }
/// |
-/// syn!(Enum) => { |_| false }
+/// keyword!(enum) => { |_| false }
/// ) >>
/// id: syn!(Ident) >>
/// item: switch!(value!(is_struct),
/// true => map!(
-/// syn!(Semi),
+/// punct!(;),
/// move |_| UnitType::Struct {
/// name: id,
/// }
@@ -684,13 +680,12 @@
/// #[macro_use] extern crate synom;
///
/// use syn::Ident;
-/// use synom::tokens::Bang;
///
/// named!(ident_or_bang -> Ident,
/// alt!(
/// syn!(Ident)
/// |
-/// syn!(Bang) => { |_| "BANG".into() }
+/// punct!(!) => { |_| "BANG".into() }
/// )
/// );
///
@@ -758,13 +753,13 @@
/// extern crate proc_macro2;
///
/// use syn::{Ident, TokenTree};
-/// use synom::tokens::{Bang, Paren};
+/// use synom::tokens::Paren;
/// use proc_macro2::TokenStream;
///
/// // Parse a macro invocation like `stringify!($args)`.
/// named!(simple_mac -> (Ident, (TokenStream, Paren)), do_parse!(
/// name: syn!(Ident) >>
-/// syn!(Bang) >>
+/// punct!(!) >>
/// body: parens!(syn!(TokenStream)) >>
/// (name, body)
/// ));