Move "kind" attribute handling out of lexer

Doesn't belong there and will cause issue with multiple assignments.
This commit is contained in:
Nikita Popov
2016-03-10 12:51:47 +01:00
parent aa199120c7
commit f493219c7d
9 changed files with 41 additions and 36 deletions

View File

@ -27,7 +27,7 @@ if (empty($files)) {
}
$lexer = new PhpParser\Lexer\Emulative(array('usedAttributes' => array(
'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments', 'kind'
'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
)));
$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer);
$dumper = new PhpParser\NodeDumper(['dumpComments' => true]);