doctrine / lexer

Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
https://www.doctrine-project.org/projects/lexer.html
MIT License
11.05k stars 60 forks source link

Leverage conditional types #99

Closed greg0ire closed 1 year ago

greg0ire commented 1 year ago

This should help downstream projects stop wondering if null checks are necessary.

For instance, when I try running Psalm on doctrine/orm with 2.1.x@dev, at the moment I still get 100 errors despite #95 . A lot of them are about possibly null arguments, when the argument is $someToken['value'].