Derive debug
diff --git a/src/lib.rs b/src/lib.rs
index 879ccfe..1587d9f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,7 +15,7 @@
#[cfg(feature = "unstable")]
mod imp;
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct TokenStream(imp::TokenStream);
#[derive(Debug)]
@@ -81,7 +81,7 @@
}
}
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, Debug)]
pub struct Span(imp::Span);
impl Default for Span {
@@ -96,7 +96,7 @@
}
}
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct TokenTree {
pub span: Span,
pub kind: TokenKind,
@@ -108,7 +108,7 @@
}
}
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub enum TokenKind {
Sequence(Delimiter, TokenStream),
Word(Symbol),
@@ -116,7 +116,7 @@
Literal(Literal),
}
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, Debug)]
pub enum Delimiter {
Parenthesis,
Brace,
@@ -124,7 +124,7 @@
None,
}
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, Debug)]
pub struct Symbol(imp::Symbol);
impl<'a> From<&'a str> for Symbol {
@@ -145,13 +145,13 @@
}
}
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, Debug)]
pub enum OpKind {
Alone,
Joint,
}
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct Literal(imp::Literal);
impl fmt::Display for Literal {
@@ -206,6 +206,7 @@
f32, f64, char, &'a str,
}
+#[derive(Debug)]
pub struct TokenIter(imp::TokenIter);
impl Iterator for TokenIter {
diff --git a/src/stable.rs b/src/stable.rs
index bea0180..50feb0f 100644
--- a/src/stable.rs
+++ b/src/stable.rs
@@ -18,7 +18,7 @@
use {TokenTree, TokenKind, Delimiter, OpKind};
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct TokenStream {
inner: Vec<TokenTree>,
}
@@ -139,7 +139,7 @@
}
}
-#[derive(Clone, Copy, Default)]
+#[derive(Clone, Copy, Default, Debug)]
pub struct Span;
impl Span {
@@ -148,7 +148,7 @@
}
}
-#[derive(Copy, Clone)]
+#[derive(Copy, Clone, Debug)]
pub struct Symbol(usize);
thread_local!(static SYMBOLS: RefCell<Interner> = RefCell::new(Interner::new()));
@@ -210,7 +210,7 @@
}
}
-#[derive(Clone)]
+#[derive(Clone, Debug)]
pub struct Literal(String);
impl Literal {