Upgrade Guide to v5.0 -- typo error on Changes to the lexer chapter
llaville opened this issue · comments
Laurent Laville commented
Hello,
I've begin to migrate my code from v4.x to v5.0 and I found an error into the documentation :
https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md#changes-to-the-lexer
We can read
# After
$parser = (new ParserFactory())->createForNewestSupportedVersion();
$oldStmts = $parser->parse($code);
$oldTokens = $lexer->getTokens();
But I suppose we should read
# After
$parser = (new ParserFactory())->createForNewestSupportedVersion();
$oldStmts = $parser->parse($code);
$oldTokens = $parser->getTokens();
As tokens list are returned by the Parser now !