Fix tree for static arrays in XHPAST
Test Plan:
Test script:
<?php static $var1 = array(1 => 'one', 2 => 'two', 3 => 'three'); $var2 = array(1 => 'one', 2 => 'two', 3 => 'three');
Before, the tree for the static array was:
a node of type n_ARRAY_LITERAL: "array(1 => 'one', 2 => 'two', 3 => 'three')" a node of type n_ARRAY_VALUE: "1 => 'one', 2 => 'two', 3 => 'three'" a node of type n_NUMERIC_SCALAR: "1" a node of type n_STRING_SCALAR: "'one'" a node of type n_ARRAY_VALUE: "2 => 'two'" a node of type n_NUMERIC_SCALAR: "2" a node of type n_STRING_SCALAR: "'two'" a node of type n_ARRAY_VALUE: "3 => 'three'" a node of type n_NUMERIC_SCALAR: "3" a node of type n_STRING_SCALAR: "'three'"
Now it's the same as the non-static array:
a node of type n_ARRAY_VALUE_LIST: "1 => 'one', 2 => 'two', 3 => 'three'" a node of type n_ARRAY_VALUE: "1 => 'one'" a node of type n_NUMERIC_SCALAR: "1" a node of type n_STRING_SCALAR: "'one'" a node of type n_ARRAY_VALUE: "2 => 'two'" a node of type n_NUMERIC_SCALAR: "2" a node of type n_STRING_SCALAR: "'two'" a node of type n_ARRAY_VALUE: "3 => 'three'" a node of type n_NUMERIC_SCALAR: "3" a node of type n_STRING_SCALAR: "'three'"
Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Revert Plan:
Tags:
Differential Revision: 342