Touch up the exposed parsers
diff --git a/.gitignore b/.gitignore
index 4fffb2f..a9d37c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/target
-/Cargo.lock
+target
+Cargo.lock
diff --git a/Cargo.toml b/Cargo.toml
index 6c592e4..bea2122 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,19 +12,19 @@
 default = ["parsing", "printing"]
 aster = []
 full = []
-parsing = ["unicode-xid", "syn_nom"]
+parsing = ["unicode-xid", "synom"]
 printing = ["quote"]
 visit = []
 
 [dependencies]
 clippy = { version = "0.*", optional = true }
-quote = { version = "0.3.0", optional = true }
+quote = { version = "0.3", optional = true }
 unicode-xid = { version = "0.0.4", optional = true }
-syn_nom = { version = "0.1.0", path = "syn_nom/", optional = true }
+synom = { version = "0.11", path = "synom", optional = true }
 
 [dev-dependencies]
-syntex_pos = "0.52.0"
-syntex_syntax = "0.52.0"
+syntex_pos = "0.52"
+syntex_syntax = "0.52"
 tempdir = "0.3.5"
 time = "0.1.35"
 walkdir = "1.0.1"
diff --git a/src/attr.rs b/src/attr.rs
index eadbe58..8eac137 100644
--- a/src/attr.rs
+++ b/src/attr.rs
@@ -99,7 +99,7 @@
     use super::*;
     use ident::parsing::ident;
     use lit::parsing::lit;
-    use nom::space::{block_comment, whitespace};
+    use synom::space::{block_comment, whitespace};
 
     #[cfg(feature = "full")]
     named!(pub inner_attr -> Attribute, alt!(
diff --git a/src/escape.rs b/src/escape.rs
index d8831eb..1c9c6ed 100644
--- a/src/escape.rs
+++ b/src/escape.rs
@@ -1,6 +1,6 @@
 use std::{char, str};
 use std::num::ParseIntError;
-use nom::IResult;
+use synom::IResult;
 
 pub fn cooked_string(input: &str) -> IResult<&str, String> {
     let mut s = String::new();
diff --git a/src/expr.rs b/src/expr.rs
index 7b6602a..9eae723 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -315,7 +315,7 @@
     use item::parsing::item;
     use lit::parsing::{digits, lit};
     use mac::parsing::{mac, token_trees};
-    use nom::IResult::{self, Error};
+    use synom::IResult::{self, Error};
     use op::parsing::{assign_op, binop, unop};
     use ty::parsing::{mutability, path, qpath, ty, unsafety};
 
@@ -323,7 +323,7 @@
     // https://github.com/rust-lang/rfcs/pull/92
     macro_rules! named_ambiguous_expr {
         ($name:ident -> $o:ty, $allow_struct:ident, $submac:ident!( $($args:tt)* )) => {
-            fn $name(i: &str, $allow_struct: bool) -> $crate::nom::IResult<&str, $o> {
+            fn $name(i: &str, $allow_struct: bool) -> $crate::synom::IResult<&str, $o> {
                 $submac!(i, $($args)*)
             }
         };
diff --git a/src/ident.rs b/src/ident.rs
index aa0d11f..c658d1a 100644
--- a/src/ident.rs
+++ b/src/ident.rs
@@ -57,8 +57,8 @@
 #[cfg(feature = "parsing")]
 pub mod parsing {
     use super::*;
-    use nom::IResult;
-    use nom::space::skip_whitespace;
+    use synom::IResult;
+    use synom::space::skip_whitespace;
     use unicode_xid::UnicodeXID;
 
     pub fn ident(input: &str) -> IResult<&str, Ident> {
diff --git a/src/lib.rs b/src/lib.rs
index e18e7e6..38ebc90 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,7 +9,7 @@
 
 #[cfg(feature = "parsing")]
 #[macro_use]
-extern crate syn_nom as nom;
+extern crate synom;
 
 #[cfg(feature = "aster")]
 pub mod aster;
@@ -84,7 +84,7 @@
 mod parsing {
     use super::*;
     use {derive, generics, ident, mac, ty};
-    use nom::{space, IResult};
+    use synom::{space, IResult};
 
     #[cfg(feature = "full")]
     use {expr, item, krate};
@@ -165,51 +165,42 @@
 }
 
 #[cfg(feature = "parsing")]
-pub mod parser {
+pub mod parse {
     //! This module contains a set of exported nom parsers which can be used to
-    //! build nom parsers for custom grammars when used alongside the `syn_nom`
-    //! crate.
+    //! parse custom grammars when used alongside the `synom` crate.
     //!
-    //! `syn` uses its own custom fork of `nom`, `syn_nom`, which is smaller, and
-    //! thus improves build speeds. This should be used instead of `nom` when
-    //! building parsers using these parsers.
-
-    #[cfg(feature = "full")]
-    pub use krate::parsing::krate;
+    //! Internally, `syn` uses a fork of `nom` called `synom` which resolves a
+    //! persistent pitfall of using `nom` to parse Rust by eliminating the
+    //! `IResult::Incomplete` variant. The `synom` crate should be used instead
+    //! of `nom` when working with the parsers in this module.
 
     #[cfg(feature = "full")]
     pub use item::parsing::item;
 
     #[cfg(feature = "full")]
-    pub use item::parsing::items;
-
-    #[cfg(feature = "full")]
     pub use expr::parsing::expr;
 
     pub use lit::parsing::lit;
 
-    pub use lit::parsing::string as str_lit;
+    pub use lit::parsing::string;
 
-    pub use lit::parsing::byte_string as byte_str_lit;
+    pub use lit::parsing::byte_string;
 
-    pub use lit::parsing::byte as byte_lit;
+    pub use lit::parsing::byte;
 
-    pub use lit::parsing::character as char_lit;
+    pub use lit::parsing::character;
 
-    pub use lit::parsing::float as float_lit;
+    pub use lit::parsing::float;
 
-    pub use lit::parsing::int as int_lit;
+    pub use lit::parsing::int;
 
-    pub use lit::parsing::boolean as bool_lit;
+    pub use lit::parsing::boolean;
 
     pub use ty::parsing::ty;
 
     pub use ty::parsing::path;
 
-    pub use generics::parsing::where_clause;
-
-    #[cfg(feature = "full")]
-    pub use mac::parsing::token_trees;
+    pub use mac::parsing::token_tree as tt;
 
     pub use ident::parsing::ident;
 }
diff --git a/src/lit.rs b/src/lit.rs
index aba020a..f846f66 100644
--- a/src/lit.rs
+++ b/src/lit.rs
@@ -127,36 +127,64 @@
 ]}
 
 #[cfg(feature = "parsing")]
+#[derive(Debug, Clone)]
+pub struct StrLit {
+    value: String,
+    style: StrStyle,
+}
+
+#[cfg(feature = "parsing")]
+#[derive(Debug, Clone)]
+pub struct ByteStrLit {
+    value: Vec<u8>,
+    style: StrStyle,
+}
+
+#[cfg(feature = "parsing")]
+#[derive(Debug, Clone)]
+pub struct IntLit {
+    value: u64,
+    suffix: IntTy,
+}
+
+#[cfg(feature = "parsing")]
+#[derive(Debug, Clone)]
+pub struct FloatLit {
+    value: String,
+    suffix: FloatTy,
+}
+
+#[cfg(feature = "parsing")]
 pub mod parsing {
     use super::*;
     use escape::{cooked_byte, cooked_byte_string, cooked_char, cooked_string, raw_string};
-    use nom::space::skip_whitespace;
-    use nom::IResult;
+    use synom::space::skip_whitespace;
+    use synom::IResult;
     use unicode_xid::UnicodeXID;
 
     named!(pub lit -> Lit, alt!(
-        string => { |(value, style)| Lit::Str(value, style) }
+        string => { |StrLit { value, style }| Lit::Str(value, style) }
         |
-        byte_string => { |(value, style)| Lit::ByteStr(value, style) }
+        byte_string => { |ByteStrLit { value, style }| Lit::ByteStr(value, style) }
         |
         byte => { |b| Lit::Byte(b) }
         |
         character => { |ch| Lit::Char(ch) }
         |
-        float => { |(value, suffix)| Lit::Float(value, suffix) } // must be before int
+        float => { |FloatLit { value, suffix }| Lit::Float(value, suffix) } // must be before int
         |
-        int => { |(value, ty)| Lit::Int(value, ty) }
+        int => { |IntLit { value, suffix }| Lit::Int(value, suffix) }
         |
         boolean => { |value| Lit::Bool(value) }
     ));
 
-    named!(pub string -> (String, StrStyle), alt!(
-        quoted_string => { |s| (s, StrStyle::Cooked) }
+    named!(pub string -> StrLit, alt!(
+        quoted_string => { |s| StrLit { value: s, style: StrStyle::Cooked } }
         |
         preceded!(
             punct!("r"),
             raw_string
-        ) => { |(s, n)| (s, StrStyle::Raw(n)) }
+        ) => { |(s, n)| StrLit { value: s, style: StrStyle::Raw(n) }}
     ));
 
     named!(pub quoted_string -> String, delimited!(
@@ -165,17 +193,17 @@
         tag!("\"")
     ));
 
-    named!(pub byte_string -> (Vec<u8>, StrStyle), alt!(
+    named!(pub byte_string -> ByteStrLit, alt!(
         delimited!(
             punct!("b\""),
             cooked_byte_string,
             tag!("\"")
-        ) => { |vec| (vec, StrStyle::Cooked) }
+        ) => { |vec| ByteStrLit { value: vec, style: StrStyle::Cooked } }
         |
         preceded!(
             punct!("br"),
             raw_string
-        ) => { |(s, n): (String, _)| (s.into_bytes(), StrStyle::Raw(n)) }
+        ) => { |(s, n): (String, _)| ByteStrLit { value: s.into_bytes(), style: StrStyle::Raw(n) } }
     ));
 
     named!(pub byte -> u8, do_parse!(
@@ -193,20 +221,21 @@
         (ch)
     ));
 
-    named!(pub float -> (String, FloatTy), tuple!(
-        float_string,
-        alt!(
+    named!(pub float -> FloatLit, do_parse!(
+        value: float_string >>
+        suffix: alt!(
             tag!("f32") => { |_| FloatTy::F32 }
             |
             tag!("f64") => { |_| FloatTy::F64 }
             |
             epsilon!() => { |_| FloatTy::Unsuffixed }
-        )
+        ) >>
+        (FloatLit { value: value, suffix: suffix })
     ));
 
-    named!(pub int -> (u64, IntTy), tuple!(
-        digits,
-        alt!(
+    named!(pub int -> IntLit, do_parse!(
+        value: digits >>
+        suffix: alt!(
             tag!("isize") => { |_| IntTy::Isize }
             |
             tag!("i8") => { |_| IntTy::I8 }
@@ -228,7 +257,8 @@
             tag!("u64") => { |_| IntTy::U64 }
             |
             epsilon!() => { |_| IntTy::Unsuffixed }
-        )
+        ) >>
+        (IntLit { value: value, suffix: suffix })
     ));
 
     named!(pub boolean -> bool, alt!(
diff --git a/src/mac.rs b/src/mac.rs
index c83f77d..9a648d4 100644
--- a/src/mac.rs
+++ b/src/mac.rs
@@ -116,7 +116,7 @@
     use generics::parsing::lifetime;
     use ident::parsing::word;
     use lit::parsing::lit;
-    use nom::space::{block_comment, whitespace};
+    use synom::space::{block_comment, whitespace};
     use ty::parsing::path;
 
     named!(pub mac -> Mac, do_parse!(
@@ -151,7 +151,7 @@
         ) => { |tts| Delimited { delim: DelimToken::Brace, tts: tts } }
     ));
 
-    named!(token_tree -> TokenTree, alt!(
+    named!(pub token_tree -> TokenTree, alt!(
         map!(token, TokenTree::Token)
         |
         map!(delimited, TokenTree::Delimited)
diff --git a/syn_nom/Cargo.toml b/syn_nom/Cargo.toml
deleted file mode 100644
index 0c22fa9..0000000
--- a/syn_nom/Cargo.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-name = "syn_nom"
-version = "0.1.0"
-authors = ["David Tolnay <dtolnay@gmail.com>"]
-license = "MIT/Apache-2.0"
-description = "stripped-down Nom parser used by Syn"
-repository = "https://github.com/dtolnay/syn"
-documentation = "https://dtolnay.github.io/syn/syn_nom/"
-include = ["Cargo.toml", "src/**/*.rs"]
-
-[dependencies]
-unicode-xid = "0.0.4"
diff --git a/synom/Cargo.toml b/synom/Cargo.toml
new file mode 100644
index 0000000..6a34065
--- /dev/null
+++ b/synom/Cargo.toml
@@ -0,0 +1,12 @@
+[package]
+name = "synom"
+version = "0.11.0"
+authors = ["David Tolnay <dtolnay@gmail.com>"]
+license = "MIT/Apache-2.0"
+description = "Stripped-down Nom parser used by Syn"
+repository = "https://github.com/dtolnay/syn"
+documentation = "https://dtolnay.github.io/syn/synom/"
+include = ["Cargo.toml", "src/**/*.rs"]
+
+[dependencies]
+unicode-xid = "0.0.4"
diff --git a/syn_nom/src/helper.rs b/synom/src/helper.rs
similarity index 92%
rename from syn_nom/src/helper.rs
rename to synom/src/helper.rs
index cd02a89..7283e41 100644
--- a/syn_nom/src/helper.rs
+++ b/synom/src/helper.rs
@@ -4,10 +4,12 @@
 #[macro_export]
 macro_rules! punct {
     ($i:expr, $punct:expr) => {
-        $crate::punct($i, $punct)
+        $crate::helper::punct($i, $punct)
     };
 }
 
+// Not public API.
+#[doc(hidden)]
 pub fn punct<'a>(input: &'a str, token: &'static str) -> IResult<&'a str, &'a str> {
     let input = skip_whitespace(input);
     if input.starts_with(token) {
@@ -20,10 +22,12 @@
 #[macro_export]
 macro_rules! keyword {
     ($i:expr, $keyword:expr) => {
-        $crate::keyword($i, $keyword)
+        $crate::helper::keyword($i, $keyword)
     };
 }
 
+// Not public API.
+#[doc(hidden)]
 pub fn keyword<'a>(input: &'a str, token: &'static str) -> IResult<&'a str, &'a str> {
     match punct(input, token) {
         IResult::Done(rest, _) => {
@@ -88,17 +92,19 @@
 #[macro_export]
 macro_rules! separated_list {
     ($i:expr, punct!($sep:expr), $f:expr) => {
-        $crate::separated_list($i, $sep, $f, false)
+        $crate::helper::separated_list($i, $sep, $f, false)
     };
 }
 
 #[macro_export]
 macro_rules! terminated_list {
     ($i:expr, punct!($sep:expr), $f:expr) => {
-        $crate::separated_list($i, $sep, $f, true)
+        $crate::helper::separated_list($i, $sep, $f, true)
     };
 }
 
+// Not public API.
+#[doc(hidden)]
 pub fn separated_list<'a, T>(mut input: &'a str,
                              sep: &'static str,
                              f: fn(&'a str) -> IResult<&'a str, T>,
diff --git a/syn_nom/src/lib.rs b/synom/src/lib.rs
similarity index 99%
rename from syn_nom/src/lib.rs
rename to synom/src/lib.rs
index e4f93db..6ed5531 100644
--- a/syn_nom/src/lib.rs
+++ b/synom/src/lib.rs
@@ -6,8 +6,8 @@
 
 pub mod space;
 
-pub use helper::*;
-mod helper;
+#[doc(hidden)]
+pub mod helper;
 
 #[derive(Debug, PartialEq, Eq, Clone)]
 pub enum IResult<I, O> {
@@ -191,6 +191,8 @@
     };
 }
 
+// Not public API.
+#[doc(hidden)]
 pub fn many0<'a, T>(mut input: &'a str,
                     f: fn(&'a str) -> IResult<&'a str, T>)
                     -> IResult<&'a str, Vec<T>> {
diff --git a/syn_nom/src/space.rs b/synom/src/space.rs
similarity index 100%
rename from syn_nom/src/space.rs
rename to synom/src/space.rs