Skip to content

Commit b9d2b4b

Browse files
committed
Add back in command-line options
1 parent 5f37280 commit b9d2b4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/php-parse

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ if (empty($files)) {
2626
showHelp("Must specify at least one file.");
2727
}
2828

29-
$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
29+
$lexerOptions = ['usedAttributes' => [
30+
'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
31+
]];
32+
$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version'], $lexerOptions);
3033
$dumper = new PhpParser\NodeDumper([
3134
'dumpComments' => true,
3235
'dumpPositions' => $attributes['with-positions'],

0 commit comments

Comments
 (0)