Page MenuHomePhabricator

D14570.diff
No OneTemporary

D14570.diff

diff --git a/src/parser/xhpast/__tests__/data/php-syntax.php.test b/src/parser/xhpast/__tests__/data/php-syntax.php.test
--- a/src/parser/xhpast/__tests__/data/php-syntax.php.test
+++ b/src/parser/xhpast/__tests__/data/php-syntax.php.test
@@ -2100,7 +2100,7 @@
[
9010,
414,
- 417,
+ 414,
[
[
9001,
@@ -2109,21 +2109,21 @@
],
[
9005
- ],
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 417,
+ 417,
+ [
[
- 9010,
- 417,
+ 9001,
417,
- [
- [
- 9001,
- 417,
- 417
- ],
- [
- 9005
- ]
- ]
+ 417
+ ],
+ [
+ 9005
]
]
]
@@ -2144,7 +2144,7 @@
[
9010,
422,
- 445,
+ 426,
[
[
9001,
@@ -2155,55 +2155,55 @@
9013,
426,
426
- ],
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 429,
+ 433,
+ [
[
- 9010,
+ 9001,
429,
- 433,
- [
- [
- 9001,
- 429,
- 429
- ],
- [
- 9013,
- 433,
- 433
- ]
- ]
+ 429
],
[
- 9010,
+ 9013,
+ 433,
+ 433
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 436,
+ 437,
+ [
+ [
+ 9001,
436,
- 437,
- [
- [
- 9001,
- 436,
- 437
- ],
- [
- 9005
- ]
- ]
+ 437
],
[
- 9010,
+ 9005
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 440,
+ 445,
+ [
+ [
+ 9001,
440,
+ 441
+ ],
+ [
+ 9013,
445,
- [
- [
- 9001,
- 440,
- 441
- ],
- [
- 9013,
- 445,
- 445
- ]
- ]
+ 445
]
]
]
diff --git a/src/parser/xhpast/__tests__/data/use.php.test b/src/parser/xhpast/__tests__/data/use.php.test
--- a/src/parser/xhpast/__tests__/data/use.php.test
+++ b/src/parser/xhpast/__tests__/data/use.php.test
@@ -126,7 +126,7 @@
[
9010,
24,
- 27,
+ 24,
[
[
9001,
@@ -135,21 +135,21 @@
],
[
9005
- ],
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 27,
+ 27,
+ [
[
- 9010,
- 27,
+ 9001,
27,
- [
- [
- 9001,
- 27,
- 27
- ],
- [
- 9005
- ]
- ]
+ 27
+ ],
+ [
+ 9005
]
]
]
@@ -170,7 +170,7 @@
[
9010,
32,
- 39,
+ 32,
[
[
9001,
@@ -179,23 +179,23 @@
],
[
9005
- ],
+ ]
+ ]
+ ],
+ [
+ 9010,
+ 35,
+ 39,
+ [
[
- 9010,
+ 9001,
35,
+ 35
+ ],
+ [
+ 9013,
39,
- [
- [
- 9001,
- 35,
- 35
- ],
- [
- 9013,
- 39,
- 39
- ]
- ]
+ 39
]
]
]
diff --git a/src/parser/xhpast/bin/PhutilXHPASTBinary.php b/src/parser/xhpast/bin/PhutilXHPASTBinary.php
--- a/src/parser/xhpast/bin/PhutilXHPASTBinary.php
+++ b/src/parser/xhpast/bin/PhutilXHPASTBinary.php
@@ -8,7 +8,7 @@
* This is the version that would be obtained with an up-to-date XHPAST
* build. The //actual// XHPAST build version may vary.
*/
- const EXPECTED_VERSION = '5.8.2';
+ const EXPECTED_VERSION = '5.8.3';
/**
* The XHPAST build version.
diff --git a/support/xhpast/parser.y b/support/xhpast/parser.y
--- a/support/xhpast/parser.y
+++ b/support/xhpast/parser.y
@@ -258,9 +258,8 @@
$$ = NNEW(n_STATEMENT)->appendChild($1);
}
| T_USE use_declarations ';' {
- NSPAN($1, n_USE_LIST, $2);
- $1->appendChild($2);
- $$ = NNEW(n_STATEMENT)->appendChild($1);
+ NMORE($2, $1);
+ $$ = NNEW(n_STATEMENT)->appendChild($2);
NMORE($$, $3);
}
| constant_declaration ';' {
@@ -274,7 +273,8 @@
$$ = $1->appendChild($3);
}
| use_declaration {
- NMORE($$, $1);
+ $$ = NNEW(n_USE_LIST);
+ $$->appendChild($1);
}
;
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
@@ -624,7 +624,7 @@
static const yytype_uint16 yyrline[] =
{
0, 207, 207, 213, 216, 222, 225, 231, 232, 233,
- 234, 239, 246, 252, 260, 266, 273, 276, 282, 287,
+ 234, 239, 246, 252, 260, 265, 272, 275, 282, 287,
293, 299, 309, 316, 326, 329, 335, 336, 337, 338,
346, 347, 353, 356, 359, 365, 368, 398, 417, 424,
432, 445, 452, 459, 466, 473, 480, 487, 494, 501,
@@ -3563,35 +3563,35 @@
case 14:
#line 260 "parser.y" /* yacc.c:1646 */
{
- NSPAN((yyvsp[-2]), n_USE_LIST, (yyvsp[-1]));
- (yyvsp[-2])->appendChild((yyvsp[-1]));
- (yyval) = NNEW(n_STATEMENT)->appendChild((yyvsp[-2]));
+ NMORE((yyvsp[-1]), (yyvsp[-2]));
+ (yyval) = NNEW(n_STATEMENT)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 3572 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 3571 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 15:
-#line 266 "parser.y" /* yacc.c:1646 */
+#line 265 "parser.y" /* yacc.c:1646 */
{
(yyval) = NNEW(n_STATEMENT)->appendChild((yyvsp[-1]));
NMORE((yyval), (yyvsp[0]));
}
-#line 3581 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 3580 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 16:
-#line 273 "parser.y" /* yacc.c:1646 */
+#line 272 "parser.y" /* yacc.c:1646 */
{
(yyval) = (yyvsp[-2])->appendChild((yyvsp[0]));
}
-#line 3589 "parser.yacc.cpp" /* yacc.c:1646 */
+#line 3588 "parser.yacc.cpp" /* yacc.c:1646 */
break;
case 17:
-#line 276 "parser.y" /* yacc.c:1646 */
+#line 275 "parser.y" /* yacc.c:1646 */
{
- NMORE((yyval), (yyvsp[0]));
+ (yyval) = NNEW(n_USE_LIST);
+ (yyval)->appendChild((yyvsp[0]));
}
#line 3597 "parser.yacc.cpp" /* yacc.c:1646 */
break;
diff --git a/support/xhpast/xhpast.cpp b/support/xhpast/xhpast.cpp
--- a/support/xhpast/xhpast.cpp
+++ b/support/xhpast/xhpast.cpp
@@ -12,7 +12,7 @@
int main(int argc, char* argv[]) {
if (argc != 1) {
// Coupling: modify also src/parser/xhpast/bin/PhutilXHPASTBinary.php
- cout << "5.8.2\n";
+ cout << "5.8.3\n";
return 0;
}

File Metadata

Mime Type
text/plain
Expires
Mon, May 20, 2:38 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6288638
Default Alt Text
D14570.diff (10 KB)

Event Timeline