Homec4science

Improve XHPAST parsing of various variable-variables.

Authored by epriestley <epriestley@javelinjs.com> on Feb 11 2011, 20:35.

Description

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

Details

Committed
epriestley <epriestley@javelinjs.com>Feb 11 2011, 21:35
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU84ae80af2131: Slightly improve the performance of XHPASTTree.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <epriestley@javelinjs.com> committed rPHUf019cdf4a883: Improve XHPAST parsing of various variable-variables. (authored by epriestley <epriestley@javelinjs.com>).Feb 11 2011, 21:35