Gate definitions with internals feature.

This commit is contained in:
Stephen Chung
2022-07-28 17:58:22 +08:00
parent 0f92eb05bd
commit 87687ebf25
4 changed files with 48 additions and 19 deletions

View File

@@ -575,6 +575,13 @@ pub enum Token {
EOF,
}
impl fmt::Display for Token {
#[inline(always)]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(&self.syntax())
}
}
impl Token {
/// Get the literal syntax of the token.
#[must_use]