tolerant-php-parser icon indicating copy to clipboard operation
tolerant-php-parser copied to clipboard

Diagnostics - general tracking issue

Open roblourens opened this issue 8 years ago • 2 comments
trafficstars

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

roblourens avatar Jun 13 '17 22:06 roblourens

I also saw that the diagnostic code uses Reflection to get the Token name, that is very slow.

felixfbecker avatar Jun 14 '17 08:06 felixfbecker

I also saw that the diagnostic code uses Reflection to get the Token name, that is very slow.

For tracking purposes: That was fixed in #187 (Instead of using Reflection every time, tolerant-php-parser only uses Reflection the first time, and caches that)

TysonAndre avatar Feb 17 '18 08:02 TysonAndre