Deduplicate Edition enum

This commit is contained in:
Lukas Wirth 2024-04-14 15:29:01 +02:00
parent e7852803c5
commit 9c75e9fa7d
8 changed files with 65 additions and 62 deletions

View file

@ -8,6 +8,7 @@ use limit::Limit;
use crate::{
event::Event,
input::Input,
Edition,
SyntaxKind::{self, EOF, ERROR, TOMBSTONE},
TokenSet, T,
};
@ -29,13 +30,6 @@ pub(crate) struct Parser<'t> {
_edition: Edition,
}
#[non_exhaustive]
pub enum Edition {
Edition2015,
Edition2018,
Edition2021,
}
static PARSER_STEP_LIMIT: Limit = Limit::new(15_000_000);
impl<'t> Parser<'t> {