HomePhabricator

Support class const dereferencing in xhpast

Authored by richardvanvelzen on Jun 17 2016, 9:50 AM.

Description

Support class const dereferencing in xhpast

Summary:
Ref T4334. As it turns out, a major overhaul of the syntax wasn't needed.

This adds support for stuff like SomeClass::SOME_CONST[$idx] which was introduced in PHP 7.

Test Plan: Added a test case. Ran tests on libphutil and arcanist with both PHP 5 and PHP 7.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin, Firehed

Maniphest Tasks: T4334

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