cl-token: make Token fields public
No sense in having them private, they're just plain old data.
This commit is contained in:
parent
290ede2fa3
commit
21c9909f0c
@ -5,10 +5,10 @@ use super::{TokenData, TokenKind};
|
|||||||
/// and an optional bit of [TokenData]
|
/// and an optional bit of [TokenData]
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub struct Token {
|
pub struct Token {
|
||||||
ty: TokenKind,
|
pub ty: TokenKind,
|
||||||
data: TokenData,
|
pub data: TokenData,
|
||||||
line: u32,
|
pub line: u32,
|
||||||
col: u32,
|
pub col: u32,
|
||||||
}
|
}
|
||||||
impl Token {
|
impl Token {
|
||||||
/// Creates a new [Token] out of a [TokenKind], [TokenData], line, and column.
|
/// Creates a new [Token] out of a [TokenKind], [TokenData], line, and column.
|
||||||
|
Loading…
Reference in New Issue
Block a user