Page MenuHomePhabricator

Improve parsing of `use` statements
ClosedPublic

Authored by joshuaspence on Nov 19 2015, 8:50 AM.
Tags
None
Referenced Files
F13039411: D14518.diff
Tue, Apr 16, 7:23 AM
F13038249: D14518.diff
Mon, Apr 15, 11:54 PM
Unknown Object (File)
Tue, Apr 9, 2:45 AM
Unknown Object (File)
Sun, Apr 7, 6:49 PM
Unknown Object (File)
Fri, Apr 5, 8:35 AM
Unknown Object (File)
Thu, Mar 21, 3:38 PM
Unknown Object (File)
Mar 6 2024, 5:23 AM
Unknown Object (File)
Mar 5 2024, 2:25 AM
Subscribers

Details

Summary

The way that we parse use statements at the moment is a bit odd. For example, consider the following example:

<?php

use A\B\C;
use X\Y\Z;

This is currently parsed as:

xhpast-before.png (336×182 px, 8 KB)

After this change, it is instead parsed as:

xhpast-after.png (279×166 px, 7 KB)

Test Plan

Added a test case.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Improve parsing on `use` statements.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 19 2015, 4:34 PM
joshuaspence retitled this revision from Improve parsing on `use` statements to Improve parsing of `use` statements.Nov 19 2015, 7:47 PM
joshuaspence edited edge metadata.
This revision was automatically updated to reflect the committed changes.