diff options
Diffstat (limited to 'src/syntax/ident.rs')
| -rw-r--r-- | src/syntax/ident.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/syntax/ident.rs b/src/syntax/ident.rs index 3cb47c47..c4cc19bc 100644 --- a/src/syntax/ident.rs +++ b/src/syntax/ident.rs @@ -2,6 +2,8 @@ use std::ops::Deref; use unicode_xid::UnicodeXID; +use crate::pretty::{Pretty, Printer}; + /// An Unicode identifier with a few extra permissible characters. /// /// In addition to what is specified in the [Unicode Standard][uax31], we allow: @@ -28,6 +30,12 @@ impl Ident { } } +impl Pretty for Ident { + fn pretty(&self, p: &mut Printer) { + p.push_str(self.as_str()); + } +} + impl AsRef<str> for Ident { fn as_ref(&self) -> &str { self |
