Reduce size of Token.

This commit is contained in:
Stephen Chung
2022-02-26 23:18:47 +08:00
parent 61e6403ac6
commit b17e891b63
4 changed files with 34 additions and 24 deletions

View File

@@ -1326,7 +1326,7 @@ fn parse_primary(
segments.push(Expr::StringConstant(s.into(), pos));
}
}
(Token::LexError(err @ LexError::UnterminatedString), pos) => {
(Token::LexError(err), pos) if matches!(*err, LexError::UnterminatedString) => {
return Err(err.into_err(pos))
}
(token, ..) => unreachable!(