Skip to content

Commit

Permalink
feat: implement getter functions for Token
Browse files Browse the repository at this point in the history
  • Loading branch information
nfejzic committed Mar 27, 2022
1 parent f10a561 commit 52da4d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions inline/src/lexer/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ impl Token {
None => self.kind.as_str(),
}
}

pub fn kind(&self) -> TokenKind {
self.kind
}

pub fn spacing(&self) -> Spacing {
self.spacing
}

pub fn span(&self) -> Span {
self.span
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down

0 comments on commit 52da4d6

Please sign in to comment.