Token: whoops, these fields need to be public (for now)
This commit is contained in:
parent
3866a2e9f2
commit
4870ff17ba
@ -115,8 +115,8 @@ pub mod token {
|
|||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
pub struct Token {
|
pub struct Token {
|
||||||
ty: Type,
|
ty: Type,
|
||||||
head: usize,
|
pub head: usize,
|
||||||
tail: usize,
|
pub tail: usize,
|
||||||
line: usize,
|
line: usize,
|
||||||
col: usize,
|
col: usize,
|
||||||
}
|
}
|
||||||
@ -127,6 +127,7 @@ pub mod token {
|
|||||||
pub fn cast(self, ty: Type) -> Self {
|
pub fn cast(self, ty: Type) -> Self {
|
||||||
Self { ty, ..self }
|
Self { ty, ..self }
|
||||||
}
|
}
|
||||||
|
// Hack to work around
|
||||||
pub fn rebound(self, head: usize, tail: usize) -> Self {
|
pub fn rebound(self, head: usize, tail: usize) -> Self {
|
||||||
Self { head, tail, ..self }
|
Self { head, tail, ..self }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user