mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Docs: add missing $stmts (#433)
This commit is contained in:
parent
837579a40c
commit
7f92edf3a1
@ -17,7 +17,7 @@ $stmts = $parser->parse($code);
|
||||
// MODIFY $stmts here
|
||||
|
||||
$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
|
||||
$newCode = $prettyPrinter->prettyPrintFile();
|
||||
$newCode = $prettyPrinter->prettyPrintFile($stmts);
|
||||
```
|
||||
|
||||
The pretty printer has three basic printing methods: `prettyPrint()`, `prettyPrintFile()` and
|
||||
@ -89,4 +89,4 @@ $newCode = $printer->printFormatPreserving($newStmts, $oldStmts, $oldTokens);
|
||||
This functionality is experimental and not yet fully implemented. It should not provide incorrect
|
||||
code, but it may sometimes reformat more code than necessary. Open issues are tracked in
|
||||
[issue #344](https://github.com/nikic/PHP-Parser/issues/344). If you encounter problems while using
|
||||
this functionality, please open an issue, so we know what to prioritize.
|
||||
this functionality, please open an issue, so we know what to prioritize.
|
||||
|
Loading…
Reference in New Issue
Block a user