Skip to content

Commit 1fc1822

Browse files
committed
Switch parser creation to use new ParserFactory methods
1 parent c6c4157 commit 1fc1822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AST2Rascal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114

115115
$resolveNames = isset($opts['resolveNames']) ? true : false;
116116

117-
$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
117+
$parser = (new ParserFactory())->createForVersion(\PhpParser\PhpVersion::getNewestSupported());
118118
$printer = new RascalPrinter($file, $enableLocations, $relativeLocations, $uniqueIds, $prefix, $projectName, $addPHPDocs, $addDeclarations);
119119

120120
// First try parsing with the newest supported version of the parser

0 commit comments

Comments
 (0)