Page MenuHomePhabricator

Let PhutilTypeLexer support qualified names

Authored by wjiang on Dec 1 2016, 1:05 AM.



Ref T11933. This lets PhutilTypeLexer support qualified names.

Test Plan

Unit test

Diff Detail

rPHU libphutil
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wjiang retitled this revision from to Let PhutilTypeLexer support qualified names.
wjiang updated this object.
wjiang edited the test plan for this revision. (Show Details)
wjiang added a reviewer: joshuaspence.
epriestley added a reviewer: epriestley.

This change is fine, but I think the new expression is too permissive. Let's add these "good" test cases:


And these "bad" test cases:


I think some of those won't pass; adjust the regular expression until they do.

(I think all those bad cases are actually illegal, but I haven't used namespaces in PHP very much so my understanding of the syntax may be incorrect.)

This revision now requires changes to proceed.Dec 1 2016, 1:15 AM
wjiang edited edge metadata.
  • Add more tests and fix regex
wjiang edited edge metadata.
  • fix tests
This revision is now accepted and ready to land.Dec 1 2016, 1:50 AM
This revision was automatically updated to reflect the committed changes.