Skip to content

Commit b17faf0

Browse files
committed
chore: remove unused code
1 parent baff03a commit b17faf0

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

crates/oxc_parser/src/modifiers.rs

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -447,31 +447,9 @@ impl<'a> ParserImpl<'a> {
447447

448448
fn parse_any_contextual_modifier(&mut self) -> bool {
449449
self.cur_kind().is_modifier_kind()
450-
&& self.try_parse(Self::try_next_token_is_on_same_line_and_can_follow_modifier).is_some()
451-
}
452-
453-
#[allow(unused)]
454-
fn next_token_can_follow_modifier(&mut self) {
455-
let b = match self.cur_kind() {
456-
Kind::Const => self.peek_at(Kind::Enum),
457-
Kind::Export => {
458-
self.bump_any();
459-
match self.cur_kind() {
460-
Kind::Default => self.lookahead(Self::next_token_can_follow_default_keyword),
461-
Kind::Type => self.lookahead(Self::next_token_can_follow_export_modifier),
462-
_ => self.can_follow_export_modifier(),
463-
}
464-
}
465-
Kind::Default => self.next_token_can_follow_default_keyword(),
466-
Kind::Static | Kind::Get | Kind::Set => {
467-
self.bump_any();
468-
self.can_follow_modifier()
469-
}
470-
_ => self.next_token_is_on_same_line_and_can_follow_modifier(),
471-
};
472-
if !b {
473-
self.set_unexpected();
474-
}
450+
&& self
451+
.try_parse(Self::try_next_token_is_on_same_line_and_can_follow_modifier)
452+
.is_some()
475453
}
476454

477455
fn try_next_token_is_on_same_line_and_can_follow_modifier(&mut self) {

0 commit comments

Comments
 (0)