Closed davidrans closed 2 weeks ago
At a glance, this conditional needs to be updated to support type hint tokens proceeded by a constant list, then read_constant_declaration
needs to be updated to use read_optional_type.[^1] Finally, we'll need to throw that information into the ClassConstant constructor.
Traits, interfaces, and enums go through this path, so should be supported implicitly. So as long as there's no complications, that should be all that's necessary.
@czosel Are y'all currently accepting PRs? It's been a bit since an update, so want to confirm before embarking on any work.
[^1]: I'm not too familiar with this library and what it would consider a parser error vs runtime error, but it's worth noting that there are limitations on allowed types.
PR would be great
It looks like files that have typed constants are not parseable by the latest version (3.1.5).
Input file:
Error: