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

Make the value of tokens templatable #102

Closed greg0ire closed 1 year ago

greg0ire commented 1 year ago

The ORM Lexer does not alter the type of token values in its getType() method. Having a way to restrict the type of token values to string should be very valuable from a static analysis point of view.

greg0ire commented 1 year ago

I reported one of the static analysis issues at https://github.com/vimeo/psalm/issues/8891, I need to deal with the other ones.

greg0ire commented 1 year ago

@derrabus @SenseException can you please review? :pray: