Skip to content

Commit ca256f1

Browse files
committed
Remove inapplicable TODOs
1 parent 3b81f38 commit ca256f1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Parser.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,17 +959,15 @@ private function parseUnionTypeDeclarationList($parentNode, Closure $isTypeStart
959959
$delimiter = [$delimiterToken->kind];
960960
}
961961
$token = $this->getCurrentToken();
962-
// TODO ERROR CASE - no delimiter, but a param follows
963962
} while ($delimiterToken !== null);
964963

965964
$result->parent = $parentNode;
966965
if ($result->children === null) {
967966
return null;
968967
}
969968

970-
// Add a MissingToken so that this will warn about `function () : T| {}`
971-
// TODO: Make this a reusable abstraction?
972969
if (in_array(end($result->children)->kind ?? null, $delimiter, true)) {
970+
// Add a MissingToken so that this will warn about `function () : T| {}`
973971
$result->children[] = new MissingToken($expectedTypeKind, $this->token->fullStart);
974972
} elseif (count($result->children) === 1 && $result->children[0] instanceof ParenthesizedIntersectionType) {
975973
// dnf types with parenthesized intersection types are a union type of at least 2 types.

0 commit comments

Comments
 (0)