Improve XHPAST parsing of various variable-variables.
Summary:
XHPAST parsed stuff like "$$$$y" and "global $$$${'x'}" somewhat
awkwardly. Make the parse tree more sensible.
This patch is a little copy-and-pastey but the loops are slightly
different since some need to expand the token pointer ranges so I'm not
sure I can really pull it out. :/
Test Plan:
Parsed this program:
<?php
global $$$x;
$$$y;
global $${'x'};
$$$z->$$$q;
The output after this patch has nested nodes and relative reasonableness.
Differential Revision: 211781
Reviewed By: adonohue
Reviewers: adonohue
CC: epriestley, adonohue
Revert Plan:
OK