From 99df8b86ae0089a2b395880963b882f594f55f89 Mon Sep 17 00:00:00 2001 From: nikic Date: Tue, 30 Sep 2014 20:55:43 +0200 Subject: [PATCH] Support HHVM T_ONUMBER token --- lib/PhpParser/Lexer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 182bfd5..59655a8 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -194,6 +194,11 @@ class Lexer } } + // HHVM uses a special token for numbers that overflow to double + if (defined('T_ONUMBER')) { + $tokenMap[T_ONUMBER] = Parser::T_DNUMBER; + } + return $tokenMap; } }