Page MenuHomePhabricator

Improve parsing of `use` statements
ClosedPublic

Authored by joshuaspence on Nov 19 2015, 8:50 AM.
Tags
None
Referenced Files
F14006826: D14518.id35128.diff
Mon, Oct 28, 6:45 PM
F14000559: D14518.id.diff
Thu, Oct 24, 10:52 PM
F13991232: D14518.diff
Tue, Oct 22, 9:25 AM
F13989414: D14518.id35128.diff
Mon, Oct 21, 8:18 PM
F13969871: D14518.id35120.diff
Thu, Oct 17, 4:16 AM
Unknown Object (File)
Sun, Oct 13, 5:26 PM
Unknown Object (File)
Tue, Oct 8, 3:25 AM
Unknown Object (File)
Mon, Oct 7, 1:55 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.