nyar_wasm/symbols/identifiers/
display.rs

1use super::*;
2
3impl Debug for Identifier {
4    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
5        f.debug_struct("Identifier").field("path", &self.namespace.join("∷")).field("name", &self.name).finish()
6    }
7}
8
9impl Display for Identifier {
10    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
11        for path in &self.namespace {
12            f.write_str(path)?;
13            if f.alternate() { f.write_str("::")? } else { f.write_str("∷")? }
14        }
15        f.write_str(&self.name)
16    }
17}