hack parser changes for xhp spread
commit747dc29b4e3c79e2cacc0ae9c687c3208d076c8c
authorNick Gavalas <njg@fb.com>
Tue, 14 Nov 2017 21:45:14 +0000 (14 13:45 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 14 Nov 2017 21:54:21 +0000 (14 13:54 -0800)
tree61921fdc7e692a604564a78799e0fcbbe7c3ab92
parentd4572b71aa599a0c58d515de6c32efb5f2ba9f1e
hack parser changes for xhp spread

Summary: These changes allow the legacy parser to support `{...expr}` syntax as a spread inside an XHP attribute list, according to the spec. There is some special casing in the parser around XHP, but most of that doesn't affect us here -- the nested expressions work exactly as expected.

Differential Revision: D6316240

fbshipit-source-id: 9b1e00ecf4e872fa6aa7b83768466bbb696aee18
hphp/hack/src/parser/parser_hack.ml
hphp/hack/test/typecheck/xhp_attr_spread_1.php [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_1.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_1.php.no_format [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_2.php [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_2.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_2.php.no_format [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_3.php [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_3.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/xhp_attr_spread_3.php.no_format [new file with mode: 0644]