mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Circumvent token_get_all bug with b"$var"
This commit is contained in:
parent
460f981e84
commit
9fba1df4e0
@ -76,9 +76,16 @@ class PHPParser_Lexer
|
||||
$token = $this->tokens[$this->pos];
|
||||
|
||||
if (is_string($token)) {
|
||||
$value = $token;
|
||||
$line = $this->line;
|
||||
return ord($token);
|
||||
$line = $this->line;
|
||||
|
||||
// bug in token_get_all
|
||||
if ('b"' === $token) {
|
||||
$value = 'b"';
|
||||
return ord('"');
|
||||
} else {
|
||||
$value = $token;
|
||||
return ord($token);
|
||||
}
|
||||
} else {
|
||||
$this->line += substr_count($token[1], "\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user