diff options
Diffstat (limited to 'users/tazjin/rlox/src/scanner.rs')
-rw-r--r-- | users/tazjin/rlox/src/scanner.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/users/tazjin/rlox/src/scanner.rs b/users/tazjin/rlox/src/scanner.rs index 2eed89bd6beb..eeb247d9bd53 100644 --- a/users/tazjin/rlox/src/scanner.rs +++ b/users/tazjin/rlox/src/scanner.rs @@ -1,6 +1,6 @@ use crate::errors::{Error, ErrorKind}; -#[derive(Debug)] +#[derive(Debug, PartialEq)] pub enum TokenKind { // Single-character tokens. LeftParen, @@ -54,10 +54,9 @@ pub enum TokenKind { #[derive(Debug)] pub struct Token<'a> { - kind: TokenKind, - lexeme: &'a [char], - // literal: Object, // TODO(tazjin): Uhh? - line: usize, + pub kind: TokenKind, + pub lexeme: &'a [char], + pub line: usize, } struct Scanner<'a> { |