Open
Description
The parser currently emits few diagnostics beyond general syntax errors, but it has always been the plan to walk the tree and emit more. We may want to bring it up to par with nikic/php-parser, at least.
For examples, search nikic/php-parser for emitError. e.g. in this file: https://github.com/nikic/PHP-Parser/blob/a32e3797d411590841ae06dd559ddb867d376aff/lib/PhpParser/ParserAbstract.php