From 5688e03b8a3ca142f55073d7a3b1e068692e1adb Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 6 Jan 2020 18:26:32 -0500 Subject: [PATCH] Implement display for Pos --- src/common.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common.rs b/src/common.rs index d8387df..62250f7 100644 --- a/src/common.rs +++ b/src/common.rs @@ -677,3 +677,9 @@ impl Pos { self.column += num; } } + +impl Display for Pos { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "line:{} col:{}", self.line, self.column) + } +} \ No newline at end of file