Re-add the leading : and % to XHP tokens in token_get_all
commit70163a18e2865946e7670440139bf408979c5df9
authorSimon Welsh <simon@simon.geek.nz>
Wed, 28 May 2014 19:56:50 +0000 (28 12:56 -0700)
committerJoelMarcey <joelm@fb.com>
Wed, 28 May 2014 23:04:49 +0000 (28 16:04 -0700)
treeb20736f1eb585bb3342b31e9e469ee0531df8845
parent8e52f38e71ada7a0df598c4c119ddff1077fb0f4
Re-add the leading : and % to XHP tokens in token_get_all

Summary: Special cases T_XHP_LABEL and T_XHP_CATEGORY_LABEL as their leading characters
are stripped be the lexer.

Fixes #2736
Closes #2754

Reviewed By: @fredemmott

Differential Revision: D1349006

Pulled By: @JoelMarcey
hphp/runtime/ext/ext_misc.cpp
hphp/test/slow/ext_misc/php_strip_whitespace_xhp.php [new file with mode: 0644]
hphp/test/slow/ext_misc/php_strip_whitespace_xhp.php.expect [new file with mode: 0644]
hphp/test/slow/ext_misc/token_get_all_xhp.php [new file with mode: 0644]
hphp/test/slow/ext_misc/token_get_all_xhp.php.expect [new file with mode: 0644]