D14498 wasn't quite correct. Specifically, it incorrectly parsed the following code:
<?php namespace A; class A {} class B {}
Differential D14506
Improve parsing of namespaces joshuaspence on Nov 18 2015, 1:34 AM. Authored by Tags None Referenced Files
Subscribers
Details
D14498 wasn't quite correct. Specifically, it incorrectly parsed the following code: <?php namespace A; class A {} class B {}
Diff Detail
Event Timeline
Comment Actions This would also make something like this parse badly: namespace A; class T { } namespace B; class T { } Here, the second namespace statement would be a child of the first (according to the grammar), even though they're both top-level. Comment Actions Hmm yeah, you are correct. I am wondering if maybe I should just revert D19948... It would still be possible to implement some sort of getNamespace() method (I think), but it would be significantly harder. |