Adds support for attributes#69
Conversation
5c16bb6 to
a8b3ddf
Compare
|
Unfortunately, this adds a new conflict to the parser - and I don't see a way around that. Could you have a look at your convenience, @maxbrunsfeld? If I remove the conflict, these are the options provided by the builder: Relevant definition from documentation:
Note: I've not placed any restrictions on the parameter types, but allow parsing them to keep the parser simple. I assume any utility using the parser will handle this. Please correct me if that is a wrongful assumption and we should only parse strictly valid code (even though that might be tricky while supporting multiple PHP versions) |
|
It seems like in the existing grammar, |
…ters lead on disallowing comments starting with #[.
|
Thanks for your guidance, that did indeed do the trick! It does feels wrong to use a node named qualified_name to mean both qualified and unqualified, but I guess I'll try to address that later - if I find a suitable way. Thanks again! |
|
I agree; it'd be great to address that at some point. |
|
Peculiarly, according to the specification it seems to be correct... I'll have to study how other PHP parsers solve that before proposing a solution |
rfc
syntax documentation
Adds support for attributes on classes, methods, functions, parameters, properties and class constants.
Consequence of addition:
Checklist: