You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #47 and #36 , didn't see anything mentioning this when searching issues.
A lot of existing tooling uses one of these two parsers, and there are potential use cases for being able to parse syntactically invalid files.
Examples of potential use cases:
print code style issues in addition to syntax errors, without a developer having to fix the file and run a check again. (e.g. phpcs?)
other static analysis tools being able to check for issues such as undefined methods, calling functions with invalid param types, etc. in other parts of syntactically invalid files
other code for autocompletion based on nikic/php-parser
Or, do you recommend creating a separate project depending on tolerant-php-parser?
Aside: if existing tooling needs to know something about any incomplete expressions/statements, adding a property such as $node->tolerantAST to the derived data structures may help