Fix handling of b" in token_get_all()
commit7834ded74e84bb0b626fb1a7e4f89a1789f9df1a
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 23 Mar 2017 20:38:41 +0000 (23 13:38 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 23 Mar 2017 20:58:01 +0000 (23 13:58 -0700)
treefe8157207ed00004f810f48ef5d2aa6a49fc5d57
parent27f48c731556fda474ab3d061b44f59a0bd68098
Fix handling of b" in token_get_all()

Summary:
In the best PHP tradition, "single-char" tokens can actually have
more than one character... In particular b" is considered a
single-char token and token_get_all() returns string "b\"" for it.
This change brings HHVM in line with PHP behavior. Previously
HHVM returned just "\"" in this case, dropping the "b" entirely.
Closes https://github.com/facebook/hhvm/pull/7712

Differential Revision: D4658367

Pulled By: Orvid

fbshipit-source-id: 068cd3c1bc4a4e30420c3e9eeec71baf55de60b5
hphp/parser/hphp.ll
hphp/parser/lex.yy.cpp
hphp/parser/scanner.h
hphp/runtime/ext/std/ext_std_misc.cpp
hphp/test/slow/ext_misc/token_get_all_bstring.php [new file with mode: 0644]
hphp/test/slow/ext_misc/token_get_all_bstring.php.expect [new file with mode: 0644]