Page MenuHomePhabricator

D14614.diff
No OneTemporary

D14614.diff

diff --git a/src/parser/xhpast/__tests__/data/closure.php.test b/src/parser/xhpast/__tests__/data/closure.php.test
new file mode 100644
--- /dev/null
+++ b/src/parser/xhpast/__tests__/data/closure.php.test
@@ -0,0 +1,286 @@
+<?php
+
+$x = function ($y) use ($z) {
+ return $y + $z;
+};
+~~~~~~~~~~
+pass
+~~~~~~~~~~
+{
+ "tree": [
+ 9000,
+ 0,
+ 31,
+ [
+ [
+ 9006,
+ 0,
+ 30,
+ [
+ [
+ 9007,
+ 0,
+ 0
+ ],
+ [
+ 9004,
+ 2,
+ 30,
+ [
+ [
+ 9077,
+ 2,
+ 29,
+ [
+ [
+ 9047,
+ 2,
+ 2
+ ],
+ [
+ 9081,
+ 4,
+ 4
+ ],
+ [
+ 9050,
+ 6,
+ 29,
+ [
+ [
+ 9005
+ ],
+ [
+ 9005
+ ],
+ [
+ 9005
+ ],
+ [
+ 9059,
+ 8,
+ 10,
+ [
+ [
+ 9060,
+ 9,
+ 9,
+ [
+ [
+ 9005
+ ],
+ [
+ 9047,
+ 9,
+ 9
+ ],
+ [
+ 9005
+ ]
+ ]
+ ]
+ ]
+ ],
+ [
+ 9114,
+ 12,
+ 15,
+ [
+ [
+ 9085,
+ 14,
+ 16,
+ [
+ [
+ 9047,
+ 15,
+ 15
+ ]
+ ]
+ ]
+ ]
+ ],
+ [
+ 9006,
+ 18,
+ 29,
+ [
+ [
+ 9004,
+ 20,
+ 27,
+ [
+ [
+ 9027,
+ 20,
+ 26,
+ [
+ [
+ 9077,
+ 22,
+ 26,
+ [
+ [
+ 9047,
+ 22,
+ 22
+ ],
+ [
+ 9081,
+ 24,
+ 24
+ ],
+ [
+ 9047,
+ 26,
+ 26
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ],
+ "stream": [
+ [
+ 371,
+ 5
+ ],
+ [
+ 375,
+ 2
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 61,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 337,
+ 8
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 40,
+ 1
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 41,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 343,
+ 3
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 40,
+ 1
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 41,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 123,
+ 1
+ ],
+ [
+ 375,
+ 3
+ ],
+ [
+ 339,
+ 6
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 43,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 311,
+ 2
+ ],
+ [
+ 59,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ],
+ [
+ 125,
+ 1
+ ],
+ [
+ 59,
+ 1
+ ],
+ [
+ 375,
+ 1
+ ]
+ ]
+}
diff --git a/src/parser/xhpast/parser_nodes.php b/src/parser/xhpast/parser_nodes.php
--- a/src/parser/xhpast/parser_nodes.php
+++ b/src/parser/xhpast/parser_nodes.php
@@ -118,5 +118,6 @@
9111 => 'n_TRAIT_AS',
9112 => 'n_YIELD',
9113 => 'n_FINALLY',
+ 9114 => 'n_USE_LEXICAL_VARIABLES',
);
}
diff --git a/support/xhpast/generate_nodes.php b/support/xhpast/generate_nodes.php
--- a/support/xhpast/generate_nodes.php
+++ b/support/xhpast/generate_nodes.php
@@ -119,6 +119,7 @@
'n_TRAIT_AS',
'n_YIELD',
'n_FINALLY',
+ 'n_USE_LEXICAL_VARIABLES',
);
$nodes = array_combine(
diff --git a/support/xhpast/parser.y b/support/xhpast/parser.y
--- a/support/xhpast/parser.y
+++ b/support/xhpast/parser.y
@@ -1919,9 +1919,11 @@
$$ = NNEW(n_EMPTY);
}
| T_USE '(' lexical_var_list ')' {
- NTYPE($1, n_LEXICAL_VARIABLE_LIST);
- $1->appendChildren($3);
- $$ = $1;
+ $$ = NNEW(n_USE_LEXICAL_VARIABLES);
+ NMORE($$, $1);
+ NMORE($3, $2);
+ $$->appendChild($3);
+ NMORE($3, $4);
}
;
diff --git a/support/xhpast/parser.yacc.cpp b/support/xhpast/parser.yacc.cpp
--- a/support/xhpast/parser.yacc.cpp
+++ b/support/xhpast/parser.yacc.cpp
@@ -651,22 +651,22 @@
1720, 1726, 1732, 1738, 1744, 1750, 1756, 1762, 1768, 1769,
1770, 1778, 1786, 1787, 1792, 1797, 1802, 1807, 1812, 1817,
1822, 1827, 1832, 1836, 1837, 1838, 1839, 1844, 1850, 1864,
- 1887, 1893, 1899, 1905, 1914, 1918, 1921, 1929, 1932, 1937,
- 1941, 1950, 1955, 1962, 1968, 1977, 1986, 1995, 2004, 2012,
- 2015, 2018, 2022, 2029, 2032, 2036, 2043, 2044, 2048, 2063,
- 2067, 2070, 2076, 2082, 2085, 2089, 2097, 2100, 2106, 2109,
- 2112, 2115, 2118, 2121, 2124, 2127, 2130, 2133, 2136, 2139,
- 2145, 2146, 2147, 2151, 2155, 2160, 2165, 2170, 2175, 2179,
- 2187, 2188, 2189, 2190, 2193, 2196, 2200, 2203, 2209, 2212,
- 2216, 2227, 2234, 2241, 2251, 2252, 2256, 2260, 2264, 2268,
- 2294, 2298, 2301, 2307, 2317, 2323, 2332, 2338, 2339, 2340,
- 2346, 2347, 2362, 2367, 2375, 2379, 2385, 2394, 2395, 2396,
- 2400, 2401, 2404, 2416, 2420, 2426, 2432, 2436, 2439, 2447,
- 2450, 2456, 2457, 2461, 2467, 2473, 2477, 2481, 2487, 2490,
- 2505, 2508, 2515, 2516, 2520, 2526, 2529, 2535, 2542, 2549,
- 2556, 2563, 2570, 2577, 2584, 2594, 2604, 2614, 2617, 2620,
- 2630, 2633, 2639, 2643, 2649, 2654, 2660, 2666, 2672, 2681,
- 2686, 2694, 2703, 2708
+ 1887, 1893, 1899, 1905, 1914, 1918, 1921, 1931, 1934, 1939,
+ 1943, 1952, 1957, 1964, 1970, 1979, 1988, 1997, 2006, 2014,
+ 2017, 2020, 2024, 2031, 2034, 2038, 2045, 2046, 2050, 2065,
+ 2069, 2072, 2078, 2084, 2087, 2091, 2099, 2102, 2108, 2111,
+ 2114, 2117, 2120, 2123, 2126, 2129, 2132, 2135, 2138, 2141,
+ 2147, 2148, 2149, 2153, 2157, 2162, 2167, 2172, 2177, 2181,
+ 2189, 2190, 2191, 2192, 2195, 2198, 2202, 2205, 2211, 2214,
+ 2218, 2229, 2236, 2243, 2253, 2254, 2258, 2262, 2266, 2270,
+ 2296, 2300, 2303, 2309, 2319, 2325, 2334, 2340, 2341, 2342,
+ 2348, 2349, 2364, 2369, 2377, 2381, 2387, 2396, 2397, 2398,
+ 2402, 2403, 2406, 2418, 2422, 2428, 2434, 2438, 2441, 2449,
+ 2452, 2458, 2459, 2463, 2469, 2475, 2479, 2483, 2489, 2492,
+ 2507, 2510, 2517, 2518, 2522, 2528, 2531, 2537, 2544, 2551,
+ 2558, 2565, 2572, 2579, 2586, 2596, 2606, 2616, 2619, 2622,
+ 2632, 2635, 2641, 2645, 2651, 2656, 2662, 2668, 2674, 2683,
+ 2688, 2696, 2705, 2710
};
#endif
@@ -6141,85 +6141,87 @@
case 286:
#line 1921 "parser.y" /* yacc.c:1646 */
{
- NTYPE((yyvsp[-3]), n_LEXICAL_VARIABLE_LIST);
- (yyvsp[-3])->appendChildren((yyvsp[-1]));
- (yyval) = (yyvsp[-3]);
+ (yyval) = NNEW(n_USE_LEXICAL_VARIABLES);
+ NMORE((yyval), (yyvsp[-3]));
+ NMORE((yyvsp[-1]), (yyvsp[-2]));
+ (yyval)->appendChild((yyvsp[-1]));
+ NMORE((yyvsp[-1]), (yyvsp[0]));
}
-#line 6149 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6151 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 287:
-#line 1929 "parser.y" /* yacc.c:1646 */
+#line 1931 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-2])->appendChild(NTYPE((yyvsp[0]), n_VARIABLE));
}
-#line 6157 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6159 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 288:
-#line 1932 "parser.y" /* yacc.c:1646 */
+#line 1934 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-1]), n_VARIABLE_REFERENCE);
(yyvsp[-1])->appendChild(NTYPE((yyvsp[0]), n_VARIABLE));
(yyval) = (yyvsp[-3])->appendChild((yyvsp[-1]));
}
-#line 6167 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6169 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 289:
-#line 1937 "parser.y" /* yacc.c:1646 */
+#line 1939 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_LEXICAL_VARIABLE_LIST);
(yyval)->appendChild(NTYPE((yyvsp[0]), n_VARIABLE));
}
-#line 6176 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6178 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 290:
-#line 1941 "parser.y" /* yacc.c:1646 */
+#line 1943 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-1]), n_VARIABLE_REFERENCE);
(yyvsp[-1])->appendChild(NTYPE((yyvsp[0]), n_VARIABLE));
(yyval) = NNEW(n_LEXICAL_VARIABLE_LIST);
(yyval)->appendChild((yyvsp[-1]));
}
-#line 6187 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6189 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 291:
-#line 1950 "parser.y" /* yacc.c:1646 */
+#line 1952 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_FUNCTION_CALL);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6197 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6199 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 292:
-#line 1956 "parser.y" /* yacc.c:1646 */
+#line 1958 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[-3]), (yyvsp[-5]));
(yyval) = NNEW(n_FUNCTION_CALL);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6208 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6210 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 293:
-#line 1962 "parser.y" /* yacc.c:1646 */
+#line 1964 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[-3]), (yyvsp[-4]));
(yyval) = NNEW(n_FUNCTION_CALL);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6219 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6221 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 294:
-#line 1969 "parser.y" /* yacc.c:1646 */
+#line 1971 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-5]));
@@ -6228,11 +6230,11 @@
(yyval) = NNEW(n_FUNCTION_CALL)->appendChild((yyval));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6232 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6234 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 295:
-#line 1978 "parser.y" /* yacc.c:1646 */
+#line 1980 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-5]));
@@ -6241,11 +6243,11 @@
(yyval) = NNEW(n_FUNCTION_CALL)->appendChild((yyval));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6245 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6247 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 296:
-#line 1987 "parser.y" /* yacc.c:1646 */
+#line 1989 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-5]));
@@ -6254,11 +6256,11 @@
(yyval) = NNEW(n_FUNCTION_CALL)->appendChild((yyval));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6258 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6260 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 297:
-#line 1996 "parser.y" /* yacc.c:1646 */
+#line 1998 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-5]));
@@ -6267,81 +6269,81 @@
(yyval) = NNEW(n_FUNCTION_CALL)->appendChild((yyval));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6271 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6273 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 298:
-#line 2004 "parser.y" /* yacc.c:1646 */
+#line 2006 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_FUNCTION_CALL);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 6281 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6283 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 299:
-#line 2012 "parser.y" /* yacc.c:1646 */
+#line 2014 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6289 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6291 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 300:
-#line 2015 "parser.y" /* yacc.c:1646 */
+#line 2017 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6297 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6299 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 301:
-#line 2018 "parser.y" /* yacc.c:1646 */
+#line 2020 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-2]));
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6306 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6308 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 302:
-#line 2022 "parser.y" /* yacc.c:1646 */
+#line 2024 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-1]));
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6315 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6317 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 303:
-#line 2029 "parser.y" /* yacc.c:1646 */
+#line 2031 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6323 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6325 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 304:
-#line 2032 "parser.y" /* yacc.c:1646 */
+#line 2034 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-2]));
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6332 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6334 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 305:
-#line 2036 "parser.y" /* yacc.c:1646 */
+#line 2038 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-1]));
(yyval) = NTYPE((yyvsp[0]), n_CLASS_NAME);
}
-#line 6341 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6343 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 308:
-#line 2051 "parser.y" /* yacc.c:1646 */
+#line 2053 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_OBJECT_PROPERTY_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
@@ -6354,282 +6356,282 @@
(yyval)->appendChild(*ii);
}
}
-#line 6358 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6360 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 310:
-#line 2067 "parser.y" /* yacc.c:1646 */
+#line 2069 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1])->appendChild((yyvsp[0]));
}
-#line 6366 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6368 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 311:
-#line 2070 "parser.y" /* yacc.c:1646 */
+#line 2072 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6374 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6376 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 312:
-#line 2076 "parser.y" /* yacc.c:1646 */
+#line 2078 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[0]);
}
-#line 6382 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6384 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 313:
-#line 2082 "parser.y" /* yacc.c:1646 */
+#line 2084 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6390 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6392 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 314:
-#line 2085 "parser.y" /* yacc.c:1646 */
+#line 2087 "parser.y" /* yacc.c:1646 */
{
NSPAN((yyvsp[-1]), n_EMPTY, (yyvsp[0]));
(yyval) = (yyvsp[-1]);
}
-#line 6399 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6401 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 315:
-#line 2089 "parser.y" /* yacc.c:1646 */
+#line 2091 "parser.y" /* yacc.c:1646 */
{
NSPAN((yyvsp[-2]), n_PARENTHETICAL_EXPRESSION, (yyvsp[0]));
(yyvsp[-2])->appendChild((yyvsp[-1]));
(yyval) = (yyvsp[-2]);
}
-#line 6409 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6411 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 316:
-#line 2097 "parser.y" /* yacc.c:1646 */
+#line 2099 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6417 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6419 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 317:
-#line 2100 "parser.y" /* yacc.c:1646 */
+#line 2102 "parser.y" /* yacc.c:1646 */
{
(yyval) = NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 6425 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6427 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 318:
-#line 2106 "parser.y" /* yacc.c:1646 */
+#line 2108 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_NUMERIC_SCALAR);
}
-#line 6433 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6435 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 319:
-#line 2109 "parser.y" /* yacc.c:1646 */
+#line 2111 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_NUMERIC_SCALAR);
}
-#line 6441 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6443 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 320:
-#line 2112 "parser.y" /* yacc.c:1646 */
+#line 2114 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_STRING_SCALAR);
}
-#line 6449 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6451 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 321:
-#line 2115 "parser.y" /* yacc.c:1646 */
+#line 2117 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6457 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6459 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 322:
-#line 2118 "parser.y" /* yacc.c:1646 */
+#line 2120 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6465 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6467 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 323:
-#line 2121 "parser.y" /* yacc.c:1646 */
+#line 2123 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6473 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6475 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 324:
-#line 2124 "parser.y" /* yacc.c:1646 */
+#line 2126 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6481 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6483 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 325:
-#line 2127 "parser.y" /* yacc.c:1646 */
+#line 2129 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6489 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6491 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 326:
-#line 2130 "parser.y" /* yacc.c:1646 */
+#line 2132 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6497 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6499 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 327:
-#line 2133 "parser.y" /* yacc.c:1646 */
+#line 2135 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6505 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6507 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 328:
-#line 2136 "parser.y" /* yacc.c:1646 */
+#line 2138 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_MAGIC_SCALAR);
}
-#line 6513 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6515 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 329:
-#line 2139 "parser.y" /* yacc.c:1646 */
+#line 2141 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_HEREDOC);
}
-#line 6521 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6523 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 332:
-#line 2147 "parser.y" /* yacc.c:1646 */
+#line 2149 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-2]));
(yyval) = (yyvsp[0]);
}
-#line 6530 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6532 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 333:
-#line 2151 "parser.y" /* yacc.c:1646 */
+#line 2153 "parser.y" /* yacc.c:1646 */
{
NMORE((yyvsp[0]), (yyvsp[-1]));
(yyval) = (yyvsp[0]);
}
-#line 6539 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6541 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 334:
-#line 2155 "parser.y" /* yacc.c:1646 */
+#line 2157 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_UNARY_PREFIX_EXPRESSION);
(yyval)->appendChild(NTYPE((yyvsp[-1]), n_OPERATOR));
(yyval)->appendChild((yyvsp[0]));
}
-#line 6549 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6551 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 335:
-#line 2160 "parser.y" /* yacc.c:1646 */
+#line 2162 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_UNARY_PREFIX_EXPRESSION);
(yyval)->appendChild(NTYPE((yyvsp[-1]), n_OPERATOR));
(yyval)->appendChild((yyvsp[0]));
}
-#line 6559 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6561 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 336:
-#line 2165 "parser.y" /* yacc.c:1646 */
+#line 2167 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-3]), n_ARRAY_LITERAL);
(yyvsp[-3])->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
(yyval) = (yyvsp[-3]);
}
-#line 6569 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6571 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 337:
-#line 2170 "parser.y" /* yacc.c:1646 */
+#line 2172 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-2]), n_ARRAY_LITERAL);
(yyvsp[-2])->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
(yyval) = (yyvsp[-2]);
}
-#line 6579 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6581 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 339:
-#line 2179 "parser.y" /* yacc.c:1646 */
+#line 2181 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-2]));
(yyval)->appendChild(NTYPE((yyvsp[0]), n_STRING));
}
-#line 6589 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6591 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 343:
-#line 2190 "parser.y" /* yacc.c:1646 */
+#line 2192 "parser.y" /* yacc.c:1646 */
{
(yyval) = NMORE((yyvsp[0]), (yyvsp[-2]));
}
-#line 6597 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6599 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 344:
-#line 2193 "parser.y" /* yacc.c:1646 */
+#line 2195 "parser.y" /* yacc.c:1646 */
{
(yyval) = NMORE((yyvsp[0]), (yyvsp[-1]));
}
-#line 6605 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6607 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 346:
-#line 2200 "parser.y" /* yacc.c:1646 */
+#line 2202 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE_LIST);
}
-#line 6613 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6615 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 347:
-#line 2203 "parser.y" /* yacc.c:1646 */
+#line 2205 "parser.y" /* yacc.c:1646 */
{
(yyval) = NMORE((yyvsp[-1]), (yyvsp[0]));
}
-#line 6621 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6623 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 348:
-#line 2209 "parser.y" /* yacc.c:1646 */
+#line 2211 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6629 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6631 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 350:
-#line 2220 "parser.y" /* yacc.c:1646 */
+#line 2222 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-2]));
@@ -6637,11 +6639,11 @@
(yyval) = (yyvsp[-4])->appendChild((yyval));
}
-#line 6641 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6643 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 351:
-#line 2227 "parser.y" /* yacc.c:1646 */
+#line 2229 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -6649,11 +6651,11 @@
(yyval) = (yyvsp[-2])->appendChild((yyval));
}
-#line 6653 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6655 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 352:
-#line 2234 "parser.y" /* yacc.c:1646 */
+#line 2236 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-2]));
@@ -6661,11 +6663,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 6665 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6667 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 353:
-#line 2241 "parser.y" /* yacc.c:1646 */
+#line 2243 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -6673,11 +6675,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 6677 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6679 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 359:
-#line 2271 "parser.y" /* yacc.c:1646 */
+#line 2273 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_OBJECT_PROPERTY_ACCESS);
(yyval)->appendChild((yyvsp[-4]));
@@ -6701,27 +6703,27 @@
}
}
}
-#line 6705 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6707 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 361:
-#line 2298 "parser.y" /* yacc.c:1646 */
+#line 2300 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-1])->appendChildren((yyvsp[0]));
}
-#line 6713 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6715 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 362:
-#line 2301 "parser.y" /* yacc.c:1646 */
+#line 2303 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6721 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6723 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 363:
-#line 2307 "parser.y" /* yacc.c:1646 */
+#line 2309 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
(yyval)->appendChild((yyvsp[-1]));
@@ -6729,49 +6731,49 @@
(yyval)->appendChild((yyvsp[0]));
}
}
-#line 6733 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6735 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 364:
-#line 2317 "parser.y" /* yacc.c:1646 */
+#line 2319 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6744 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6746 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 365:
-#line 2323 "parser.y" /* yacc.c:1646 */
+#line 2325 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6755 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6757 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 366:
-#line 2332 "parser.y" /* yacc.c:1646 */
+#line 2334 "parser.y" /* yacc.c:1646 */
{
(yyval) = NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 6763 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6765 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 369:
-#line 2340 "parser.y" /* yacc.c:1646 */
+#line 2342 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6771 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6773 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 371:
-#line 2347 "parser.y" /* yacc.c:1646 */
+#line 2349 "parser.y" /* yacc.c:1646 */
{
xhpast::Node *last = (yyvsp[-1]);
NMORE((yyvsp[-1]), (yyvsp[0]));
@@ -6784,61 +6786,61 @@
(yyval) = (yyvsp[-1]);
}
-#line 6788 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6790 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 372:
-#line 2362 "parser.y" /* yacc.c:1646 */
+#line 2364 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-2]));
(yyval)->appendChild((yyvsp[0]));
}
-#line 6798 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6800 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 373:
-#line 2367 "parser.y" /* yacc.c:1646 */
+#line 2369 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-2]));
(yyval)->appendChild((yyvsp[0]));
}
-#line 6808 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6810 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 375:
-#line 2379 "parser.y" /* yacc.c:1646 */
+#line 2381 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6819 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6821 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 376:
-#line 2385 "parser.y" /* yacc.c:1646 */
+#line 2387 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6830 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6832 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 381:
-#line 2401 "parser.y" /* yacc.c:1646 */
+#line 2403 "parser.y" /* yacc.c:1646 */
{
(yyval) = NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 6838 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6840 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 382:
-#line 2404 "parser.y" /* yacc.c:1646 */
+#line 2406 "parser.y" /* yacc.c:1646 */
{
xhpast::Node *last = (yyvsp[-1]);
NMORE((yyvsp[-1]), (yyvsp[0]));
@@ -6851,114 +6853,114 @@
(yyval) = (yyvsp[-1]);
}
-#line 6855 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6857 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 384:
-#line 2420 "parser.y" /* yacc.c:1646 */
+#line 2422 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6866 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6868 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 385:
-#line 2426 "parser.y" /* yacc.c:1646 */
+#line 2428 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6877 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6879 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 387:
-#line 2436 "parser.y" /* yacc.c:1646 */
+#line 2438 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[0]), n_VARIABLE);
}
-#line 6885 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6887 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 388:
-#line 2439 "parser.y" /* yacc.c:1646 */
+#line 2441 "parser.y" /* yacc.c:1646 */
{
NSPAN((yyvsp[-3]), n_VARIABLE_EXPRESSION, (yyvsp[0]));
(yyvsp[-3])->appendChild((yyvsp[-1]));
(yyval) = (yyvsp[-3]);
}
-#line 6895 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6897 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 389:
-#line 2447 "parser.y" /* yacc.c:1646 */
+#line 2449 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 6903 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6905 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 390:
-#line 2450 "parser.y" /* yacc.c:1646 */
+#line 2452 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[0]);
}
-#line 6911 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6913 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 393:
-#line 2461 "parser.y" /* yacc.c:1646 */
+#line 2463 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6922 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6924 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 394:
-#line 2467 "parser.y" /* yacc.c:1646 */
+#line 2469 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 6933 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6935 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 396:
-#line 2477 "parser.y" /* yacc.c:1646 */
+#line 2479 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[0]), n_STRING);
(yyval) = (yyvsp[0]);
}
-#line 6942 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6944 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 397:
-#line 2481 "parser.y" /* yacc.c:1646 */
+#line 2483 "parser.y" /* yacc.c:1646 */
{
(yyval) = NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 6950 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6952 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 398:
-#line 2487 "parser.y" /* yacc.c:1646 */
+#line 2489 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[0]), n_VARIABLE_VARIABLE);
}
-#line 6958 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6960 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 399:
-#line 2490 "parser.y" /* yacc.c:1646 */
+#line 2492 "parser.y" /* yacc.c:1646 */
{
(yyvsp[0]) = NTYPE((yyvsp[0]), n_VARIABLE_VARIABLE);
@@ -6971,61 +6973,61 @@
(yyval) = (yyvsp[-1]);
}
-#line 6975 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6977 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 400:
-#line 2505 "parser.y" /* yacc.c:1646 */
+#line 2507 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-2])->appendChild((yyvsp[0]));
}
-#line 6983 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6985 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 401:
-#line 2508 "parser.y" /* yacc.c:1646 */
+#line 2510 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ASSIGNMENT_LIST);
(yyval)->appendChild((yyvsp[0]));
}
-#line 6992 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 6994 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 403:
-#line 2516 "parser.y" /* yacc.c:1646 */
+#line 2518 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_LIST);
(yyval)->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
}
-#line 7001 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7003 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 404:
-#line 2520 "parser.y" /* yacc.c:1646 */
+#line 2522 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
}
-#line 7009 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7011 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 405:
-#line 2526 "parser.y" /* yacc.c:1646 */
+#line 2528 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE_LIST);
}
-#line 7017 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7019 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 406:
-#line 2529 "parser.y" /* yacc.c:1646 */
+#line 2531 "parser.y" /* yacc.c:1646 */
{
(yyval) = NMORE((yyvsp[-1]), (yyvsp[0]));
}
-#line 7025 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7027 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 407:
-#line 2535 "parser.y" /* yacc.c:1646 */
+#line 2537 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-2]));
@@ -7033,11 +7035,11 @@
(yyval) = (yyvsp[-4])->appendChild((yyval));
}
-#line 7037 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7039 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 408:
-#line 2542 "parser.y" /* yacc.c:1646 */
+#line 2544 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -7045,11 +7047,11 @@
(yyval) = (yyvsp[-2])->appendChild((yyval));
}
-#line 7049 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7051 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 409:
-#line 2549 "parser.y" /* yacc.c:1646 */
+#line 2551 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-2]));
@@ -7057,11 +7059,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 7061 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7063 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 410:
-#line 2556 "parser.y" /* yacc.c:1646 */
+#line 2558 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -7069,11 +7071,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 7073 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7075 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 411:
-#line 2563 "parser.y" /* yacc.c:1646 */
+#line 2565 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-3]));
@@ -7081,11 +7083,11 @@
(yyval) = (yyvsp[-5])->appendChild((yyval));
}
-#line 7085 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7087 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 412:
-#line 2570 "parser.y" /* yacc.c:1646 */
+#line 2572 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -7093,11 +7095,11 @@
(yyval) = (yyvsp[-3])->appendChild((yyval));
}
-#line 7097 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7099 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 413:
-#line 2577 "parser.y" /* yacc.c:1646 */
+#line 2579 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild((yyvsp[-3]));
@@ -7105,11 +7107,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 7109 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7111 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 414:
-#line 2584 "parser.y" /* yacc.c:1646 */
+#line 2586 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_ARRAY_VALUE);
(yyval)->appendChild(NNEW(n_EMPTY));
@@ -7117,11 +7119,11 @@
(yyval) = NNEW(n_ARRAY_VALUE_LIST)->appendChild((yyval));
}
-#line 7121 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7123 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 415:
-#line 2594 "parser.y" /* yacc.c:1646 */
+#line 2596 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-3]), n_SYMBOL_NAME);
@@ -7132,11 +7134,11 @@
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-2]));
}
-#line 7136 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7138 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 416:
-#line 2604 "parser.y" /* yacc.c:1646 */
+#line 2606 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-3]), n_SYMBOL_NAME);
@@ -7147,27 +7149,27 @@
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-2]));
}
-#line 7151 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7153 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 417:
-#line 2614 "parser.y" /* yacc.c:1646 */
+#line 2616 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[-1]), n_INCLUDE_FILE)->appendChild((yyvsp[0]));
}
-#line 7159 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7161 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 418:
-#line 2617 "parser.y" /* yacc.c:1646 */
+#line 2619 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[-1]), n_INCLUDE_FILE)->appendChild((yyvsp[0]));
}
-#line 7167 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7169 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 419:
-#line 2620 "parser.y" /* yacc.c:1646 */
+#line 2622 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-3]), n_SYMBOL_NAME);
@@ -7178,146 +7180,146 @@
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-2]));
}
-#line 7182 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7184 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 420:
-#line 2630 "parser.y" /* yacc.c:1646 */
+#line 2632 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[-1]), n_INCLUDE_FILE)->appendChild((yyvsp[0]));
}
-#line 7190 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7192 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 421:
-#line 2633 "parser.y" /* yacc.c:1646 */
+#line 2635 "parser.y" /* yacc.c:1646 */
{
(yyval) = NTYPE((yyvsp[-1]), n_INCLUDE_FILE)->appendChild((yyvsp[0]));
}
-#line 7198 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7200 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 422:
-#line 2639 "parser.y" /* yacc.c:1646 */
+#line 2641 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_EMPTY);
(yyval)->appendChild((yyvsp[0]));
}
-#line 7207 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7209 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 423:
-#line 2643 "parser.y" /* yacc.c:1646 */
+#line 2645 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-2])->appendChild((yyvsp[0]));
}
-#line 7215 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7217 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 424:
-#line 2649 "parser.y" /* yacc.c:1646 */
+#line 2651 "parser.y" /* yacc.c:1646 */
{
NSPAN((yyvsp[-2]), n_PARENTHETICAL_EXPRESSION, (yyvsp[0]));
(yyvsp[-2])->appendChild((yyvsp[-1]));
(yyval) = (yyvsp[-2]);
}
-#line 7225 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7227 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 425:
-#line 2654 "parser.y" /* yacc.c:1646 */
+#line 2656 "parser.y" /* yacc.c:1646 */
{
(yyval) = NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]));
}
-#line 7233 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7235 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 426:
-#line 2660 "parser.y" /* yacc.c:1646 */
+#line 2662 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 7244 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7246 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 427:
-#line 2666 "parser.y" /* yacc.c:1646 */
+#line 2668 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild((yyvsp[-3]));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 7255 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7257 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 428:
-#line 2672 "parser.y" /* yacc.c:1646 */
+#line 2674 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_INDEX_ACCESS);
(yyval)->appendChild(NTYPE((yyvsp[-3]), n_STRING_SCALAR));
(yyval)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 7266 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7268 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 429:
-#line 2681 "parser.y" /* yacc.c:1646 */
+#line 2683 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-3]), n_ARRAY_LITERAL);
(yyvsp[-3])->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
(yyval) = (yyvsp[-3]);
}
-#line 7276 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7278 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 430:
-#line 2686 "parser.y" /* yacc.c:1646 */
+#line 2688 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-2]), n_ARRAY_LITERAL);
(yyvsp[-2])->appendChild(NEXPAND((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])));
(yyval) = (yyvsp[-2]);
}
-#line 7286 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7288 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 431:
-#line 2694 "parser.y" /* yacc.c:1646 */
+#line 2696 "parser.y" /* yacc.c:1646 */
{
NTYPE((yyvsp[-2]), n_NEW);
(yyvsp[-2])->appendChild((yyvsp[-1]));
(yyvsp[-2])->appendChild((yyvsp[0]));
(yyval) = (yyvsp[-2]);
}
-#line 7297 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7299 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 432:
-#line 2703 "parser.y" /* yacc.c:1646 */
+#line 2705 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-2]));
(yyval)->appendChild(NTYPE((yyvsp[0]), n_STRING));
}
-#line 7307 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7309 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 433:
-#line 2708 "parser.y" /* yacc.c:1646 */
+#line 2710 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_CLASS_STATIC_ACCESS);
(yyval)->appendChild((yyvsp[-2]));
(yyval)->appendChild(NTYPE((yyvsp[0]), n_STRING));
}
-#line 7317 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7319 "parser.yacc.cpp" /* yacc.c:1646 */
break;
-#line 7321 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 7323 "parser.yacc.cpp" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -7545,7 +7547,7 @@
#endif
return yyresult;
}
-#line 2715 "parser.y" /* yacc.c:1906 */
+#line 2717 "parser.y" /* yacc.c:1906 */
const char* yytokname(int tok) {
diff --git a/support/xhpast/parser_nodes.php b/support/xhpast/parser_nodes.php
--- a/support/xhpast/parser_nodes.php
+++ b/support/xhpast/parser_nodes.php
@@ -120,5 +120,6 @@
9111 => 'n_TRAIT_AS',
9112 => 'n_YIELD',
9113 => 'n_FINALLY',
+ 9114 => 'n_USE_LEXICAL_VARIABLES',
);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 3:02 AM (1 d, 14 h ago)
Storage Engine
amazon-s3
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
phabricator/secure/tw/5g/gyrvdnl2y3nbygn4
Default Alt Text
D14614.diff (47 KB)

Event Timeline