Remove obsolete code

This commit is contained in:
Fabien Potencier
2025-02-14 08:38:17 +01:00
parent 4b57f48a65
commit 561c6629e1
+1 -6
View File
@@ -342,15 +342,10 @@ class Lexer
// operators
elseif (preg_match($this->regexes['operator'], $this->code, $match, 0, $this->cursor)) {
$operator = preg_replace('/\s+/', ' ', $match[0]);
$type = Token::OPERATOR_TYPE;
// to be removed in 4.0
if (str_contains(self::PUNCTUATION, $operator)) {
$type = Token::PUNCTUATION_TYPE;
}
if (in_array($operator, $this->openingBrackets)) {
$this->checkBrackets($operator);
}
$this->pushToken($type, $operator);
$this->pushToken(Token::OPERATOR_TYPE, $operator);
$this->moveCursor($match[0]);
}
// names