Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions crates/oxc_parser/src/js/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,7 @@ impl<'a> ParserImpl<'a> {
}

let kind = self.cur_kind();
if kind.is_identifier_or_keyword()
|| kind.is_number()
|| kind == Kind::Star
|| kind == Kind::LBrack
{
if kind.is_identifier_or_keyword() || kind == Kind::Star || kind == Kind::LBrack {
let is_ambient = modifiers.contains(ModifierKind::Declare);
return if is_ambient {
self.context(Context::Ambient, Context::empty(), |p| {
Expand Down
4 changes: 1 addition & 3 deletions crates/oxc_parser/src/lexer/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,7 @@ impl Kind {

#[inline]
pub fn is_identifier_or_keyword(self) -> bool {
self.is_literal_property_name()
|| matches!(self, Self::PrivateIdentifier)
|| self.is_all_keyword()
self.is_literal_property_name() || matches!(self, Self::PrivateIdentifier)
}

#[inline]
Expand Down
Loading