Add import statement.

This commit is contained in:
Stephen Chung
2020-05-04 19:36:58 +08:00
parent b94fa31e21
commit 2bdd174f16
8 changed files with 239 additions and 105 deletions

View File

@@ -422,6 +422,12 @@ impl Token {
}
}
impl From<Token> for String {
fn from(token: Token) -> Self {
token.syntax().into()
}
}
/// An iterator on a `Token` stream.
pub struct TokenIterator<'a> {
/// Can the next token be a unary operator?