Page MenuHomePhabricator

Let PhutilTypeLexer support qualified names
ClosedPublic

Authored by wjiang on Dec 1 2016, 1:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 1:39 PM
Unknown Object (File)
Tue, Apr 2, 5:34 PM
Unknown Object (File)
Sun, Mar 31, 3:57 AM
Unknown Object (File)
Mar 15 2024, 2:20 PM
Unknown Object (File)
Mar 15 2024, 2:20 PM
Unknown Object (File)
Mar 15 2024, 2:20 PM
Unknown Object (File)
Mar 10 2024, 9:42 AM
Unknown Object (File)
Mar 7 2024, 3:10 PM
Subscribers

Details

Summary

Ref T11933. This lets PhutilTypeLexer support qualified names.

Test Plan

Unit test

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
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:

\SomeClass
\Namespace\SomeClass
A\B\C
\A\B\C

And these "bad" test cases:

\
\\
\SomeClass\
SomeClass\

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.