Index: src/parser/xhpast/__tests__/PHPASTParserTestCase.php =================================================================== --- src/parser/xhpast/__tests__/PHPASTParserTestCase.php +++ src/parser/xhpast/__tests__/PHPASTParserTestCase.php @@ -53,6 +53,9 @@ } $type = $key; break; + case 'comment': + // Human readable comment providing test case information. + break; default: throw new Exception( pht( Index: src/parser/xhpast/__tests__/data/php-comments.php.expect =================================================================== --- /dev/null +++ src/parser/xhpast/__tests__/data/php-comments.php.expect @@ -0,0 +1,59 @@ +{ + "tree" : [ + 9000, + 0, + 8, + [ + [ + 9006, + 0, + 0, + [ + [ + 9007, + 0, + 0 + ] + ] + ] + ] + ], + "stream" : [ + [ + 371, + 6 + ], + [ + 375, + 1 + ], + [ + 369, + 10 + ], + [ + 369, + 11 + ], + [ + 369, + 13 + ], + [ + 375, + 1 + ], + [ + 370, + 18 + ], + [ + 375, + 1 + ], + [ + 369, + 24 + ] + ] +} Index: src/parser/xhpast/__tests__/data/php-comments.php.test =================================================================== --- /dev/null +++ src/parser/xhpast/__tests__/data/php-comments.php.test @@ -0,0 +1,10 @@ +# pass + + + + +