Skip to content

Commit

Permalink
Remove __LAST lexer variant
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasFA committed Jun 1, 2023
1 parent 53c5e9a commit 4a3da42
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/lexer/src/token_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ pub enum TokenKind {

#[error]
Error,

#[doc(hidden)]
__LAST,
}

impl TokenKind {
Expand Down Expand Up @@ -449,7 +446,7 @@ mod tests {
}

// Test with full coverage. An error here would be hard to debug
fn to_kw_or_not_to_kw() -> ([TokenKind; 25], [TokenKind; 37]) {
fn to_kw_or_not_to_kw() -> ([TokenKind; 25], [TokenKind; 36]) {
use crate::TokenKind::*;
let keywords = [
FnKw,
Expand Down Expand Up @@ -516,7 +513,6 @@ mod tests {
RBrace,
Comment,
Error,
__LAST,
];

let u: HashSet<TokenKind> = keywords.into_iter().chain(non_kw.into_iter()).collect();
Expand Down

0 comments on commit 4a3da42

Please sign in to comment.