Homec4science

Improve parsing of `use` statements

Authored by Joshua Spence <josh@freelancer.com> on Nov 19 2015, 20:47.

Description

Improve parsing of use statements

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:

{F976619, size=full}

After this change, it is instead parsed as:

{F976621, size=full}

Test Plan: Added a test case.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14518

Details

Committed
Joshua Spence <josh@freelancer.com>Nov 19 2015, 20:48
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU44113cfd0db1: Add an `XHPAST::getNamespace()` method
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@freelancer.com> committed rPHUe8eaafe04d64: Improve parsing of `use` statements (authored by Joshua Spence <josh@freelancer.com>).Nov 19 2015, 20:48