Changeset View
Changeset View
Standalone View
Standalone View
scripts/symbols/generate_php_symbols.php
| Show All 21 Lines | if (posix_isatty(STDIN)) { | ||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| $input = file_get_contents('php://stdin'); | $input = file_get_contents('php://stdin'); | ||||
| $data = array(); | $data = array(); | ||||
| $futures = array(); | $futures = array(); | ||||
| foreach (explode("\n", trim($input)) as $file) { | foreach (explode("\n", trim($input)) as $file) { | ||||
| if (!strlen($file)) { | |||||
| continue; | |||||
| } | |||||
| $file = Filesystem::readablePath($file); | $file = Filesystem::readablePath($file); | ||||
| $data[$file] = Filesystem::readFile($file); | $data[$file] = Filesystem::readFile($file); | ||||
| $futures[$file] = PhutilXHPASTBinary::getParserFuture($data[$file]); | $futures[$file] = PhutilXHPASTBinary::getParserFuture($data[$file]); | ||||
| } | } | ||||
| $futures = new FutureIterator($futures); | $futures = new FutureIterator($futures); | ||||
| foreach ($futures->limit(8) as $file => $future) { | foreach ($futures->limit(8) as $file => $future) { | ||||
| $tree = XHPASTTree::newFromDataAndResolvedExecFuture( | $tree = XHPASTTree::newFromDataAndResolvedExecFuture( | ||||
| ▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines | |||||