mirror of
https://github.com/swc-project/swc.git
synced 2024-11-24 02:06:08 +03:00
refactor(es/parser): Remove ::
token as it's not used (#7268)
This commit is contained in:
parent
0e1435a97f
commit
635bf8116b
@ -283,12 +283,6 @@ impl<'a> Lexer<'a> {
|
||||
#[inline(never)]
|
||||
fn read_token_colon(&mut self) -> LexResult<Token> {
|
||||
self.input.bump();
|
||||
|
||||
if self.syntax.fn_bind() && self.input.cur() == Some(':') {
|
||||
self.input.bump();
|
||||
return Ok(tok!("::"));
|
||||
}
|
||||
|
||||
Ok(tok!(':'))
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,6 @@ macro_rules! tok {
|
||||
(':') => {
|
||||
crate::token::Token::Colon
|
||||
};
|
||||
("::") => {
|
||||
crate::token::Token::ColonColon
|
||||
};
|
||||
('.') => {
|
||||
crate::token::Token::Dot
|
||||
};
|
||||
|
@ -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, "${{")?,
|
||||
|
Loading…
Reference in New Issue
Block a user