From 4870ff17ba3bc2ae2eb08e4468cf5433a1870997 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 16 Oct 2023 22:37:04 -0500 Subject: [PATCH] Token: whoops, these fields need to be public (for now) --- libconlang/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libconlang/src/lib.rs b/libconlang/src/lib.rs index d0c65f4..6411a90 100644 --- a/libconlang/src/lib.rs +++ b/libconlang/src/lib.rs @@ -115,8 +115,8 @@ pub mod token { #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct Token { ty: Type, - head: usize, - tail: usize, + pub head: usize, + pub tail: usize, line: usize, col: usize, } @@ -127,6 +127,7 @@ pub mod token { pub fn cast(self, ty: Type) -> Self { Self { ty, ..self } } + // Hack to work around pub fn rebound(self, head: usize, tail: usize) -> Self { Self { head, tail, ..self } }