From 94ca9a7ab9a9eff7fa15a4a173a8735755ed30f8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 13 Nov 2017 01:14:55 +0100 Subject: [PATCH] Use Tokens::class in lexer Ref #441. --- lib/PhpParser/Lexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index bdda8a5..75d3f35 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -360,7 +360,7 @@ class Lexer if ('T_HASHBANG' === $name) { // HHVM uses a special token for #! hashbang lines $tokenMap[$i] = Tokens::T_INLINE_HTML; - } else if (defined($name = 'PhpParser\Parser\Tokens::' . $name)) { + } else if (defined($name = Tokens::class . '::' . $name)) { // Other tokens can be mapped directly $tokenMap[$i] = constant($name); }