diff --git a/crates/swc_ecma_parser/src/lexer/mod.rs b/crates/swc_ecma_parser/src/lexer/mod.rs index d513df1658c..7792c4dcbf0 100644 --- a/crates/swc_ecma_parser/src/lexer/mod.rs +++ b/crates/swc_ecma_parser/src/lexer/mod.rs @@ -283,12 +283,6 @@ impl<'a> Lexer<'a> { #[inline(never)] fn read_token_colon(&mut self) -> LexResult { self.input.bump(); - - if self.syntax.fn_bind() && self.input.cur() == Some(':') { - self.input.bump(); - return Ok(tok!("::")); - } - Ok(tok!(':')) } diff --git a/crates/swc_ecma_parser/src/macros.rs b/crates/swc_ecma_parser/src/macros.rs index b63d34bff5e..0dd0d2065cf 100644 --- a/crates/swc_ecma_parser/src/macros.rs +++ b/crates/swc_ecma_parser/src/macros.rs @@ -73,9 +73,6 @@ macro_rules! tok { (':') => { crate::token::Token::Colon }; - ("::") => { - crate::token::Token::ColonColon - }; ('.') => { crate::token::Token::Dot }; diff --git a/crates/swc_ecma_parser/src/token.rs b/crates/swc_ecma_parser/src/token.rs index f5ca0e42def..d5f04a59f5f 100644 --- a/crates/swc_ecma_parser/src/token.rs +++ b/crates/swc_ecma_parser/src/token.rs @@ -64,8 +64,6 @@ pub enum Token { }, /// ':' Colon, - /// '::' - ColonColon, /// BinOp(BinOpToken), /// @@ -132,7 +130,6 @@ impl Token { | Self::Semi | Self::Comma | Self::Colon - | Self::ColonColon | Self::AssignOp(..) | Self::DollarLBrace | Self::QuestionMark @@ -653,7 +650,6 @@ impl Debug for Token { BackQuote => write!(f, "`")?, Template { raw, .. } => write!(f, "template token ({})", raw)?, Colon => write!(f, ":")?, - ColonColon => write!(f, "::")?, BinOp(op) => write!(f, "{}", BinaryOp::from(*op).as_str())?, AssignOp(op) => write!(f, "{}", op.as_str())?, DollarLBrace => write!(f, "${{")?,